@lumikmz/kmz 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +69 -66
- package/dist/index.d.mts +215 -76
- package/dist/index.mjs +634 -157
- package/package.json +1 -1
- package/src/index.ts +2 -1
- package/src/plan/geometry.test.ts +96 -0
- package/src/plan/geometry.ts +161 -25
- package/src/plan/index.ts +23 -3
- package/src/plan/plan-mapping-strip.ts +3 -3
- package/src/plan/plan-mapping2d.ts +512 -89
- package/src/plan/plan-mapping3d.ts +157 -98
- package/src/plan/plan.test.ts +263 -9
- package/src/types/action.ts +65 -1
- package/src/types/drone-payload.ts +18 -12
- package/src/types/enums.ts +17 -3
- package/src/types/mission-config.ts +5 -0
- package/src/types/placemark.ts +92 -15
- package/src/types/template.ts +12 -76
- package/src/types/waylines.ts +12 -3
- package/src/types/waypoint-params.ts +18 -0
package/src/types/action.ts
CHANGED
|
@@ -49,7 +49,14 @@ export type Action =
|
|
|
49
49
|
| PanoShotAction
|
|
50
50
|
| RecordPointCloudAction
|
|
51
51
|
| MegaphoneAction
|
|
52
|
-
| SearchlightAction
|
|
52
|
+
| SearchlightAction
|
|
53
|
+
| StartSmartObliqueAction
|
|
54
|
+
| StopSmartObliqueAction
|
|
55
|
+
| StartTimeLapseAction
|
|
56
|
+
| StopTimeLapseAction
|
|
57
|
+
| GimbalAngleLockAction
|
|
58
|
+
| GimbalAngleUnlockAction
|
|
59
|
+
| SetFocusTypeAction;
|
|
53
60
|
|
|
54
61
|
interface ActionBase<F extends string, P> {
|
|
55
62
|
actionId: number;
|
|
@@ -92,6 +99,8 @@ export interface FocusParam {
|
|
|
92
99
|
focusRegionHeight?: number;
|
|
93
100
|
/** Required on M3E/M3T/M3M, M3D/M3TD, M4D/M4TD, M4E/M4T. */
|
|
94
101
|
isInfiniteFocus?: boolean;
|
|
102
|
+
/** Calibration focus flag, observed in mapping WPML exports. */
|
|
103
|
+
isCalibrationFocus?: boolean;
|
|
95
104
|
}
|
|
96
105
|
export type FocusAction = ActionBase<"focus", FocusParam>;
|
|
97
106
|
|
|
@@ -212,6 +221,8 @@ export interface PanoShotParam {
|
|
|
212
221
|
payloadPositionIndex?: number;
|
|
213
222
|
payloadLensIndex?: LensType[];
|
|
214
223
|
useGlobalPayloadLensIndex?: boolean;
|
|
224
|
+
/** Photo meta tag written alongside the panorama; UUID string. */
|
|
225
|
+
actionUUID?: string;
|
|
215
226
|
panoShotSubMode: PanoShotSubMode;
|
|
216
227
|
}
|
|
217
228
|
export type PanoShotAction = ActionBase<"panoShot", PanoShotParam>;
|
|
@@ -241,6 +252,59 @@ export interface MegaphoneParam {
|
|
|
241
252
|
}
|
|
242
253
|
export type MegaphoneAction = ActionBase<"megaphone", MegaphoneParam>;
|
|
243
254
|
|
|
255
|
+
/** M4D/M4TD only — starts gimbal swing in smart-oblique mode. */
|
|
256
|
+
export interface StartSmartObliqueParam {
|
|
257
|
+
payloadPositionIndex: number;
|
|
258
|
+
}
|
|
259
|
+
export type StartSmartObliqueAction = ActionBase<"startSmartOblique", StartSmartObliqueParam>;
|
|
260
|
+
|
|
261
|
+
/** M4D/M4TD only — stops gimbal swing in smart-oblique mode. */
|
|
262
|
+
export interface StopSmartObliqueParam {
|
|
263
|
+
payloadPositionIndex: number;
|
|
264
|
+
}
|
|
265
|
+
export type StopSmartObliqueAction = ActionBase<"stopSmartOblique", StopSmartObliqueParam>;
|
|
266
|
+
|
|
267
|
+
/** Starts interval (time-lapse) shooting for a mapping strip. */
|
|
268
|
+
export interface StartTimeLapseParam {
|
|
269
|
+
payloadPositionIndex: number;
|
|
270
|
+
useGlobalPayloadLensIndex: boolean;
|
|
271
|
+
/** Single lens token (not a list — mapping strips use one lens). */
|
|
272
|
+
payloadLensIndex: LensType;
|
|
273
|
+
/** Minimum shoot interval in seconds. Derived from `forwardGroundSpacing / speed`. */
|
|
274
|
+
minShootInterval: number;
|
|
275
|
+
}
|
|
276
|
+
export type StartTimeLapseAction = ActionBase<"startTimeLapse", StartTimeLapseParam>;
|
|
277
|
+
|
|
278
|
+
/** Stops interval shooting for a mapping strip. */
|
|
279
|
+
export interface StopTimeLapseParam {
|
|
280
|
+
payloadPositionIndex: number;
|
|
281
|
+
payloadLensIndex: LensType;
|
|
282
|
+
}
|
|
283
|
+
export type StopTimeLapseAction = ActionBase<"stopTimeLapse", StopTimeLapseParam>;
|
|
284
|
+
|
|
285
|
+
/** Locks gimbal pitch angle during a mapping strip. */
|
|
286
|
+
export interface GimbalAngleLockParam {
|
|
287
|
+
payloadPositionIndex: number;
|
|
288
|
+
}
|
|
289
|
+
export type GimbalAngleLockAction = ActionBase<"gimbalAngleLock", GimbalAngleLockParam>;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Unlocks gimbal angle after a mapping strip ends.
|
|
293
|
+
* ⚠️ No `actionActuatorFuncParam` element is emitted in XML — this action has no params.
|
|
294
|
+
*/
|
|
295
|
+
export interface GimbalAngleUnlockAction {
|
|
296
|
+
actionId: number;
|
|
297
|
+
actionActuatorFunc: "gimbalAngleUnlock";
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/** Sets camera focus mode (e.g. "manual") before a mapping run. */
|
|
301
|
+
export interface SetFocusTypeParam {
|
|
302
|
+
payloadPositionIndex: number;
|
|
303
|
+
/** e.g. `"manual"`, `"auto"`. */
|
|
304
|
+
cameraFocusType: string;
|
|
305
|
+
}
|
|
306
|
+
export type SetFocusTypeAction = ActionBase<"setFocusType", SetFocusTypeParam>;
|
|
307
|
+
|
|
244
308
|
/** M4D/M4TD only. */
|
|
245
309
|
export interface SearchlightParam {
|
|
246
310
|
payloadPositionIndex: number;
|
|
@@ -8,6 +8,12 @@ export interface DroneInfo {
|
|
|
8
8
|
|
|
9
9
|
export interface PayloadInfo {
|
|
10
10
|
payloadEnumValue: number;
|
|
11
|
+
/**
|
|
12
|
+
* Payload sub-type (`type-subtype-gimbalindex`, the middle field). Non-standard
|
|
13
|
+
* WPML extension that DJI tooling emits; written when present. Main-gimbal
|
|
14
|
+
* cameras are subtype 0 (e.g. M4TD Camera = 99-0-0).
|
|
15
|
+
*/
|
|
16
|
+
payloadSubEnumValue?: number;
|
|
11
17
|
payloadPositionIndex: number;
|
|
12
18
|
}
|
|
13
19
|
|
|
@@ -31,18 +37,18 @@ export const DroneEnum = {
|
|
|
31
37
|
|
|
32
38
|
/** Payload `{ payloadEnumValue, payloadPositionIndex }` tuples for common cameras. */
|
|
33
39
|
export const PayloadEnum = {
|
|
34
|
-
// Main gimbal cameras
|
|
35
|
-
M30Camera: { payloadEnumValue: 52, payloadPositionIndex: 0 },
|
|
36
|
-
M30TCamera: { payloadEnumValue: 53, payloadPositionIndex: 0 },
|
|
37
|
-
M3ECamera: { payloadEnumValue: 66, payloadPositionIndex: 0 },
|
|
38
|
-
M3TCamera: { payloadEnumValue: 67, payloadPositionIndex: 0 },
|
|
39
|
-
M3TACamera: { payloadEnumValue: 129, payloadPositionIndex: 0 },
|
|
40
|
-
M3DCamera: { payloadEnumValue: 80, payloadPositionIndex: 0 },
|
|
41
|
-
M3TDCamera: { payloadEnumValue: 81, payloadPositionIndex: 0 },
|
|
42
|
-
M4DCamera: { payloadEnumValue: 98, payloadPositionIndex: 0 },
|
|
43
|
-
M4TDCamera: { payloadEnumValue: 99, payloadPositionIndex: 0 },
|
|
44
|
-
M4ECamera: { payloadEnumValue: 88, payloadPositionIndex: 0 },
|
|
45
|
-
M4TCamera: { payloadEnumValue: 89, payloadPositionIndex: 0 },
|
|
40
|
+
// Main gimbal cameras (subtype 0 = primary integrated camera)
|
|
41
|
+
M30Camera: { payloadEnumValue: 52, payloadSubEnumValue: 0, payloadPositionIndex: 0 },
|
|
42
|
+
M30TCamera: { payloadEnumValue: 53, payloadSubEnumValue: 0, payloadPositionIndex: 0 },
|
|
43
|
+
M3ECamera: { payloadEnumValue: 66, payloadSubEnumValue: 0, payloadPositionIndex: 0 },
|
|
44
|
+
M3TCamera: { payloadEnumValue: 67, payloadSubEnumValue: 0, payloadPositionIndex: 0 },
|
|
45
|
+
M3TACamera: { payloadEnumValue: 129, payloadSubEnumValue: 0, payloadPositionIndex: 0 },
|
|
46
|
+
M3DCamera: { payloadEnumValue: 80, payloadSubEnumValue: 0, payloadPositionIndex: 0 },
|
|
47
|
+
M3TDCamera: { payloadEnumValue: 81, payloadSubEnumValue: 0, payloadPositionIndex: 0 },
|
|
48
|
+
M4DCamera: { payloadEnumValue: 98, payloadSubEnumValue: 0, payloadPositionIndex: 0 },
|
|
49
|
+
M4TDCamera: { payloadEnumValue: 99, payloadSubEnumValue: 0, payloadPositionIndex: 0 },
|
|
50
|
+
M4ECamera: { payloadEnumValue: 88, payloadSubEnumValue: 0, payloadPositionIndex: 0 },
|
|
51
|
+
M4TCamera: { payloadEnumValue: 89, payloadSubEnumValue: 0, payloadPositionIndex: 0 },
|
|
46
52
|
// Zenmuse mounts: 0=front-left/main, 1=front-right, 2=top (M300 RTK), 0=main for others
|
|
47
53
|
ZenmuseZ30: { payloadEnumValue: 20, payloadPositionIndex: 0 },
|
|
48
54
|
ZenmuseXT2: { payloadEnumValue: 26, payloadPositionIndex: 0 },
|
package/src/types/enums.ts
CHANGED
|
@@ -82,9 +82,23 @@ export type ActionActuatorFunc =
|
|
|
82
82
|
| "panoShot"
|
|
83
83
|
| "recordPointCloud"
|
|
84
84
|
| "megaphone"
|
|
85
|
-
| "searchlight"
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
| "searchlight"
|
|
86
|
+
/** ⚠️ NON-SPEC — observed in real DJI KMZ exports, absent from WPML 1.15 docs. */
|
|
87
|
+
| "startSmartOblique"
|
|
88
|
+
/** ⚠️ NON-SPEC — observed in real DJI KMZ exports, absent from WPML 1.15 docs. */
|
|
89
|
+
| "stopSmartOblique"
|
|
90
|
+
/** Starts time-lapse (interval) shooting for a mapping strip. */
|
|
91
|
+
| "startTimeLapse"
|
|
92
|
+
/** Stops time-lapse shooting. */
|
|
93
|
+
| "stopTimeLapse"
|
|
94
|
+
/** Locks gimbal angle during a mapping strip. */
|
|
95
|
+
| "gimbalAngleLock"
|
|
96
|
+
/** Unlocks gimbal angle (no params in XML). */
|
|
97
|
+
| "gimbalAngleUnlock"
|
|
98
|
+
/** Sets camera focus mode (manual / auto). */
|
|
99
|
+
| "setFocusType";
|
|
100
|
+
|
|
101
|
+
export type GimbalHeadingYawBase = "north" | "aircraft";
|
|
88
102
|
|
|
89
103
|
export type GimbalRotateMode = "absoluteAngle";
|
|
90
104
|
|
|
@@ -55,4 +55,9 @@ export interface PayloadParam {
|
|
|
55
55
|
modelColoringEnable?: boolean;
|
|
56
56
|
/** Comma-joined `LensType` tokens, e.g. `["wide","ir"]`. */
|
|
57
57
|
imageFormat: LensType[];
|
|
58
|
+
/**
|
|
59
|
+
* ⚠️ NON-SPEC — observed in 司空2 (FlightHub 2) KMZ exports, absent from WPML 1.15.
|
|
60
|
+
* Photo size/ratio token, e.g. `"default_l"`. Pass-through for compatibility.
|
|
61
|
+
*/
|
|
62
|
+
photoSize?: string;
|
|
58
63
|
}
|
package/src/types/placemark.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import type { Degrees, LngLat, Meters, MetersPerSecond } from "./branded.js";
|
|
2
2
|
import type { ActionGroup } from "./action.js";
|
|
3
|
-
import type { ExecuteHeightMode } from "./enums.js";
|
|
4
|
-
import type {
|
|
3
|
+
import type { ExecuteHeightMode, ShootType } from "./enums.js";
|
|
4
|
+
import type {
|
|
5
|
+
MappingHeadingParam,
|
|
6
|
+
Overlap,
|
|
7
|
+
WaypointHeadingParam,
|
|
8
|
+
WaypointTurnParam,
|
|
9
|
+
} from "./waypoint-params.js";
|
|
5
10
|
|
|
6
11
|
// ─── Template Placemark ──────────────────────────────────────────────────────
|
|
7
12
|
|
|
@@ -47,27 +52,92 @@ export interface TemplateWaypointPlacemark {
|
|
|
47
52
|
actionGroup?: ActionGroup[];
|
|
48
53
|
}
|
|
49
54
|
|
|
50
|
-
/**
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
outerBoundaryIs: {
|
|
57
|
-
LinearRing: {
|
|
58
|
-
/** Space-separated `lon,lat,alt` triples. */
|
|
59
|
-
coordinates: string;
|
|
60
|
-
};
|
|
55
|
+
/** Survey-area boundary polygon, shared by mapping2d / mapping3d Placemarks. */
|
|
56
|
+
export interface TemplatePolygon {
|
|
57
|
+
outerBoundaryIs: {
|
|
58
|
+
LinearRing: {
|
|
59
|
+
/** Space-separated `lon,lat,alt` triples. */
|
|
60
|
+
coordinates: string;
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
/**
|
|
66
|
-
|
|
65
|
+
/**
|
|
66
|
+
* `Placemark` inside a `mapping2d` Folder. Per the WPML spec the shooting/mapping
|
|
67
|
+
* params live HERE alongside the polygon — NOT on the Folder.
|
|
68
|
+
*/
|
|
69
|
+
export interface Mapping2dPlacemark {
|
|
70
|
+
/** M300/M350 only. */
|
|
71
|
+
caliFlightEnable?: boolean;
|
|
72
|
+
elevationOptimizeEnable: boolean;
|
|
73
|
+
/** M300/M350+P1, M3E/M3T/M3M, M3D. */
|
|
74
|
+
smartObliqueEnable?: boolean;
|
|
75
|
+
smartObliqueGimbalPitch?: Degrees;
|
|
76
|
+
/** M4E only. */
|
|
77
|
+
quickOrthoMappingEnable?: boolean;
|
|
78
|
+
/** Required iff `quickOrthoMappingEnable === true`. `[10, 30]`. */
|
|
79
|
+
quickOrthoMappingPitch?: Degrees;
|
|
80
|
+
/** M3E/M3T/M3M. */
|
|
81
|
+
facadeWaylineEnable?: boolean;
|
|
82
|
+
shootType: ShootType;
|
|
83
|
+
/** `[0, 360]`. */
|
|
84
|
+
direction: Degrees;
|
|
85
|
+
/** Outward survey-area margin, meters. */
|
|
86
|
+
margin: number;
|
|
87
|
+
/** M3E/M3T/M3M, M3D/M3TD, M4D/M4TD, M4E/M4T. */
|
|
88
|
+
mappingHeadingParam?: MappingHeadingParam;
|
|
89
|
+
/** M3E/M3T/M3M, M3D/M3TD, M4D/M4TD, M4E/M4T. */
|
|
90
|
+
gimbalPitchMode?: "manual" | "fixed";
|
|
91
|
+
/** Required iff `gimbalPitchMode === "fixed"`. `[-90, -30]`. */
|
|
92
|
+
gimbalPitchAngle?: Degrees;
|
|
93
|
+
/** Overlap ratios as percentages `[0, 100]` (e.g. `80`, not `0.8`). */
|
|
94
|
+
overlap: Overlap;
|
|
95
|
+
Polygon: TemplatePolygon;
|
|
96
|
+
/** WGS84 ellipsoid. */
|
|
97
|
+
ellipsoidHeight: Meters;
|
|
98
|
+
/** Per Folder `heightMode`. */
|
|
99
|
+
height: Meters;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** `Placemark` inside a `mapping3d` (oblique) Folder. Params live here, not on the Folder. */
|
|
103
|
+
export interface Mapping3dPlacemark {
|
|
104
|
+
caliFlightEnable?: boolean;
|
|
105
|
+
inclinedGimbalPitch: Degrees;
|
|
106
|
+
/** Range `[1, 15]`. */
|
|
107
|
+
inclinedFlightSpeed: MetersPerSecond;
|
|
108
|
+
shootType: ShootType;
|
|
109
|
+
direction: Degrees;
|
|
110
|
+
margin: number;
|
|
111
|
+
/** Overlap ratios as percentages `[0, 100]`. */
|
|
112
|
+
overlap: Overlap;
|
|
113
|
+
Polygon: TemplatePolygon;
|
|
114
|
+
ellipsoidHeight: Meters;
|
|
115
|
+
height: Meters;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** `Placemark` inside a `mappingStrip` Folder — uses a LineString; params live here. */
|
|
119
|
+
export interface MappingStripPlacemark {
|
|
120
|
+
caliFlightEnable: boolean;
|
|
121
|
+
shootType: ShootType;
|
|
122
|
+
direction: Degrees;
|
|
123
|
+
/** Float meters (vs integer in mapping2d/3d). */
|
|
124
|
+
margin: number;
|
|
125
|
+
singleLineEnable: boolean;
|
|
126
|
+
cuttingDistance: number;
|
|
127
|
+
boundaryOptimEnable: boolean;
|
|
128
|
+
leftExtend: number;
|
|
129
|
+
rightExtend: number;
|
|
130
|
+
includeCenterEnable: boolean;
|
|
131
|
+
/** Overlap ratios as percentages `[0, 100]`. */
|
|
132
|
+
overlap: Overlap;
|
|
67
133
|
LineString: {
|
|
68
134
|
/** Space-separated `lon,lat,alt` triples. Alt consumed only when `stripUseTemplateAltitude === true`. */
|
|
69
135
|
coordinates: string;
|
|
70
136
|
};
|
|
137
|
+
ellipsoidHeight: Meters;
|
|
138
|
+
height: Meters;
|
|
139
|
+
/** When true, altitudes are read from LineString triples. */
|
|
140
|
+
stripUseTemplateAltitude: boolean;
|
|
71
141
|
}
|
|
72
142
|
|
|
73
143
|
// ─── Waylines Placemark ──────────────────────────────────────────────────────
|
|
@@ -90,6 +160,13 @@ export interface WaylinesPlacemark {
|
|
|
90
160
|
useStraightLine?: boolean;
|
|
91
161
|
isRisky?: boolean;
|
|
92
162
|
actionGroup?: ActionGroup[];
|
|
163
|
+
/** Per-waypoint gimbal orientation hint observed in mapping waylines exports. */
|
|
164
|
+
waypointGimbalHeadingParam?: {
|
|
165
|
+
waypointGimbalPitchAngle: Degrees;
|
|
166
|
+
waypointGimbalYawAngle: Degrees;
|
|
167
|
+
};
|
|
168
|
+
/** Waypoint work type; 0 = normal. Observed in mapping waylines exports. */
|
|
169
|
+
waypointWorkType?: number;
|
|
93
170
|
}
|
|
94
171
|
|
|
95
172
|
/** Re-export for convenience; folder-level executeHeightMode lives here. */
|
package/src/types/template.ts
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meters, MetersPerSecond } from "./branded.js";
|
|
2
2
|
import type { MissionConfig, PayloadParam } from "./mission-config.js";
|
|
3
|
-
import type { GimbalPitchMode,
|
|
3
|
+
import type { GimbalPitchMode, WaypointTurnMode } from "./enums.js";
|
|
4
|
+
import type { WaylineCoordinateSysParam, WaypointHeadingParam } from "./waypoint-params.js";
|
|
4
5
|
import type {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
WaypointHeadingParam,
|
|
9
|
-
} from "./waypoint-params.js";
|
|
10
|
-
import type {
|
|
11
|
-
TemplateLineStringPlacemark,
|
|
12
|
-
TemplatePolygonPlacemark,
|
|
6
|
+
Mapping2dPlacemark,
|
|
7
|
+
Mapping3dPlacemark,
|
|
8
|
+
MappingStripPlacemark,
|
|
13
9
|
TemplateWaypointPlacemark,
|
|
14
10
|
} from "./placemark.js";
|
|
15
11
|
|
|
@@ -73,40 +69,8 @@ export interface Mapping2dFolder {
|
|
|
73
69
|
waylineCoordinateSysParam: WaylineCoordinateSysParam;
|
|
74
70
|
autoFlightSpeed: MetersPerSecond;
|
|
75
71
|
payloadParam?: PayloadParam;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
caliFlightEnable?: boolean;
|
|
79
|
-
elevationOptimizeEnable: boolean;
|
|
80
|
-
/** M300/M350+P1, M3E/M3T/M3M, M3D. */
|
|
81
|
-
smartObliqueEnable?: boolean;
|
|
82
|
-
smartObliqueGimbalPitch?: Degrees;
|
|
83
|
-
|
|
84
|
-
shootType: ShootType;
|
|
85
|
-
/** `[0, 360]`. */
|
|
86
|
-
direction: Degrees;
|
|
87
|
-
/** Outward survey-area margin, meters. */
|
|
88
|
-
margin: number;
|
|
89
|
-
overlap: Overlap;
|
|
90
|
-
/** WGS84 ellipsoid. */
|
|
91
|
-
ellipsoidHeight: Meters;
|
|
92
|
-
/** Per Folder `heightMode`. */
|
|
93
|
-
height: Meters;
|
|
94
|
-
|
|
95
|
-
/** M3E/M3T/M3M. */
|
|
96
|
-
facadeWaylineEnable?: boolean;
|
|
97
|
-
|
|
98
|
-
/** M3E/M3T/M3M, M3D/M3TD, M4D/M4TD, M4E/M4T. */
|
|
99
|
-
mappingHeadingParam?: MappingHeadingParam;
|
|
100
|
-
/** M3E/M3T/M3M, M3D/M3TD, M4D/M4TD, M4E/M4T. */
|
|
101
|
-
gimbalPitchMode?: "manual" | "fixed";
|
|
102
|
-
/** Required iff `gimbalPitchMode === "fixed"`. `[-90, -30]`. */
|
|
103
|
-
gimbalPitchAngle?: Degrees;
|
|
104
|
-
/** M4E only. */
|
|
105
|
-
quickOrthoMappingEnable?: boolean;
|
|
106
|
-
/** Required iff `quickOrthoMappingEnable === true`. `[10, 30]`. */
|
|
107
|
-
quickOrthoMappingPitch?: Degrees;
|
|
108
|
-
|
|
109
|
-
Placemark: TemplatePolygonPlacemark;
|
|
72
|
+
/** Holds the survey polygon AND all shooting/mapping params (per WPML nesting). */
|
|
73
|
+
Placemark: Mapping2dPlacemark;
|
|
110
74
|
}
|
|
111
75
|
|
|
112
76
|
// ─── mapping3d (oblique photography) ─────────────────────────────────────────
|
|
@@ -121,19 +85,8 @@ export interface Mapping3dFolder {
|
|
|
121
85
|
waylineCoordinateSysParam: WaylineCoordinateSysParam;
|
|
122
86
|
autoFlightSpeed: MetersPerSecond;
|
|
123
87
|
payloadParam?: PayloadParam;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
inclinedGimbalPitch: Degrees;
|
|
127
|
-
/** Range `[1, 15]`. */
|
|
128
|
-
inclinedFlightSpeed: MetersPerSecond;
|
|
129
|
-
shootType: ShootType;
|
|
130
|
-
direction: Degrees;
|
|
131
|
-
margin: number;
|
|
132
|
-
overlap: Overlap;
|
|
133
|
-
ellipsoidHeight: Meters;
|
|
134
|
-
height: Meters;
|
|
135
|
-
|
|
136
|
-
Placemark: TemplatePolygonPlacemark;
|
|
88
|
+
/** Holds the survey polygon AND all shooting/mapping params. */
|
|
89
|
+
Placemark: Mapping3dPlacemark;
|
|
137
90
|
}
|
|
138
91
|
|
|
139
92
|
// ─── mappingStrip ────────────────────────────────────────────────────────────
|
|
@@ -148,23 +101,6 @@ export interface MappingStripFolder {
|
|
|
148
101
|
waylineCoordinateSysParam: WaylineCoordinateSysParam;
|
|
149
102
|
autoFlightSpeed: MetersPerSecond;
|
|
150
103
|
payloadParam?: PayloadParam;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
shootType: ShootType;
|
|
154
|
-
direction: Degrees;
|
|
155
|
-
/** Float meters (vs integer in mapping2d/3d). */
|
|
156
|
-
margin: number;
|
|
157
|
-
singleLineEnable: boolean;
|
|
158
|
-
cuttingDistance: number;
|
|
159
|
-
boundaryOptimEnable: boolean;
|
|
160
|
-
leftExtend: number;
|
|
161
|
-
rightExtend: number;
|
|
162
|
-
includeCenterEnable: boolean;
|
|
163
|
-
overlap: Overlap;
|
|
164
|
-
ellipsoidHeight: Meters;
|
|
165
|
-
height: Meters;
|
|
166
|
-
/** When true, altitudes are read from LineString triples. */
|
|
167
|
-
stripUseTemplateAltitude: boolean;
|
|
168
|
-
|
|
169
|
-
Placemark: TemplateLineStringPlacemark;
|
|
104
|
+
/** Holds the LineString AND all strip params. */
|
|
105
|
+
Placemark: MappingStripPlacemark;
|
|
170
106
|
}
|
package/src/types/waylines.ts
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import type { MetersPerSecond } from "./branded.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { Action } from "./action.js";
|
|
3
3
|
import type { ExecuteHeightMode } from "./enums.js";
|
|
4
4
|
import type { MissionConfig } from "./mission-config.js";
|
|
5
5
|
import type { WaylinesPlacemark } from "./placemark.js";
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Pre-flight action list executed before the wayline starts.
|
|
9
|
+
* The XML `<wpml:startActionGroup>` element only wraps raw `<wpml:action>` items —
|
|
10
|
+
* it has no `actionGroupId`, `actionGroupMode`, or `actionTrigger` elements.
|
|
11
|
+
*/
|
|
12
|
+
export interface StartActionGroup {
|
|
13
|
+
action: Action[];
|
|
14
|
+
}
|
|
15
|
+
|
|
7
16
|
/**
|
|
8
17
|
* `waylines.wpml` document. Mirrors `<kml><Document>` structure.
|
|
9
18
|
* See `docs/kmz/waylines-wpml.html`.
|
|
@@ -24,9 +33,9 @@ export interface WaylinesFolder {
|
|
|
24
33
|
/** Range `[1, 15]`. */
|
|
25
34
|
autoFlightSpeed: MetersPerSecond;
|
|
26
35
|
/**
|
|
27
|
-
* Optional pre-wayline action
|
|
36
|
+
* Optional pre-wayline action list executed before the wayline starts.
|
|
28
37
|
* Available on M30/M30T, M3E/M3T/M3M, M3D/M3TD, M4D/M4TD, M4E/M4T.
|
|
29
38
|
*/
|
|
30
|
-
startActionGroup?:
|
|
39
|
+
startActionGroup?: StartActionGroup;
|
|
31
40
|
Placemark: WaylinesPlacemark[];
|
|
32
41
|
}
|
|
@@ -19,7 +19,14 @@ export interface WaypointHeadingParam {
|
|
|
19
19
|
waypointHeadingAngle?: Degrees;
|
|
20
20
|
/** Required iff `waypointHeadingMode === "towardPOI"`. Z aim unsupported; set height to 0. */
|
|
21
21
|
waypointPoiPoint?: LngLatHeight;
|
|
22
|
+
/**
|
|
23
|
+
* Whether `waypointHeadingAngle` is in effect at this waypoint.
|
|
24
|
+
* Observed in mapping waylines exports; `false` on the terminal waypoint.
|
|
25
|
+
*/
|
|
26
|
+
waypointHeadingAngleEnable?: boolean;
|
|
22
27
|
waypointHeadingPathMode: WaypointHeadingPathMode;
|
|
28
|
+
/** POI index when `waypointHeadingMode === "towardPOI"`. Default 0. */
|
|
29
|
+
waypointHeadingPoiIndex?: number;
|
|
23
30
|
}
|
|
24
31
|
|
|
25
32
|
/**
|
|
@@ -50,6 +57,17 @@ export interface WaylineCoordinateSysParam {
|
|
|
50
57
|
surfaceFollowModeEnable?: boolean;
|
|
51
58
|
/** Required iff `surfaceFollowModeEnable === true`. */
|
|
52
59
|
surfaceRelativeHeight?: Meters;
|
|
60
|
+
/**
|
|
61
|
+
* ⚠️ NON-SPEC — observed in real DJI KMZ exports, absent from WPML 1.15 docs.
|
|
62
|
+
* When true, surface-follow uses live onboard sensor height (no DSM file).
|
|
63
|
+
*/
|
|
64
|
+
isRealtimeSurfaceFollow?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* ⚠️ NON-SPEC — observed in real DJI KMZ exports, absent from WPML 1.15 docs.
|
|
67
|
+
* Path inside the KMZ to the DSM `.tif` used for surface-follow,
|
|
68
|
+
* e.g. `"wpmz/res/dsm/foo.tif"`. Only set when `isRealtimeSurfaceFollow` is false.
|
|
69
|
+
*/
|
|
70
|
+
dsmFile?: string;
|
|
53
71
|
}
|
|
54
72
|
|
|
55
73
|
/**
|