@lumikmz/kmz 0.2.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/LICENSE +21 -0
- package/README.md +540 -0
- package/dist/index.d.mts +789 -0
- package/dist/index.mjs +779 -0
- package/package.json +24 -0
- package/src/index.ts +3 -0
- package/src/plan/geometry.ts +109 -0
- package/src/plan/index.ts +31 -0
- package/src/plan/plan-mapping-strip.ts +84 -0
- package/src/plan/plan-mapping2d.ts +128 -0
- package/src/plan/plan-mapping3d.ts +188 -0
- package/src/plan/plan-waypoint.ts +80 -0
- package/src/plan/plan.test.ts +96 -0
- package/src/types/action.ts +253 -0
- package/src/types/branded.ts +20 -0
- package/src/types/drone-payload.ts +59 -0
- package/src/types/enums.ts +97 -0
- package/src/types/errors.ts +19 -0
- package/src/types/index.ts +10 -0
- package/src/types/mission-config.ts +58 -0
- package/src/types/placemark.ts +96 -0
- package/src/types/template.ts +170 -0
- package/src/types/waylines.ts +32 -0
- package/src/types/waypoint-params.ts +78 -0
- package/src/validate/index.ts +25 -0
- package/src/validate/validate-mission-config.ts +48 -0
- package/src/validate/validate-template.ts +101 -0
- package/src/validate/validate-waylines.ts +59 -0
- package/tsconfig.json +4 -0
- package/vite.config.ts +9 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,789 @@
|
|
|
1
|
+
//#region src/types/branded.d.ts
|
|
2
|
+
type Brand<T, B> = T & {
|
|
3
|
+
readonly __brand: B;
|
|
4
|
+
};
|
|
5
|
+
type Meters = Brand<number, "Meters">;
|
|
6
|
+
type MetersPerSecond = Brand<number, "MetersPerSecond">;
|
|
7
|
+
type Degrees = Brand<number, "Degrees">;
|
|
8
|
+
declare const meters: (n: number) => Meters;
|
|
9
|
+
declare const metersPerSecond: (n: number) => MetersPerSecond;
|
|
10
|
+
declare const degrees: (n: number) => Degrees;
|
|
11
|
+
interface LngLat {
|
|
12
|
+
readonly lng: number;
|
|
13
|
+
readonly lat: number;
|
|
14
|
+
}
|
|
15
|
+
interface LngLatHeight {
|
|
16
|
+
readonly lng: number;
|
|
17
|
+
readonly lat: number;
|
|
18
|
+
readonly height: Meters;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/types/errors.d.ts
|
|
22
|
+
declare class KmzError extends Error {
|
|
23
|
+
constructor(message: string);
|
|
24
|
+
}
|
|
25
|
+
declare class PlannerError extends KmzError {
|
|
26
|
+
constructor(message: string);
|
|
27
|
+
}
|
|
28
|
+
interface Issue {
|
|
29
|
+
path: string;
|
|
30
|
+
message: string;
|
|
31
|
+
severity: "error" | "warning";
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/types/enums.d.ts
|
|
35
|
+
type FlyToWaylineMode = "safely" | "pointToPoint";
|
|
36
|
+
type FinishAction = "goHome" | "noAction" | "autoLand" | "gotoFirstWaypoint";
|
|
37
|
+
type ExitOnRCLost = "goContinue" | "executeLostAction";
|
|
38
|
+
type ExecuteRCLostAction = "goBack" | "landing" | "hover";
|
|
39
|
+
type TemplateType = "waypoint" | "mapping2d" | "mapping3d" | "mappingStrip";
|
|
40
|
+
type CoordinateMode = "WGS84";
|
|
41
|
+
/** Used in template.kml `waylineCoordinateSysParam.heightMode`. */
|
|
42
|
+
type TemplateHeightMode = "EGM96" | "relativeToStartPoint" | "aboveGroundLevel" | "realTimeFollowSurface";
|
|
43
|
+
/** Used in waylines.wpml `Folder.executeHeightMode`. */
|
|
44
|
+
type ExecuteHeightMode = "WGS84" | "relativeToStartPoint" | "realTimeFollowSurface";
|
|
45
|
+
type PositioningType = "GPS" | "RTKBaseStation" | "QianXun" | "Custom";
|
|
46
|
+
type WaypointTurnMode = "coordinateTurn" | "toPointAndStopWithDiscontinuityCurvature" | "toPointAndStopWithContinuityCurvature" | "toPointAndPassWithContinuityCurvature";
|
|
47
|
+
type WaypointHeadingMode = "followWayline" | "manually" | "fixed" | "smoothTransition" | "towardPOI";
|
|
48
|
+
/** Spec typo preserved: `followBadArc` (intended "shortest path / smaller arc"). */
|
|
49
|
+
type WaypointHeadingPathMode = "clockwise" | "counterClockwise" | "followBadArc";
|
|
50
|
+
/** Template waypoint folder allows manual + per-point; mapping templates allow manual + fixed. */
|
|
51
|
+
type GimbalPitchMode = "manual" | "usePointSetting" | "fixed";
|
|
52
|
+
type ShootType = "time" | "distance";
|
|
53
|
+
type MappingHeadingMode = "fixed" | "followWayline";
|
|
54
|
+
/** Spec typo preserved: `visable`. */
|
|
55
|
+
type LensType = "wide" | "zoom" | "ir" | "narrow_band" | "visable";
|
|
56
|
+
type FocusMode = "firstPoint" | "custom";
|
|
57
|
+
type MeteringMode = "average" | "spot";
|
|
58
|
+
type LidarReturnMode = "singleReturnStrongest" | "dualReturn" | "tripleReturn";
|
|
59
|
+
type LidarScanningMode = "repetitive" | "nonRepetitive";
|
|
60
|
+
type ActionGroupMode = "sequence";
|
|
61
|
+
type ActionTriggerType = "reachPoint" | "betweenAdjacentPoints" | "multipleTiming" | "multipleDistance";
|
|
62
|
+
type ActionActuatorFunc = "takePhoto" | "startRecord" | "stopRecord" | "focus" | "zoom" | "customDirName" | "gimbalRotate" | "rotateYaw" | "hover" | "gimbalEvenlyRotate" | "accurateShoot" | "orientedShoot" | "panoShot" | "recordPointCloud" | "megaphone" | "searchlight";
|
|
63
|
+
type GimbalHeadingYawBase = "north";
|
|
64
|
+
type GimbalRotateMode = "absoluteAngle";
|
|
65
|
+
type AircraftPathMode = "clockwise" | "counterClockwise";
|
|
66
|
+
type RecordPointCloudOperate = "startRecord" | "pauseRecord" | "resumeRecord" | "stopRecord";
|
|
67
|
+
type PanoShotSubMode = "panoShot_360";
|
|
68
|
+
type OrientedPhotoMode = "normalPhoto" | "lowLightSmartShooting";
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region src/types/drone-payload.d.ts
|
|
71
|
+
interface DroneInfo {
|
|
72
|
+
droneEnumValue: number;
|
|
73
|
+
droneSubEnumValue?: number;
|
|
74
|
+
}
|
|
75
|
+
interface PayloadInfo {
|
|
76
|
+
payloadEnumValue: number;
|
|
77
|
+
payloadPositionIndex: number;
|
|
78
|
+
}
|
|
79
|
+
/** Aircraft `{ droneEnumValue, droneSubEnumValue }` tuples. */
|
|
80
|
+
declare const DroneEnum: {
|
|
81
|
+
readonly M400: {
|
|
82
|
+
readonly droneEnumValue: 103;
|
|
83
|
+
readonly droneSubEnumValue: 0;
|
|
84
|
+
};
|
|
85
|
+
readonly M350RTK: {
|
|
86
|
+
readonly droneEnumValue: 89;
|
|
87
|
+
readonly droneSubEnumValue: 0;
|
|
88
|
+
};
|
|
89
|
+
readonly M300RTK: {
|
|
90
|
+
readonly droneEnumValue: 60;
|
|
91
|
+
readonly droneSubEnumValue: 0;
|
|
92
|
+
};
|
|
93
|
+
readonly M30: {
|
|
94
|
+
readonly droneEnumValue: 67;
|
|
95
|
+
readonly droneSubEnumValue: 0;
|
|
96
|
+
};
|
|
97
|
+
readonly M30T: {
|
|
98
|
+
readonly droneEnumValue: 67;
|
|
99
|
+
readonly droneSubEnumValue: 1;
|
|
100
|
+
};
|
|
101
|
+
readonly M3E: {
|
|
102
|
+
readonly droneEnumValue: 77;
|
|
103
|
+
readonly droneSubEnumValue: 0;
|
|
104
|
+
};
|
|
105
|
+
readonly M3T: {
|
|
106
|
+
readonly droneEnumValue: 77;
|
|
107
|
+
readonly droneSubEnumValue: 1;
|
|
108
|
+
};
|
|
109
|
+
readonly M3TA: {
|
|
110
|
+
readonly droneEnumValue: 77;
|
|
111
|
+
readonly droneSubEnumValue: 3;
|
|
112
|
+
};
|
|
113
|
+
readonly M3D: {
|
|
114
|
+
readonly droneEnumValue: 91;
|
|
115
|
+
readonly droneSubEnumValue: 0;
|
|
116
|
+
};
|
|
117
|
+
readonly M3TD: {
|
|
118
|
+
readonly droneEnumValue: 91;
|
|
119
|
+
readonly droneSubEnumValue: 1;
|
|
120
|
+
};
|
|
121
|
+
readonly M4D: {
|
|
122
|
+
readonly droneEnumValue: 100;
|
|
123
|
+
readonly droneSubEnumValue: 0;
|
|
124
|
+
};
|
|
125
|
+
readonly M4TD: {
|
|
126
|
+
readonly droneEnumValue: 100;
|
|
127
|
+
readonly droneSubEnumValue: 1;
|
|
128
|
+
};
|
|
129
|
+
readonly M4E: {
|
|
130
|
+
readonly droneEnumValue: 99;
|
|
131
|
+
readonly droneSubEnumValue: 0;
|
|
132
|
+
};
|
|
133
|
+
readonly M4T: {
|
|
134
|
+
readonly droneEnumValue: 99;
|
|
135
|
+
readonly droneSubEnumValue: 1;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
/** Payload `{ payloadEnumValue, payloadPositionIndex }` tuples for common cameras. */
|
|
139
|
+
declare const PayloadEnum: {
|
|
140
|
+
readonly M30Camera: {
|
|
141
|
+
readonly payloadEnumValue: 52;
|
|
142
|
+
readonly payloadPositionIndex: 0;
|
|
143
|
+
};
|
|
144
|
+
readonly M30TCamera: {
|
|
145
|
+
readonly payloadEnumValue: 53;
|
|
146
|
+
readonly payloadPositionIndex: 0;
|
|
147
|
+
};
|
|
148
|
+
readonly M3ECamera: {
|
|
149
|
+
readonly payloadEnumValue: 66;
|
|
150
|
+
readonly payloadPositionIndex: 0;
|
|
151
|
+
};
|
|
152
|
+
readonly M3TCamera: {
|
|
153
|
+
readonly payloadEnumValue: 67;
|
|
154
|
+
readonly payloadPositionIndex: 0;
|
|
155
|
+
};
|
|
156
|
+
readonly M3TACamera: {
|
|
157
|
+
readonly payloadEnumValue: 129;
|
|
158
|
+
readonly payloadPositionIndex: 0;
|
|
159
|
+
};
|
|
160
|
+
readonly M3DCamera: {
|
|
161
|
+
readonly payloadEnumValue: 80;
|
|
162
|
+
readonly payloadPositionIndex: 0;
|
|
163
|
+
};
|
|
164
|
+
readonly M3TDCamera: {
|
|
165
|
+
readonly payloadEnumValue: 81;
|
|
166
|
+
readonly payloadPositionIndex: 0;
|
|
167
|
+
};
|
|
168
|
+
readonly M4DCamera: {
|
|
169
|
+
readonly payloadEnumValue: 98;
|
|
170
|
+
readonly payloadPositionIndex: 0;
|
|
171
|
+
};
|
|
172
|
+
readonly M4TDCamera: {
|
|
173
|
+
readonly payloadEnumValue: 99;
|
|
174
|
+
readonly payloadPositionIndex: 0;
|
|
175
|
+
};
|
|
176
|
+
readonly M4ECamera: {
|
|
177
|
+
readonly payloadEnumValue: 88;
|
|
178
|
+
readonly payloadPositionIndex: 0;
|
|
179
|
+
};
|
|
180
|
+
readonly M4TCamera: {
|
|
181
|
+
readonly payloadEnumValue: 89;
|
|
182
|
+
readonly payloadPositionIndex: 0;
|
|
183
|
+
};
|
|
184
|
+
readonly ZenmuseZ30: {
|
|
185
|
+
readonly payloadEnumValue: 20;
|
|
186
|
+
readonly payloadPositionIndex: 0;
|
|
187
|
+
};
|
|
188
|
+
readonly ZenmuseXT2: {
|
|
189
|
+
readonly payloadEnumValue: 26;
|
|
190
|
+
readonly payloadPositionIndex: 0;
|
|
191
|
+
};
|
|
192
|
+
readonly ZenmuseXTS: {
|
|
193
|
+
readonly payloadEnumValue: 41;
|
|
194
|
+
readonly payloadPositionIndex: 0;
|
|
195
|
+
};
|
|
196
|
+
readonly ZenmuseH20: {
|
|
197
|
+
readonly payloadEnumValue: 42;
|
|
198
|
+
readonly payloadPositionIndex: 0;
|
|
199
|
+
};
|
|
200
|
+
readonly ZenmuseH20T: {
|
|
201
|
+
readonly payloadEnumValue: 43;
|
|
202
|
+
readonly payloadPositionIndex: 0;
|
|
203
|
+
};
|
|
204
|
+
readonly ZenmuseH20N: {
|
|
205
|
+
readonly payloadEnumValue: 61;
|
|
206
|
+
readonly payloadPositionIndex: 0;
|
|
207
|
+
};
|
|
208
|
+
readonly ZenmuseH30: {
|
|
209
|
+
readonly payloadEnumValue: 82;
|
|
210
|
+
readonly payloadPositionIndex: 0;
|
|
211
|
+
};
|
|
212
|
+
readonly ZenmuseH30T: {
|
|
213
|
+
readonly payloadEnumValue: 83;
|
|
214
|
+
readonly payloadPositionIndex: 0;
|
|
215
|
+
};
|
|
216
|
+
readonly FPVMatriceSeries: {
|
|
217
|
+
readonly payloadEnumValue: 39;
|
|
218
|
+
readonly payloadPositionIndex: 7;
|
|
219
|
+
};
|
|
220
|
+
readonly AuxiliaryM3xM4x: {
|
|
221
|
+
readonly payloadEnumValue: 176;
|
|
222
|
+
readonly payloadPositionIndex: 0;
|
|
223
|
+
};
|
|
224
|
+
readonly DockCamera: {
|
|
225
|
+
readonly payloadEnumValue: 165;
|
|
226
|
+
readonly payloadPositionIndex: 7;
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
//#endregion
|
|
230
|
+
//#region src/types/mission-config.d.ts
|
|
231
|
+
/**
|
|
232
|
+
* `wpml:missionConfig` — shared between template.kml and waylines.wpml.
|
|
233
|
+
* See `docs/kmz/common-element.html` §missionConfig.
|
|
234
|
+
*/
|
|
235
|
+
interface MissionConfig {
|
|
236
|
+
flyToWaylineMode: FlyToWaylineMode;
|
|
237
|
+
finishAction: FinishAction;
|
|
238
|
+
exitOnRCLost: ExitOnRCLost;
|
|
239
|
+
/** Required iff `exitOnRCLost === "executeLostAction"`. */
|
|
240
|
+
executeRCLostAction?: ExecuteRCLostAction;
|
|
241
|
+
takeOffSecurityHeight: Meters;
|
|
242
|
+
/** lat/lng with WGS84 ellipsoid height. Optional; only used for planning. */
|
|
243
|
+
takeOffRefPoint?: LngLatHeight;
|
|
244
|
+
/** AGL altitude of `takeOffRefPoint`. Paired with the ellipsoid height inside `takeOffRefPoint.height`. */
|
|
245
|
+
takeOffRefPointAGLHeight?: Meters;
|
|
246
|
+
globalTransitionalSpeed: MetersPerSecond;
|
|
247
|
+
globalRTHHeight: Meters;
|
|
248
|
+
droneInfo: DroneInfo;
|
|
249
|
+
payloadInfo: PayloadInfo[];
|
|
250
|
+
/** Only M3D/M3TD, M4D/M4TD, M4E/M4T. */
|
|
251
|
+
autoRerouteInfo?: AutoRerouteInfo;
|
|
252
|
+
}
|
|
253
|
+
interface AutoRerouteInfo {
|
|
254
|
+
missionAutoRerouteMode: boolean;
|
|
255
|
+
transitionalAutoRerouteMode: boolean;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* `wpml:payloadParam` — per-payload imaging settings.
|
|
259
|
+
* Lives under template `Folder`.
|
|
260
|
+
*/
|
|
261
|
+
interface PayloadParam {
|
|
262
|
+
payloadPositionIndex: number;
|
|
263
|
+
focusMode?: FocusMode;
|
|
264
|
+
meteringMode?: MeteringMode;
|
|
265
|
+
dewarpingEnable?: boolean;
|
|
266
|
+
returnMode?: LidarReturnMode;
|
|
267
|
+
samplingRate?: 60000 | 80000 | 120000 | 160000 | 180000 | 240000;
|
|
268
|
+
scanningMode?: LidarScanningMode;
|
|
269
|
+
modelColoringEnable?: boolean;
|
|
270
|
+
/** Comma-joined `LensType` tokens, e.g. `["wide","ir"]`. */
|
|
271
|
+
imageFormat: LensType[];
|
|
272
|
+
}
|
|
273
|
+
//#endregion
|
|
274
|
+
//#region src/types/waypoint-params.d.ts
|
|
275
|
+
/**
|
|
276
|
+
* `wpml:waypointHeadingParam` & `wpml:globalWaypointHeadingParam`.
|
|
277
|
+
* See `docs/kmz/common-element.html` §waypointHeadingParam.
|
|
278
|
+
*/
|
|
279
|
+
interface WaypointHeadingParam {
|
|
280
|
+
waypointHeadingMode: WaypointHeadingMode;
|
|
281
|
+
/** Required iff `waypointHeadingMode === "smoothTransition"`. Range `[-180, 180]`. */
|
|
282
|
+
waypointHeadingAngle?: Degrees;
|
|
283
|
+
/** Required iff `waypointHeadingMode === "towardPOI"`. Z aim unsupported; set height to 0. */
|
|
284
|
+
waypointPoiPoint?: LngLatHeight;
|
|
285
|
+
waypointHeadingPathMode: WaypointHeadingPathMode;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* `wpml:waypointTurnParam`.
|
|
289
|
+
* See `docs/kmz/common-element.html` §waypointTurnParam.
|
|
290
|
+
*/
|
|
291
|
+
interface WaypointTurnParam {
|
|
292
|
+
waypointTurnMode: WaypointTurnMode;
|
|
293
|
+
/**
|
|
294
|
+
* Required iff `waypointTurnMode === "coordinateTurn"`
|
|
295
|
+
* OR (`waypointTurnMode === "toPointAndPassWithContinuityCurvature"` AND useStraightLine = 1).
|
|
296
|
+
*/
|
|
297
|
+
waypointTurnDampingDist?: Meters;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* `wpml:waylineCoordinateSysParam`.
|
|
301
|
+
* Mapping templates require globalShootHeight + surfaceFollowModeEnable.
|
|
302
|
+
*/
|
|
303
|
+
interface WaylineCoordinateSysParam {
|
|
304
|
+
/** Currently only `"WGS84"` is allowed. */
|
|
305
|
+
coordinateMode: CoordinateMode;
|
|
306
|
+
heightMode: TemplateHeightMode;
|
|
307
|
+
positioningType?: PositioningType;
|
|
308
|
+
/** Required for mapping templates. */
|
|
309
|
+
globalShootHeight?: Meters;
|
|
310
|
+
/** Required for mapping templates. */
|
|
311
|
+
surfaceFollowModeEnable?: boolean;
|
|
312
|
+
/** Required iff `surfaceFollowModeEnable === true`. */
|
|
313
|
+
surfaceRelativeHeight?: Meters;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* `wpml:mappingHeadingParam` — only on `mapping2d` Folder
|
|
317
|
+
* (M3E/M3T/M3M, M3D/M3TD, M4D/M4TD, M4E/M4T).
|
|
318
|
+
*/
|
|
319
|
+
interface MappingHeadingParam {
|
|
320
|
+
mappingHeadingMode: MappingHeadingMode;
|
|
321
|
+
/** Required iff `mappingHeadingMode === "fixed"`. Range `[0, 360]`. */
|
|
322
|
+
mappingHeadingAngle?: Degrees;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* `wpml:overlap` — child of mapping2d / mapping3d / mappingStrip Folders.
|
|
326
|
+
* All fields individually optional in spec but at least one ortho pair is required in practice.
|
|
327
|
+
*/
|
|
328
|
+
interface Overlap {
|
|
329
|
+
orthoLidarOverlapH?: number;
|
|
330
|
+
orthoLidarOverlapW?: number;
|
|
331
|
+
orthoCameraOverlapH?: number;
|
|
332
|
+
orthoCameraOverlapW?: number;
|
|
333
|
+
inclinedLidarOverlapH?: number;
|
|
334
|
+
inclinedLidarOverlapW?: number;
|
|
335
|
+
inclinedCameraOverlapH?: number;
|
|
336
|
+
inclinedCameraOverlapW?: number;
|
|
337
|
+
}
|
|
338
|
+
//#endregion
|
|
339
|
+
//#region src/types/action.d.ts
|
|
340
|
+
/**
|
|
341
|
+
* `wpml:actionGroup` — see `docs/kmz/common-element.html` §actionGroup.
|
|
342
|
+
*
|
|
343
|
+
* - `actionGroupId` is unique within the entire KMZ (monotonically from 0).
|
|
344
|
+
* - `actionId` is scoped within its group.
|
|
345
|
+
*/
|
|
346
|
+
interface ActionGroup {
|
|
347
|
+
actionGroupId: number;
|
|
348
|
+
actionGroupStartIndex: number;
|
|
349
|
+
actionGroupEndIndex: number;
|
|
350
|
+
actionGroupMode: ActionGroupMode;
|
|
351
|
+
actionTrigger: ActionTrigger;
|
|
352
|
+
action: Action[];
|
|
353
|
+
}
|
|
354
|
+
interface ActionTrigger {
|
|
355
|
+
actionTriggerType: ActionTriggerType;
|
|
356
|
+
/** Seconds for `multipleTiming`, meters for `multipleDistance`. */
|
|
357
|
+
actionTriggerParam?: number;
|
|
358
|
+
}
|
|
359
|
+
/** Discriminated by `actionActuatorFunc`. */
|
|
360
|
+
type Action = TakePhotoAction | StartRecordAction | StopRecordAction | FocusAction | ZoomAction | CustomDirNameAction | GimbalRotateAction | RotateYawAction | HoverAction | GimbalEvenlyRotateAction | AccurateShootAction | OrientedShootAction | PanoShotAction | RecordPointCloudAction | MegaphoneAction | SearchlightAction;
|
|
361
|
+
interface ActionBase<F extends string, P> {
|
|
362
|
+
actionId: number;
|
|
363
|
+
actionActuatorFunc: F;
|
|
364
|
+
actionActuatorFuncParam: P;
|
|
365
|
+
}
|
|
366
|
+
interface TakePhotoParam {
|
|
367
|
+
payloadPositionIndex: number;
|
|
368
|
+
fileSuffix?: string;
|
|
369
|
+
payloadLensIndex?: LensType[];
|
|
370
|
+
useGlobalPayloadLensIndex: boolean;
|
|
371
|
+
}
|
|
372
|
+
type TakePhotoAction = ActionBase<"takePhoto", TakePhotoParam>;
|
|
373
|
+
interface StartRecordParam {
|
|
374
|
+
payloadPositionIndex: number;
|
|
375
|
+
fileSuffix?: string;
|
|
376
|
+
payloadLensIndex?: LensType[];
|
|
377
|
+
useGlobalPayloadLensIndex: boolean;
|
|
378
|
+
}
|
|
379
|
+
type StartRecordAction = ActionBase<"startRecord", StartRecordParam>;
|
|
380
|
+
interface StopRecordParam {
|
|
381
|
+
payloadPositionIndex: number;
|
|
382
|
+
payloadLensIndex?: LensType[];
|
|
383
|
+
}
|
|
384
|
+
type StopRecordAction = ActionBase<"stopRecord", StopRecordParam>;
|
|
385
|
+
interface FocusParam {
|
|
386
|
+
payloadPositionIndex: number;
|
|
387
|
+
isPointFocus: boolean;
|
|
388
|
+
focusX: number;
|
|
389
|
+
focusY: number;
|
|
390
|
+
/** Required iff `isPointFocus === false`. */
|
|
391
|
+
focusRegionWidth?: number;
|
|
392
|
+
/** Required iff `isPointFocus === false`. */
|
|
393
|
+
focusRegionHeight?: number;
|
|
394
|
+
/** Required on M3E/M3T/M3M, M3D/M3TD, M4D/M4TD, M4E/M4T. */
|
|
395
|
+
isInfiniteFocus?: boolean;
|
|
396
|
+
}
|
|
397
|
+
type FocusAction = ActionBase<"focus", FocusParam>;
|
|
398
|
+
interface ZoomParam {
|
|
399
|
+
payloadPositionIndex: number;
|
|
400
|
+
/** mm, > 0. */
|
|
401
|
+
focalLength: number;
|
|
402
|
+
}
|
|
403
|
+
type ZoomAction = ActionBase<"zoom", ZoomParam>;
|
|
404
|
+
interface CustomDirNameParam {
|
|
405
|
+
payloadPositionIndex: number;
|
|
406
|
+
directoryName: string;
|
|
407
|
+
}
|
|
408
|
+
type CustomDirNameAction = ActionBase<"customDirName", CustomDirNameParam>;
|
|
409
|
+
interface GimbalRotateParam {
|
|
410
|
+
payloadPositionIndex: number;
|
|
411
|
+
gimbalHeadingYawBase: GimbalHeadingYawBase;
|
|
412
|
+
gimbalRotateMode: GimbalRotateMode;
|
|
413
|
+
gimbalPitchRotateEnable: boolean;
|
|
414
|
+
gimbalPitchRotateAngle: Degrees;
|
|
415
|
+
gimbalRollRotateEnable: boolean;
|
|
416
|
+
gimbalRollRotateAngle: Degrees;
|
|
417
|
+
gimbalYawRotateEnable: boolean;
|
|
418
|
+
gimbalYawRotateAngle: Degrees;
|
|
419
|
+
gimbalRotateTimeEnable: boolean;
|
|
420
|
+
/** seconds */
|
|
421
|
+
gimbalRotateTime: number;
|
|
422
|
+
}
|
|
423
|
+
type GimbalRotateAction = ActionBase<"gimbalRotate", GimbalRotateParam>;
|
|
424
|
+
interface RotateYawParam {
|
|
425
|
+
/** `[-180, 180]`, 0=N, 90=E, -90=W, ±180=S. */
|
|
426
|
+
aircraftHeading: Degrees;
|
|
427
|
+
/** Required on M300/M350. */
|
|
428
|
+
aircraftPathMode?: AircraftPathMode;
|
|
429
|
+
}
|
|
430
|
+
type RotateYawAction = ActionBase<"rotateYaw", RotateYawParam>;
|
|
431
|
+
interface HoverParam {
|
|
432
|
+
/** seconds, > 0. */
|
|
433
|
+
hoverTime: number;
|
|
434
|
+
}
|
|
435
|
+
type HoverAction = ActionBase<"hover", HoverParam>;
|
|
436
|
+
interface GimbalEvenlyRotateParam {
|
|
437
|
+
payloadPositionIndex: number;
|
|
438
|
+
gimbalPitchRotateAngle: Degrees;
|
|
439
|
+
}
|
|
440
|
+
/** Must be paired with `actionTriggerType === "betweenAdjacentPoints"`. */
|
|
441
|
+
type GimbalEvenlyRotateAction = ActionBase<"gimbalEvenlyRotate", GimbalEvenlyRotateParam>;
|
|
442
|
+
/** Deprecated for M30/M30T after firmware V06.01.10.02. Prefer `orientedShoot`. */
|
|
443
|
+
interface AccurateShootParam {
|
|
444
|
+
gimbalPitchRotateAngle: Degrees;
|
|
445
|
+
gimbalYawRotateAngle: Degrees;
|
|
446
|
+
focusX: number;
|
|
447
|
+
focusY: number;
|
|
448
|
+
focusRegionWidth: number;
|
|
449
|
+
focusRegionHeight: number;
|
|
450
|
+
focalLength: number;
|
|
451
|
+
aircraftHeading: Degrees;
|
|
452
|
+
accurateFrameValid: boolean;
|
|
453
|
+
payloadPositionIndex: number;
|
|
454
|
+
payloadLensIndex: LensType[];
|
|
455
|
+
useGlobalPayloadLensIndex: boolean;
|
|
456
|
+
targetAngle: Degrees;
|
|
457
|
+
imageWidth: number;
|
|
458
|
+
imageHeight: number;
|
|
459
|
+
AFPos: number;
|
|
460
|
+
gimbalPort: number;
|
|
461
|
+
accurateCameraType: number;
|
|
462
|
+
accurateFilePath: string;
|
|
463
|
+
accurateFileMD5: string;
|
|
464
|
+
accurateFileSize: number;
|
|
465
|
+
accurateFileSuffix: string;
|
|
466
|
+
accurateCameraApertue?: number;
|
|
467
|
+
accurateCameraLuminance?: number;
|
|
468
|
+
accurateCameraShutterTime?: number;
|
|
469
|
+
accurateCameraISO?: number;
|
|
470
|
+
}
|
|
471
|
+
type AccurateShootAction = ActionBase<"accurateShoot", AccurateShootParam>;
|
|
472
|
+
interface OrientedShootParam {
|
|
473
|
+
gimbalPitchRotateAngle: Degrees;
|
|
474
|
+
gimbalYawRotateAngle: Degrees;
|
|
475
|
+
focusX: number;
|
|
476
|
+
focusY: number;
|
|
477
|
+
focusRegionWidth: number;
|
|
478
|
+
focusRegionHeight: number;
|
|
479
|
+
focalLength: number;
|
|
480
|
+
aircraftHeading: Degrees;
|
|
481
|
+
accurateFrameValid: boolean;
|
|
482
|
+
payloadPositionIndex: number;
|
|
483
|
+
payloadLensIndex: LensType[];
|
|
484
|
+
useGlobalPayloadLensIndex: boolean;
|
|
485
|
+
targetAngle: Degrees;
|
|
486
|
+
actionUUID: string;
|
|
487
|
+
imageWidth: number;
|
|
488
|
+
imageHeight: number;
|
|
489
|
+
AFPos: number;
|
|
490
|
+
gimbalPort: number;
|
|
491
|
+
orientedCameraType: number;
|
|
492
|
+
orientedFilePath: string;
|
|
493
|
+
orientedFileMD5: string;
|
|
494
|
+
orientedFileSize: number;
|
|
495
|
+
orientedFileSuffix: string;
|
|
496
|
+
orientedCameraApertue: number;
|
|
497
|
+
orientedCameraLuminance: number;
|
|
498
|
+
orientedCameraShutterTime: number;
|
|
499
|
+
orientedCameraISO: number;
|
|
500
|
+
orientedPhotoMode: OrientedPhotoMode;
|
|
501
|
+
}
|
|
502
|
+
type OrientedShootAction = ActionBase<"orientedShoot", OrientedShootParam>;
|
|
503
|
+
interface PanoShotParam {
|
|
504
|
+
payloadPositionIndex?: number;
|
|
505
|
+
payloadLensIndex?: LensType[];
|
|
506
|
+
useGlobalPayloadLensIndex?: boolean;
|
|
507
|
+
panoShotSubMode: PanoShotSubMode;
|
|
508
|
+
}
|
|
509
|
+
type PanoShotAction = ActionBase<"panoShot", PanoShotParam>;
|
|
510
|
+
interface RecordPointCloudParam {
|
|
511
|
+
payloadPositionIndex: number;
|
|
512
|
+
recordPointCloudOperate: RecordPointCloudOperate;
|
|
513
|
+
}
|
|
514
|
+
type RecordPointCloudAction = ActionBase<"recordPointCloud", RecordPointCloudParam>;
|
|
515
|
+
/** M4D/M4TD only. */
|
|
516
|
+
interface MegaphoneParam {
|
|
517
|
+
payloadPositionIndex: number;
|
|
518
|
+
actionUUID: string;
|
|
519
|
+
/** 0 = start, 1 = stop. */
|
|
520
|
+
megaphoneOperateType: 0 | 1;
|
|
521
|
+
/** 0–100. */
|
|
522
|
+
megaphoneOperateVolume: number;
|
|
523
|
+
megaphoneOperateLoop: boolean;
|
|
524
|
+
/** Path inside KMZ, e.g. `/wpmz/res/audio/<hash>.opus`. */
|
|
525
|
+
megaphoneOperateFilePath: string;
|
|
526
|
+
megaphoneFileName: string;
|
|
527
|
+
megaphoneFileOriginalName: string;
|
|
528
|
+
megaphoneFileMd5: string;
|
|
529
|
+
/** 1=8000, 2=16000, 3=24000, 4=32000, 5=48000, 6=64000 (only 4 supported today). */
|
|
530
|
+
megaphoneFileBitrate: 1 | 2 | 3 | 4 | 5 | 6;
|
|
531
|
+
}
|
|
532
|
+
type MegaphoneAction = ActionBase<"megaphone", MegaphoneParam>;
|
|
533
|
+
/** M4D/M4TD only. */
|
|
534
|
+
interface SearchlightParam {
|
|
535
|
+
payloadPositionIndex: number;
|
|
536
|
+
actionUUID?: string;
|
|
537
|
+
/** 0 = off, 1 = illuminate, 2 = flash. */
|
|
538
|
+
searchlightOperateType: 0 | 1 | 2;
|
|
539
|
+
/** 0–100. */
|
|
540
|
+
searchlightBrightness: number;
|
|
541
|
+
}
|
|
542
|
+
type SearchlightAction = ActionBase<"searchlight", SearchlightParam>;
|
|
543
|
+
//#endregion
|
|
544
|
+
//#region src/types/placemark.d.ts
|
|
545
|
+
/**
|
|
546
|
+
* `Placemark` inside a `waypoint`-type Folder of template.kml.
|
|
547
|
+
*
|
|
548
|
+
* Note coordinate order: `Point.coordinates` is `lon,lat` per KML (no altitude).
|
|
549
|
+
*/
|
|
550
|
+
interface TemplateWaypointPlacemark {
|
|
551
|
+
Point: {
|
|
552
|
+
coordinates: LngLat;
|
|
553
|
+
};
|
|
554
|
+
index: number;
|
|
555
|
+
useGlobalHeight: boolean;
|
|
556
|
+
/** Required iff `useGlobalHeight === false`. WGS84 ellipsoid. */
|
|
557
|
+
ellipsoidHeight?: Meters;
|
|
558
|
+
/** Required iff `useGlobalHeight === false`. Interpretation per Folder `heightMode`. */
|
|
559
|
+
height?: Meters;
|
|
560
|
+
useGlobalSpeed: boolean;
|
|
561
|
+
/** Required iff `useGlobalSpeed === false`. Range `[1, 15]`. */
|
|
562
|
+
waypointSpeed?: MetersPerSecond;
|
|
563
|
+
useGlobalHeadingParam: boolean;
|
|
564
|
+
/** Required iff `useGlobalHeadingParam === false`. */
|
|
565
|
+
waypointHeadingParam?: WaypointHeadingParam;
|
|
566
|
+
useGlobalTurnParam: boolean;
|
|
567
|
+
/** Required iff `useGlobalTurnParam === false`. */
|
|
568
|
+
waypointTurnParam?: WaypointTurnParam;
|
|
569
|
+
/**
|
|
570
|
+
* Required iff inner `waypointTurnMode` is one of
|
|
571
|
+
* `toPointAndStopWithContinuityCurvature` or `toPointAndPassWithContinuityCurvature`.
|
|
572
|
+
*/
|
|
573
|
+
useStraightLine?: boolean;
|
|
574
|
+
/** Required iff Folder `gimbalPitchMode === "usePointSetting"`. */
|
|
575
|
+
gimbalPitchAngle?: Degrees;
|
|
576
|
+
/** Optional on M30/M30T, M3D/M3TD, M4D/M4TD, M4E/M4T. */
|
|
577
|
+
isRisky?: boolean;
|
|
578
|
+
actionGroup?: ActionGroup[];
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* `Placemark` inside a mapping-type Folder (mapping2d / mapping3d).
|
|
582
|
+
* Holds the survey polygon. Folder-level fields carry shooting params.
|
|
583
|
+
*/
|
|
584
|
+
interface TemplatePolygonPlacemark {
|
|
585
|
+
Polygon: {
|
|
586
|
+
outerBoundaryIs: {
|
|
587
|
+
LinearRing: {
|
|
588
|
+
/** Space-separated `lon,lat,alt` triples. */coordinates: string;
|
|
589
|
+
};
|
|
590
|
+
};
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
/** Placemark for `mappingStrip` Folder — uses a LineString. */
|
|
594
|
+
interface TemplateLineStringPlacemark {
|
|
595
|
+
LineString: {
|
|
596
|
+
/** Space-separated `lon,lat,alt` triples. Alt consumed only when `stripUseTemplateAltitude === true`. */coordinates: string;
|
|
597
|
+
};
|
|
598
|
+
}
|
|
599
|
+
/**
|
|
600
|
+
* `Placemark` inside a Folder of waylines.wpml.
|
|
601
|
+
*
|
|
602
|
+
* The spec's `useGlobalXxx` switches are template-only — in waylines.wpml the
|
|
603
|
+
* params are inlined unconditionally, so they are required here.
|
|
604
|
+
*/
|
|
605
|
+
interface WaylinesPlacemark {
|
|
606
|
+
Point: {
|
|
607
|
+
coordinates: LngLat;
|
|
608
|
+
};
|
|
609
|
+
index: number;
|
|
610
|
+
/** Interpretation per Folder `executeHeightMode`. */
|
|
611
|
+
executeHeight: Meters;
|
|
612
|
+
/** Range `[1, 15]`. */
|
|
613
|
+
waypointSpeed: MetersPerSecond;
|
|
614
|
+
waypointHeadingParam: WaypointHeadingParam;
|
|
615
|
+
waypointTurnParam: WaypointTurnParam;
|
|
616
|
+
useStraightLine?: boolean;
|
|
617
|
+
isRisky?: boolean;
|
|
618
|
+
actionGroup?: ActionGroup[];
|
|
619
|
+
}
|
|
620
|
+
//#endregion
|
|
621
|
+
//#region src/types/template.d.ts
|
|
622
|
+
/**
|
|
623
|
+
* `template.kml` document. Mirrors `<kml><Document>` structure.
|
|
624
|
+
* See `docs/kmz/template-kml.html`.
|
|
625
|
+
*/
|
|
626
|
+
type Template = WaypointTemplate | Mapping2dTemplate | Mapping3dTemplate | MappingStripTemplate;
|
|
627
|
+
interface TemplateDocumentBase {
|
|
628
|
+
/** Unix milliseconds. */
|
|
629
|
+
author?: string;
|
|
630
|
+
createTime?: number;
|
|
631
|
+
updateTime?: number;
|
|
632
|
+
missionConfig: MissionConfig;
|
|
633
|
+
}
|
|
634
|
+
interface WaypointTemplate extends TemplateDocumentBase {
|
|
635
|
+
Folder: WaypointFolder;
|
|
636
|
+
}
|
|
637
|
+
interface WaypointFolder {
|
|
638
|
+
templateType: "waypoint";
|
|
639
|
+
/** Range `[0, 65535]`. */
|
|
640
|
+
templateId: number;
|
|
641
|
+
waylineCoordinateSysParam: WaylineCoordinateSysParam;
|
|
642
|
+
/** Range `[1, 15]` m/s. */
|
|
643
|
+
autoFlightSpeed: MetersPerSecond;
|
|
644
|
+
payloadParam?: PayloadParam;
|
|
645
|
+
globalWaypointTurnMode: WaypointTurnMode;
|
|
646
|
+
/**
|
|
647
|
+
* Required iff `globalWaypointTurnMode` is one of
|
|
648
|
+
* `toPointAndStopWithContinuityCurvature` or `toPointAndPassWithContinuityCurvature`.
|
|
649
|
+
*/
|
|
650
|
+
globalUseStraightLine?: boolean;
|
|
651
|
+
/** `manual` | `usePointSetting`. */
|
|
652
|
+
gimbalPitchMode: GimbalPitchMode;
|
|
653
|
+
/** Relative to takeoff point. */
|
|
654
|
+
globalHeight: Meters;
|
|
655
|
+
globalWaypointHeadingParam: WaypointHeadingParam;
|
|
656
|
+
Placemark: TemplateWaypointPlacemark[];
|
|
657
|
+
}
|
|
658
|
+
interface Mapping2dTemplate extends TemplateDocumentBase {
|
|
659
|
+
Folder: Mapping2dFolder;
|
|
660
|
+
}
|
|
661
|
+
interface Mapping2dFolder {
|
|
662
|
+
templateType: "mapping2d";
|
|
663
|
+
templateId: number;
|
|
664
|
+
waylineCoordinateSysParam: WaylineCoordinateSysParam;
|
|
665
|
+
autoFlightSpeed: MetersPerSecond;
|
|
666
|
+
payloadParam?: PayloadParam;
|
|
667
|
+
/** M300/M350 only. */
|
|
668
|
+
caliFlightEnable?: boolean;
|
|
669
|
+
elevationOptimizeEnable: boolean;
|
|
670
|
+
/** M300/M350+P1, M3E/M3T/M3M, M3D. */
|
|
671
|
+
smartObliqueEnable?: boolean;
|
|
672
|
+
smartObliqueGimbalPitch?: Degrees;
|
|
673
|
+
shootType: ShootType;
|
|
674
|
+
/** `[0, 360]`. */
|
|
675
|
+
direction: Degrees;
|
|
676
|
+
/** Outward survey-area margin, meters. */
|
|
677
|
+
margin: number;
|
|
678
|
+
overlap: Overlap;
|
|
679
|
+
/** WGS84 ellipsoid. */
|
|
680
|
+
ellipsoidHeight: Meters;
|
|
681
|
+
/** Per Folder `heightMode`. */
|
|
682
|
+
height: Meters;
|
|
683
|
+
/** M3E/M3T/M3M. */
|
|
684
|
+
facadeWaylineEnable?: boolean;
|
|
685
|
+
/** M3E/M3T/M3M, M3D/M3TD, M4D/M4TD, M4E/M4T. */
|
|
686
|
+
mappingHeadingParam?: MappingHeadingParam;
|
|
687
|
+
/** M3E/M3T/M3M, M3D/M3TD, M4D/M4TD, M4E/M4T. */
|
|
688
|
+
gimbalPitchMode?: "manual" | "fixed";
|
|
689
|
+
/** Required iff `gimbalPitchMode === "fixed"`. `[-90, -30]`. */
|
|
690
|
+
gimbalPitchAngle?: Degrees;
|
|
691
|
+
/** M4E only. */
|
|
692
|
+
quickOrthoMappingEnable?: boolean;
|
|
693
|
+
/** Required iff `quickOrthoMappingEnable === true`. `[10, 30]`. */
|
|
694
|
+
quickOrthoMappingPitch?: Degrees;
|
|
695
|
+
Placemark: TemplatePolygonPlacemark;
|
|
696
|
+
}
|
|
697
|
+
interface Mapping3dTemplate extends TemplateDocumentBase {
|
|
698
|
+
Folder: Mapping3dFolder;
|
|
699
|
+
}
|
|
700
|
+
interface Mapping3dFolder {
|
|
701
|
+
templateType: "mapping3d";
|
|
702
|
+
templateId: number;
|
|
703
|
+
waylineCoordinateSysParam: WaylineCoordinateSysParam;
|
|
704
|
+
autoFlightSpeed: MetersPerSecond;
|
|
705
|
+
payloadParam?: PayloadParam;
|
|
706
|
+
caliFlightEnable?: boolean;
|
|
707
|
+
inclinedGimbalPitch: Degrees;
|
|
708
|
+
/** Range `[1, 15]`. */
|
|
709
|
+
inclinedFlightSpeed: MetersPerSecond;
|
|
710
|
+
shootType: ShootType;
|
|
711
|
+
direction: Degrees;
|
|
712
|
+
margin: number;
|
|
713
|
+
overlap: Overlap;
|
|
714
|
+
ellipsoidHeight: Meters;
|
|
715
|
+
height: Meters;
|
|
716
|
+
Placemark: TemplatePolygonPlacemark;
|
|
717
|
+
}
|
|
718
|
+
interface MappingStripTemplate extends TemplateDocumentBase {
|
|
719
|
+
Folder: MappingStripFolder;
|
|
720
|
+
}
|
|
721
|
+
interface MappingStripFolder {
|
|
722
|
+
templateType: "mappingStrip";
|
|
723
|
+
templateId: number;
|
|
724
|
+
waylineCoordinateSysParam: WaylineCoordinateSysParam;
|
|
725
|
+
autoFlightSpeed: MetersPerSecond;
|
|
726
|
+
payloadParam?: PayloadParam;
|
|
727
|
+
caliFlightEnable: boolean;
|
|
728
|
+
shootType: ShootType;
|
|
729
|
+
direction: Degrees;
|
|
730
|
+
/** Float meters (vs integer in mapping2d/3d). */
|
|
731
|
+
margin: number;
|
|
732
|
+
singleLineEnable: boolean;
|
|
733
|
+
cuttingDistance: number;
|
|
734
|
+
boundaryOptimEnable: boolean;
|
|
735
|
+
leftExtend: number;
|
|
736
|
+
rightExtend: number;
|
|
737
|
+
includeCenterEnable: boolean;
|
|
738
|
+
overlap: Overlap;
|
|
739
|
+
ellipsoidHeight: Meters;
|
|
740
|
+
height: Meters;
|
|
741
|
+
/** When true, altitudes are read from LineString triples. */
|
|
742
|
+
stripUseTemplateAltitude: boolean;
|
|
743
|
+
Placemark: TemplateLineStringPlacemark;
|
|
744
|
+
}
|
|
745
|
+
//#endregion
|
|
746
|
+
//#region src/types/waylines.d.ts
|
|
747
|
+
/**
|
|
748
|
+
* `waylines.wpml` document. Mirrors `<kml><Document>` structure.
|
|
749
|
+
* See `docs/kmz/waylines-wpml.html`.
|
|
750
|
+
*
|
|
751
|
+
* Cardinality: `Folder` is `1..*` — `mapping3d` templates expand to 5 Folders
|
|
752
|
+
* (1 ortho + 4 oblique).
|
|
753
|
+
*/
|
|
754
|
+
interface Waylines {
|
|
755
|
+
missionConfig: MissionConfig;
|
|
756
|
+
Folder: WaylinesFolder[];
|
|
757
|
+
}
|
|
758
|
+
interface WaylinesFolder {
|
|
759
|
+
/** Links back to template Folder's `templateId`. */
|
|
760
|
+
templateId: number;
|
|
761
|
+
waylineId: number;
|
|
762
|
+
executeHeightMode: ExecuteHeightMode;
|
|
763
|
+
/** Range `[1, 15]`. */
|
|
764
|
+
autoFlightSpeed: MetersPerSecond;
|
|
765
|
+
/**
|
|
766
|
+
* Optional pre-wayline action group.
|
|
767
|
+
* Available on M30/M30T, M3E/M3T/M3M, M3D/M3TD, M4D/M4TD, M4E/M4T.
|
|
768
|
+
*/
|
|
769
|
+
startActionGroup?: ActionGroup;
|
|
770
|
+
Placemark: WaylinesPlacemark[];
|
|
771
|
+
}
|
|
772
|
+
//#endregion
|
|
773
|
+
//#region src/plan/index.d.ts
|
|
774
|
+
/**
|
|
775
|
+
* Compile a high-level `Template` into executable `Waylines`.
|
|
776
|
+
* Dispatch is by `template.Folder.templateType` per the DJI WPML spec.
|
|
777
|
+
*/
|
|
778
|
+
declare function plan(template: Template): Waylines;
|
|
779
|
+
//#endregion
|
|
780
|
+
//#region src/validate/index.d.ts
|
|
781
|
+
/**
|
|
782
|
+
* Run semantic checks against a `Template` or `Waylines` document.
|
|
783
|
+
* Returns a list of issues (`severity: "error" | "warning"`). Empty array = valid.
|
|
784
|
+
*
|
|
785
|
+
* The function is non-throwing by design — callers decide how to react.
|
|
786
|
+
*/
|
|
787
|
+
declare function validate(doc: Template | Waylines): Issue[];
|
|
788
|
+
//#endregion
|
|
789
|
+
export { AccurateShootAction, AccurateShootParam, Action, ActionActuatorFunc, ActionGroup, ActionGroupMode, ActionTrigger, ActionTriggerType, AircraftPathMode, AutoRerouteInfo, CoordinateMode, CustomDirNameAction, CustomDirNameParam, Degrees, DroneEnum, DroneInfo, type ExecuteHeightMode, ExecuteRCLostAction, ExitOnRCLost, FinishAction, FlyToWaylineMode, FocusAction, FocusMode, FocusParam, GimbalEvenlyRotateAction, GimbalEvenlyRotateParam, GimbalHeadingYawBase, GimbalPitchMode, GimbalRotateAction, GimbalRotateMode, GimbalRotateParam, HoverAction, HoverParam, type Issue, KmzError, LensType, LidarReturnMode, LidarScanningMode, LngLat, LngLatHeight, Mapping2dFolder, Mapping2dTemplate, Mapping3dFolder, Mapping3dTemplate, MappingHeadingMode, MappingHeadingParam, MappingStripFolder, MappingStripTemplate, MegaphoneAction, MegaphoneParam, MeteringMode, Meters, MetersPerSecond, MissionConfig, OrientedPhotoMode, OrientedShootAction, OrientedShootParam, Overlap, PanoShotAction, PanoShotParam, PanoShotSubMode, PayloadEnum, PayloadInfo, PayloadParam, PlannerError, PositioningType, RecordPointCloudAction, RecordPointCloudOperate, RecordPointCloudParam, RotateYawAction, RotateYawParam, SearchlightAction, SearchlightParam, ShootType, StartRecordAction, StartRecordParam, StopRecordAction, StopRecordParam, TakePhotoAction, TakePhotoParam, Template, TemplateHeightMode, TemplateLineStringPlacemark, TemplatePolygonPlacemark, TemplateType, TemplateWaypointPlacemark, WaylineCoordinateSysParam, Waylines, WaylinesFolder, WaylinesPlacemark, WaypointFolder, WaypointHeadingMode, WaypointHeadingParam, WaypointHeadingPathMode, WaypointTemplate, WaypointTurnMode, WaypointTurnParam, ZoomAction, ZoomParam, degrees, meters, metersPerSecond, plan, validate };
|