@lumikmz/kmz 0.10.0 → 0.11.1
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/dist/index.d.mts +177 -130
- package/dist/index.mjs +367 -117
- package/package.json +2 -3
- package/src/plan/geometry.test.ts +1 -1
- package/src/plan/plan-mapping-strip-corners.test.ts +349 -0
- package/src/plan/plan-mapping-strip.test.ts +134 -3
- package/src/plan/plan-mapping-strip.ts +366 -159
- package/src/plan/plan-target-detection.test.ts +44 -1
- package/src/plan/plan-target-detection.ts +27 -2
- package/src/plan/plan.test.ts +1 -1
- package/src/plan/strip-route-order.test.ts +241 -0
- package/src/plan/strip-route-order.ts +192 -0
- package/src/types/action.ts +26 -0
- package/src/types/drone-payload.ts +2 -0
- package/src/types/enums.ts +1 -0
- package/src/types/placemark.ts +4 -1
- package/vite.config.ts +7 -0
package/dist/index.d.mts
CHANGED
|
@@ -2,77 +2,91 @@
|
|
|
2
2
|
type Brand<T, B> = T & {
|
|
3
3
|
readonly __brand: B;
|
|
4
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 {
|
|
5
|
+
export type Meters = Brand<number, "Meters">;
|
|
6
|
+
export type MetersPerSecond = Brand<number, "MetersPerSecond">;
|
|
7
|
+
export type Degrees = Brand<number, "Degrees">;
|
|
8
|
+
export declare const meters: (n: number) => Meters;
|
|
9
|
+
export declare const metersPerSecond: (n: number) => MetersPerSecond;
|
|
10
|
+
export declare const degrees: (n: number) => Degrees;
|
|
11
|
+
export interface LngLat {
|
|
12
12
|
readonly lng: number;
|
|
13
13
|
readonly lat: number;
|
|
14
14
|
}
|
|
15
|
-
interface LngLatHeight {
|
|
15
|
+
export interface LngLatHeight {
|
|
16
16
|
readonly lng: number;
|
|
17
17
|
readonly lat: number;
|
|
18
18
|
readonly height: Meters;
|
|
19
19
|
}
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/types/errors.d.ts
|
|
22
|
-
declare class KmzError extends Error {
|
|
22
|
+
export declare class KmzError extends Error {
|
|
23
23
|
constructor(message: string);
|
|
24
24
|
}
|
|
25
|
-
declare class PlannerError extends KmzError {
|
|
25
|
+
export declare class PlannerError extends KmzError {
|
|
26
26
|
constructor(message: string);
|
|
27
27
|
}
|
|
28
|
-
interface Issue {
|
|
28
|
+
export interface Issue {
|
|
29
29
|
path: string;
|
|
30
30
|
message: string;
|
|
31
31
|
severity: "error" | "warning";
|
|
32
32
|
}
|
|
33
33
|
//#endregion
|
|
34
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" | "targetdetection";
|
|
40
|
-
type CoordinateMode = "WGS84";
|
|
35
|
+
export type FlyToWaylineMode = "safely" | "pointToPoint";
|
|
36
|
+
export type FinishAction = "goHome" | "noAction" | "autoLand" | "gotoFirstWaypoint";
|
|
37
|
+
export type ExitOnRCLost = "goContinue" | "executeLostAction";
|
|
38
|
+
export type ExecuteRCLostAction = "goBack" | "landing" | "hover";
|
|
39
|
+
export type TemplateType = "waypoint" | "mapping2d" | "mapping3d" | "mappingStrip" | "targetdetection";
|
|
40
|
+
export type CoordinateMode = "WGS84";
|
|
41
41
|
/** Used in template.kml `waylineCoordinateSysParam.heightMode`. */
|
|
42
|
-
type TemplateHeightMode = "EGM96" | "relativeToStartPoint" | "aboveGroundLevel" | "realTimeFollowSurface";
|
|
42
|
+
export type TemplateHeightMode = "EGM96" | "relativeToStartPoint" | "aboveGroundLevel" | "realTimeFollowSurface";
|
|
43
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";
|
|
44
|
+
export type ExecuteHeightMode = "WGS84" | "relativeToStartPoint" | "realTimeFollowSurface";
|
|
45
|
+
export type PositioningType = "GPS" | "RTKBaseStation" | "QianXun" | "Custom";
|
|
46
|
+
export type WaypointTurnMode = "coordinateTurn" | "toPointAndStopWithDiscontinuityCurvature" | "toPointAndStopWithContinuityCurvature" | "toPointAndPassWithContinuityCurvature";
|
|
47
|
+
export type WaypointHeadingMode = "followWayline" | "manually" | "fixed" | "smoothTransition" | "towardPOI";
|
|
48
48
|
/** Spec typo preserved: `followBadArc` (intended "shortest path / smaller arc"). */
|
|
49
|
-
type WaypointHeadingPathMode = "clockwise" | "counterClockwise" | "followBadArc";
|
|
49
|
+
export type WaypointHeadingPathMode = "clockwise" | "counterClockwise" | "followBadArc";
|
|
50
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";
|
|
51
|
+
export type GimbalPitchMode = "manual" | "usePointSetting" | "fixed";
|
|
52
|
+
export type ShootType = "time" | "distance";
|
|
53
|
+
export type MappingHeadingMode = "fixed" | "followWayline";
|
|
54
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" | "betweenAdjacentPointsIncludeFirstPoint" | "multipleTiming" | "multipleDistance";
|
|
62
|
-
type ActionActuatorFunc = "takePhoto" | "startRecord" | "stopRecord" | "focus" | "zoom" | "customDirName" | "gimbalRotate" | "rotateYaw" | "hover" | "gimbalEvenlyRotate" | "accurateShoot" | "orientedShoot" | "panoShot" | "recordPointCloud" | "megaphone" | "searchlight"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
55
|
+
export type LensType = "wide" | "zoom" | "ir" | "narrow_band" | "visable";
|
|
56
|
+
export type FocusMode = "firstPoint" | "custom";
|
|
57
|
+
export type MeteringMode = "average" | "spot";
|
|
58
|
+
export type LidarReturnMode = "singleReturnStrongest" | "dualReturn" | "tripleReturn";
|
|
59
|
+
export type LidarScanningMode = "repetitive" | "nonRepetitive";
|
|
60
|
+
export type ActionGroupMode = "sequence";
|
|
61
|
+
export type ActionTriggerType = "reachPoint" | "betweenAdjacentPoints" | "betweenAdjacentPointsIncludeFirstPoint" | "multipleTiming" | "multipleDistance";
|
|
62
|
+
export type ActionActuatorFunc = "targetDetection" | "takePhoto" | "startRecord" | "stopRecord" | "focus" | "zoom" | "customDirName" | "gimbalRotate" | "rotateYaw" | "hover" | "gimbalEvenlyRotate" | "accurateShoot" | "orientedShoot" | "panoShot" | "recordPointCloud" | "megaphone" | "searchlight" |
|
|
63
|
+
/** ⚠️ NON-SPEC — observed in real DJI KMZ exports, absent from WPML 1.15 docs. */
|
|
64
|
+
"startSmartOblique" |
|
|
65
|
+
/** ⚠️ NON-SPEC — observed in real DJI KMZ exports, absent from WPML 1.15 docs. */
|
|
66
|
+
"stopSmartOblique" |
|
|
67
|
+
/** Starts time-lapse (interval) shooting for a mapping strip. */
|
|
68
|
+
"startTimeLapse" |
|
|
69
|
+
/** Stops time-lapse shooting. */
|
|
70
|
+
"stopTimeLapse" |
|
|
71
|
+
/** Locks gimbal angle during a mapping strip. */
|
|
72
|
+
"gimbalAngleLock" |
|
|
73
|
+
/** Unlocks gimbal angle (no params in XML). */
|
|
74
|
+
"gimbalAngleUnlock" |
|
|
75
|
+
/** Sets camera focus mode (manual / auto). */
|
|
76
|
+
"setFocusType";
|
|
77
|
+
export type GimbalHeadingYawBase = "north" | "aircraft";
|
|
78
|
+
export type GimbalRotateMode = "absoluteAngle";
|
|
79
|
+
export type AircraftPathMode = "clockwise" | "counterClockwise";
|
|
80
|
+
export type RecordPointCloudOperate = "startRecord" | "pauseRecord" | "resumeRecord" | "stopRecord";
|
|
81
|
+
export type PanoShotSubMode = "panoShot_360";
|
|
82
|
+
export type OrientedPhotoMode = "normalPhoto" | "lowLightSmartShooting";
|
|
69
83
|
//#endregion
|
|
70
84
|
//#region src/types/drone-payload.d.ts
|
|
71
|
-
interface DroneInfo {
|
|
85
|
+
export interface DroneInfo {
|
|
72
86
|
droneEnumValue: number;
|
|
73
87
|
droneSubEnumValue?: number;
|
|
74
88
|
}
|
|
75
|
-
interface PayloadInfo {
|
|
89
|
+
export interface PayloadInfo {
|
|
76
90
|
payloadEnumValue: number;
|
|
77
91
|
/**
|
|
78
92
|
* Payload sub-type (`type-subtype-gimbalindex`, the middle field). Non-standard
|
|
@@ -81,9 +95,11 @@ interface PayloadInfo {
|
|
|
81
95
|
*/
|
|
82
96
|
payloadSubEnumValue?: number;
|
|
83
97
|
payloadPositionIndex: number;
|
|
98
|
+
/** FlightHub 2 patrol-camera selection, in 35mm-equivalent millimeters. */
|
|
99
|
+
equivalentFocalLength?: number;
|
|
84
100
|
}
|
|
85
101
|
/** Aircraft `{ droneEnumValue, droneSubEnumValue }` tuples. */
|
|
86
|
-
declare const DroneEnum: {
|
|
102
|
+
export declare const DroneEnum: {
|
|
87
103
|
readonly M400: {
|
|
88
104
|
readonly droneEnumValue: 103;
|
|
89
105
|
readonly droneSubEnumValue: 0;
|
|
@@ -142,7 +158,7 @@ declare const DroneEnum: {
|
|
|
142
158
|
};
|
|
143
159
|
};
|
|
144
160
|
/** Payload `{ payloadEnumValue, payloadPositionIndex }` tuples for common cameras. */
|
|
145
|
-
declare const PayloadEnum: {
|
|
161
|
+
export declare const PayloadEnum: {
|
|
146
162
|
readonly M30Camera: {
|
|
147
163
|
readonly payloadEnumValue: 52;
|
|
148
164
|
readonly payloadSubEnumValue: 0;
|
|
@@ -249,7 +265,7 @@ declare const PayloadEnum: {
|
|
|
249
265
|
* `wpml:missionConfig` — shared between template.kml and waylines.wpml.
|
|
250
266
|
* See `docs/kmz/common-element.html` §missionConfig.
|
|
251
267
|
*/
|
|
252
|
-
interface MissionConfig {
|
|
268
|
+
export interface MissionConfig {
|
|
253
269
|
flyToWaylineMode: FlyToWaylineMode;
|
|
254
270
|
finishAction: FinishAction;
|
|
255
271
|
exitOnRCLost: ExitOnRCLost;
|
|
@@ -269,7 +285,7 @@ interface MissionConfig {
|
|
|
269
285
|
/** Only M3D/M3TD, M4D/M4TD, M4E/M4T. */
|
|
270
286
|
autoRerouteInfo?: AutoRerouteInfo;
|
|
271
287
|
}
|
|
272
|
-
interface AutoRerouteInfo {
|
|
288
|
+
export interface AutoRerouteInfo {
|
|
273
289
|
missionAutoRerouteMode: boolean;
|
|
274
290
|
transitionalAutoRerouteMode: boolean;
|
|
275
291
|
}
|
|
@@ -277,7 +293,7 @@ interface AutoRerouteInfo {
|
|
|
277
293
|
* `wpml:payloadParam` — per-payload imaging settings.
|
|
278
294
|
* Lives under template `Folder`.
|
|
279
295
|
*/
|
|
280
|
-
interface PayloadParam {
|
|
296
|
+
export interface PayloadParam {
|
|
281
297
|
payloadPositionIndex: number;
|
|
282
298
|
focusMode?: FocusMode;
|
|
283
299
|
meteringMode?: MeteringMode;
|
|
@@ -300,7 +316,7 @@ interface PayloadParam {
|
|
|
300
316
|
* `wpml:waypointHeadingParam` & `wpml:globalWaypointHeadingParam`.
|
|
301
317
|
* See `docs/kmz/common-element.html` §waypointHeadingParam.
|
|
302
318
|
*/
|
|
303
|
-
interface WaypointHeadingParam {
|
|
319
|
+
export interface WaypointHeadingParam {
|
|
304
320
|
waypointHeadingMode: WaypointHeadingMode;
|
|
305
321
|
/** Required iff `waypointHeadingMode === "smoothTransition"`. Range `[-180, 180]`. */
|
|
306
322
|
waypointHeadingAngle?: Degrees;
|
|
@@ -319,7 +335,7 @@ interface WaypointHeadingParam {
|
|
|
319
335
|
* `wpml:waypointTurnParam`.
|
|
320
336
|
* See `docs/kmz/common-element.html` §waypointTurnParam.
|
|
321
337
|
*/
|
|
322
|
-
interface WaypointTurnParam {
|
|
338
|
+
export interface WaypointTurnParam {
|
|
323
339
|
waypointTurnMode: WaypointTurnMode;
|
|
324
340
|
/**
|
|
325
341
|
* Required iff `waypointTurnMode === "coordinateTurn"`
|
|
@@ -331,7 +347,7 @@ interface WaypointTurnParam {
|
|
|
331
347
|
* `wpml:waylineCoordinateSysParam`.
|
|
332
348
|
* Mapping templates require globalShootHeight + surfaceFollowModeEnable.
|
|
333
349
|
*/
|
|
334
|
-
interface WaylineCoordinateSysParam {
|
|
350
|
+
export interface WaylineCoordinateSysParam {
|
|
335
351
|
/** Currently only `"WGS84"` is allowed. */
|
|
336
352
|
coordinateMode: CoordinateMode;
|
|
337
353
|
heightMode: TemplateHeightMode;
|
|
@@ -358,7 +374,7 @@ interface WaylineCoordinateSysParam {
|
|
|
358
374
|
* `wpml:mappingHeadingParam` — only on `mapping2d` Folder
|
|
359
375
|
* (M3E/M3T/M3M, M3D/M3TD, M4D/M4TD, M4E/M4T).
|
|
360
376
|
*/
|
|
361
|
-
interface MappingHeadingParam {
|
|
377
|
+
export interface MappingHeadingParam {
|
|
362
378
|
mappingHeadingMode: MappingHeadingMode;
|
|
363
379
|
/** Required iff `mappingHeadingMode === "fixed"`. Range `[0, 360]`. */
|
|
364
380
|
mappingHeadingAngle?: Degrees;
|
|
@@ -367,7 +383,7 @@ interface MappingHeadingParam {
|
|
|
367
383
|
* `wpml:overlap` — child of mapping2d / mapping3d / mappingStrip Folders.
|
|
368
384
|
* All fields individually optional in spec but at least one ortho pair is required in practice.
|
|
369
385
|
*/
|
|
370
|
-
interface Overlap {
|
|
386
|
+
export interface Overlap {
|
|
371
387
|
orthoLidarOverlapH?: number;
|
|
372
388
|
orthoLidarOverlapW?: number;
|
|
373
389
|
orthoCameraOverlapH?: number;
|
|
@@ -385,7 +401,7 @@ interface Overlap {
|
|
|
385
401
|
* - `actionGroupId` is unique within the entire KMZ (monotonically from 0).
|
|
386
402
|
* - `actionId` is scoped within its group.
|
|
387
403
|
*/
|
|
388
|
-
interface ActionGroup {
|
|
404
|
+
export interface ActionGroup {
|
|
389
405
|
actionGroupId: number;
|
|
390
406
|
actionGroupStartIndex: number;
|
|
391
407
|
actionGroupEndIndex: number;
|
|
@@ -393,38 +409,62 @@ interface ActionGroup {
|
|
|
393
409
|
actionTrigger: ActionTrigger;
|
|
394
410
|
action: Action[];
|
|
395
411
|
}
|
|
396
|
-
interface ActionTrigger {
|
|
412
|
+
export interface ActionTrigger {
|
|
397
413
|
actionTriggerType: ActionTriggerType;
|
|
398
414
|
/** Seconds for `multipleTiming`, meters for `multipleDistance`. */
|
|
399
415
|
actionTriggerParam?: number;
|
|
400
416
|
}
|
|
401
417
|
/** Discriminated by `actionActuatorFunc`. */
|
|
402
|
-
type Action = TakePhotoAction | StartRecordAction | StopRecordAction | FocusAction | ZoomAction | CustomDirNameAction | GimbalRotateAction | RotateYawAction | HoverAction | GimbalEvenlyRotateAction | AccurateShootAction | OrientedShootAction | PanoShotAction | RecordPointCloudAction | MegaphoneAction | SearchlightAction | StartSmartObliqueAction | StopSmartObliqueAction | StartTimeLapseAction | StopTimeLapseAction | GimbalAngleLockAction | GimbalAngleUnlockAction | SetFocusTypeAction;
|
|
418
|
+
export type Action = TargetDetectionAction | TakePhotoAction | StartRecordAction | StopRecordAction | FocusAction | ZoomAction | CustomDirNameAction | GimbalRotateAction | RotateYawAction | HoverAction | GimbalEvenlyRotateAction | AccurateShootAction | OrientedShootAction | PanoShotAction | RecordPointCloudAction | MegaphoneAction | SearchlightAction | StartSmartObliqueAction | StopSmartObliqueAction | StartTimeLapseAction | StopTimeLapseAction | GimbalAngleLockAction | GimbalAngleUnlockAction | SetFocusTypeAction;
|
|
403
419
|
interface ActionBase<F extends string, P> {
|
|
404
420
|
actionId: number;
|
|
405
421
|
actionActuatorFunc: F;
|
|
406
422
|
actionActuatorFuncParam: P;
|
|
407
423
|
}
|
|
408
|
-
interface
|
|
424
|
+
export interface TargetDetectionParam {
|
|
425
|
+
focalLength?: number;
|
|
426
|
+
payloadPositionIndex: number;
|
|
427
|
+
useGlobalPayloadLensIndex: boolean;
|
|
428
|
+
payloadLensIndex: LensType[];
|
|
429
|
+
actionUUID: string;
|
|
430
|
+
irGainMode?: string;
|
|
431
|
+
irColorPalette?: string;
|
|
432
|
+
customTitle: string;
|
|
433
|
+
customText: string;
|
|
434
|
+
modelIndex: number;
|
|
435
|
+
modelScore: number;
|
|
436
|
+
alarmInterval: number;
|
|
437
|
+
useThirdModel: boolean;
|
|
438
|
+
algorithmType: string;
|
|
439
|
+
targetParam: {
|
|
440
|
+
maxThreshold: number;
|
|
441
|
+
minThreshold: number;
|
|
442
|
+
useMaxThreshold: boolean;
|
|
443
|
+
useMinThreshold: boolean;
|
|
444
|
+
targetType: string;
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
export type TargetDetectionAction = ActionBase<"targetDetection", TargetDetectionParam>;
|
|
448
|
+
export interface TakePhotoParam {
|
|
409
449
|
payloadPositionIndex: number;
|
|
410
450
|
fileSuffix?: string;
|
|
411
451
|
payloadLensIndex?: LensType[];
|
|
412
452
|
useGlobalPayloadLensIndex: boolean;
|
|
413
453
|
}
|
|
414
|
-
type TakePhotoAction = ActionBase<"takePhoto", TakePhotoParam>;
|
|
415
|
-
interface StartRecordParam {
|
|
454
|
+
export type TakePhotoAction = ActionBase<"takePhoto", TakePhotoParam>;
|
|
455
|
+
export interface StartRecordParam {
|
|
416
456
|
payloadPositionIndex: number;
|
|
417
457
|
fileSuffix?: string;
|
|
418
458
|
payloadLensIndex?: LensType[];
|
|
419
459
|
useGlobalPayloadLensIndex: boolean;
|
|
420
460
|
}
|
|
421
|
-
type StartRecordAction = ActionBase<"startRecord", StartRecordParam>;
|
|
422
|
-
interface StopRecordParam {
|
|
461
|
+
export type StartRecordAction = ActionBase<"startRecord", StartRecordParam>;
|
|
462
|
+
export interface StopRecordParam {
|
|
423
463
|
payloadPositionIndex: number;
|
|
424
464
|
payloadLensIndex?: LensType[];
|
|
425
465
|
}
|
|
426
|
-
type StopRecordAction = ActionBase<"stopRecord", StopRecordParam>;
|
|
427
|
-
interface FocusParam {
|
|
466
|
+
export type StopRecordAction = ActionBase<"stopRecord", StopRecordParam>;
|
|
467
|
+
export interface FocusParam {
|
|
428
468
|
payloadPositionIndex: number;
|
|
429
469
|
isPointFocus: boolean;
|
|
430
470
|
focusX: number;
|
|
@@ -438,19 +478,19 @@ interface FocusParam {
|
|
|
438
478
|
/** Calibration focus flag, observed in mapping WPML exports. */
|
|
439
479
|
isCalibrationFocus?: boolean;
|
|
440
480
|
}
|
|
441
|
-
type FocusAction = ActionBase<"focus", FocusParam>;
|
|
442
|
-
interface ZoomParam {
|
|
481
|
+
export type FocusAction = ActionBase<"focus", FocusParam>;
|
|
482
|
+
export interface ZoomParam {
|
|
443
483
|
payloadPositionIndex: number;
|
|
444
484
|
/** mm, > 0. */
|
|
445
485
|
focalLength: number;
|
|
446
486
|
}
|
|
447
|
-
type ZoomAction = ActionBase<"zoom", ZoomParam>;
|
|
448
|
-
interface CustomDirNameParam {
|
|
487
|
+
export type ZoomAction = ActionBase<"zoom", ZoomParam>;
|
|
488
|
+
export interface CustomDirNameParam {
|
|
449
489
|
payloadPositionIndex: number;
|
|
450
490
|
directoryName: string;
|
|
451
491
|
}
|
|
452
|
-
type CustomDirNameAction = ActionBase<"customDirName", CustomDirNameParam>;
|
|
453
|
-
interface GimbalRotateParam {
|
|
492
|
+
export type CustomDirNameAction = ActionBase<"customDirName", CustomDirNameParam>;
|
|
493
|
+
export interface GimbalRotateParam {
|
|
454
494
|
payloadPositionIndex: number;
|
|
455
495
|
gimbalHeadingYawBase: GimbalHeadingYawBase;
|
|
456
496
|
gimbalRotateMode: GimbalRotateMode;
|
|
@@ -464,27 +504,27 @@ interface GimbalRotateParam {
|
|
|
464
504
|
/** seconds */
|
|
465
505
|
gimbalRotateTime: number;
|
|
466
506
|
}
|
|
467
|
-
type GimbalRotateAction = ActionBase<"gimbalRotate", GimbalRotateParam>;
|
|
468
|
-
interface RotateYawParam {
|
|
507
|
+
export type GimbalRotateAction = ActionBase<"gimbalRotate", GimbalRotateParam>;
|
|
508
|
+
export interface RotateYawParam {
|
|
469
509
|
/** `[-180, 180]`, 0=N, 90=E, -90=W, ±180=S. */
|
|
470
510
|
aircraftHeading: Degrees;
|
|
471
511
|
/** Required on M300/M350. */
|
|
472
512
|
aircraftPathMode?: AircraftPathMode;
|
|
473
513
|
}
|
|
474
|
-
type RotateYawAction = ActionBase<"rotateYaw", RotateYawParam>;
|
|
475
|
-
interface HoverParam {
|
|
514
|
+
export type RotateYawAction = ActionBase<"rotateYaw", RotateYawParam>;
|
|
515
|
+
export interface HoverParam {
|
|
476
516
|
/** seconds, > 0. */
|
|
477
517
|
hoverTime: number;
|
|
478
518
|
}
|
|
479
|
-
type HoverAction = ActionBase<"hover", HoverParam>;
|
|
480
|
-
interface GimbalEvenlyRotateParam {
|
|
519
|
+
export type HoverAction = ActionBase<"hover", HoverParam>;
|
|
520
|
+
export interface GimbalEvenlyRotateParam {
|
|
481
521
|
payloadPositionIndex: number;
|
|
482
522
|
gimbalPitchRotateAngle: Degrees;
|
|
483
523
|
}
|
|
484
524
|
/** Must be paired with `actionTriggerType === "betweenAdjacentPoints"`. */
|
|
485
|
-
type GimbalEvenlyRotateAction = ActionBase<"gimbalEvenlyRotate", GimbalEvenlyRotateParam>;
|
|
525
|
+
export type GimbalEvenlyRotateAction = ActionBase<"gimbalEvenlyRotate", GimbalEvenlyRotateParam>;
|
|
486
526
|
/** Deprecated for M30/M30T after firmware V06.01.10.02. Prefer `orientedShoot`. */
|
|
487
|
-
interface AccurateShootParam {
|
|
527
|
+
export interface AccurateShootParam {
|
|
488
528
|
gimbalPitchRotateAngle: Degrees;
|
|
489
529
|
gimbalYawRotateAngle: Degrees;
|
|
490
530
|
focusX: number;
|
|
@@ -512,8 +552,8 @@ interface AccurateShootParam {
|
|
|
512
552
|
accurateCameraShutterTime?: number;
|
|
513
553
|
accurateCameraISO?: number;
|
|
514
554
|
}
|
|
515
|
-
type AccurateShootAction = ActionBase<"accurateShoot", AccurateShootParam>;
|
|
516
|
-
interface OrientedShootParam {
|
|
555
|
+
export type AccurateShootAction = ActionBase<"accurateShoot", AccurateShootParam>;
|
|
556
|
+
export interface OrientedShootParam {
|
|
517
557
|
gimbalPitchRotateAngle: Degrees;
|
|
518
558
|
gimbalYawRotateAngle: Degrees;
|
|
519
559
|
focusX: number;
|
|
@@ -543,8 +583,8 @@ interface OrientedShootParam {
|
|
|
543
583
|
orientedCameraISO: number;
|
|
544
584
|
orientedPhotoMode: OrientedPhotoMode;
|
|
545
585
|
}
|
|
546
|
-
type OrientedShootAction = ActionBase<"orientedShoot", OrientedShootParam>;
|
|
547
|
-
interface PanoShotParam {
|
|
586
|
+
export type OrientedShootAction = ActionBase<"orientedShoot", OrientedShootParam>;
|
|
587
|
+
export interface PanoShotParam {
|
|
548
588
|
payloadPositionIndex?: number;
|
|
549
589
|
payloadLensIndex?: LensType[];
|
|
550
590
|
useGlobalPayloadLensIndex?: boolean;
|
|
@@ -552,14 +592,14 @@ interface PanoShotParam {
|
|
|
552
592
|
actionUUID?: string;
|
|
553
593
|
panoShotSubMode: PanoShotSubMode;
|
|
554
594
|
}
|
|
555
|
-
type PanoShotAction = ActionBase<"panoShot", PanoShotParam>;
|
|
556
|
-
interface RecordPointCloudParam {
|
|
595
|
+
export type PanoShotAction = ActionBase<"panoShot", PanoShotParam>;
|
|
596
|
+
export interface RecordPointCloudParam {
|
|
557
597
|
payloadPositionIndex: number;
|
|
558
598
|
recordPointCloudOperate: RecordPointCloudOperate;
|
|
559
599
|
}
|
|
560
|
-
type RecordPointCloudAction = ActionBase<"recordPointCloud", RecordPointCloudParam>;
|
|
600
|
+
export type RecordPointCloudAction = ActionBase<"recordPointCloud", RecordPointCloudParam>;
|
|
561
601
|
/** M4D/M4TD only. */
|
|
562
|
-
interface MegaphoneParam {
|
|
602
|
+
export interface MegaphoneParam {
|
|
563
603
|
payloadPositionIndex: number;
|
|
564
604
|
actionUUID: string;
|
|
565
605
|
/** 0 = start, 1 = stop. */
|
|
@@ -577,8 +617,8 @@ interface MegaphoneParam {
|
|
|
577
617
|
/** Non-spec DJI Pilot TTS params observed in M4D/M4TD megaphone actions. */
|
|
578
618
|
ttsparam?: MegaphoneTtsParam;
|
|
579
619
|
}
|
|
580
|
-
type MegaphoneAction = ActionBase<"megaphone", MegaphoneParam>;
|
|
581
|
-
interface MegaphoneTtsParam {
|
|
620
|
+
export type MegaphoneAction = ActionBase<"megaphone", MegaphoneParam>;
|
|
621
|
+
export interface MegaphoneTtsParam {
|
|
582
622
|
text: string;
|
|
583
623
|
role: "male" | "female";
|
|
584
624
|
language: "CN";
|
|
@@ -588,7 +628,7 @@ interface MegaphoneTtsParam {
|
|
|
588
628
|
speed: number;
|
|
589
629
|
}
|
|
590
630
|
/** M4D/M4TD only — starts gimbal swing in smart-oblique mode. */
|
|
591
|
-
interface SmartObliquePoint {
|
|
631
|
+
export interface SmartObliquePoint {
|
|
592
632
|
/** seconds before this pose starts; DJI exports currently use 0. */
|
|
593
633
|
smartObliqueRunningTime: number;
|
|
594
634
|
/** seconds to hold this pose for smart-oblique shooting. */
|
|
@@ -597,20 +637,20 @@ interface SmartObliquePoint {
|
|
|
597
637
|
smartObliqueEulerRoll: Degrees;
|
|
598
638
|
smartObliqueEulerYaw: Degrees;
|
|
599
639
|
}
|
|
600
|
-
interface StartSmartObliqueParam {
|
|
640
|
+
export interface StartSmartObliqueParam {
|
|
601
641
|
/** Observed in DJI exports; older generated files may omit it. */
|
|
602
642
|
smartObliqueCycleMode?: "unlimited";
|
|
603
643
|
payloadPositionIndex: number;
|
|
604
644
|
smartObliquePoint?: SmartObliquePoint[];
|
|
605
645
|
}
|
|
606
|
-
type StartSmartObliqueAction = ActionBase<"startSmartOblique", StartSmartObliqueParam>;
|
|
646
|
+
export type StartSmartObliqueAction = ActionBase<"startSmartOblique", StartSmartObliqueParam>;
|
|
607
647
|
/** M4D/M4TD only — stops gimbal swing in smart-oblique mode. */
|
|
608
|
-
interface StopSmartObliqueParam {
|
|
648
|
+
export interface StopSmartObliqueParam {
|
|
609
649
|
payloadPositionIndex: number;
|
|
610
650
|
}
|
|
611
|
-
type StopSmartObliqueAction = ActionBase<"stopSmartOblique", StopSmartObliqueParam>;
|
|
651
|
+
export type StopSmartObliqueAction = ActionBase<"stopSmartOblique", StopSmartObliqueParam>;
|
|
612
652
|
/** Starts interval (time-lapse) shooting for a mapping strip. */
|
|
613
|
-
interface StartTimeLapseParam {
|
|
653
|
+
export interface StartTimeLapseParam {
|
|
614
654
|
payloadPositionIndex: number;
|
|
615
655
|
useGlobalPayloadLensIndex: boolean;
|
|
616
656
|
/** Comma-separated in WPML; may contain visible and infrared lenses together. */
|
|
@@ -618,35 +658,35 @@ interface StartTimeLapseParam {
|
|
|
618
658
|
/** Minimum shoot interval in seconds. Derived from `forwardGroundSpacing / speed`. */
|
|
619
659
|
minShootInterval: number;
|
|
620
660
|
}
|
|
621
|
-
type StartTimeLapseAction = ActionBase<"startTimeLapse", StartTimeLapseParam>;
|
|
661
|
+
export type StartTimeLapseAction = ActionBase<"startTimeLapse", StartTimeLapseParam>;
|
|
622
662
|
/** Stops interval shooting for a mapping strip. */
|
|
623
|
-
interface StopTimeLapseParam {
|
|
663
|
+
export interface StopTimeLapseParam {
|
|
624
664
|
payloadPositionIndex: number;
|
|
625
665
|
payloadLensIndex: LensType[];
|
|
626
666
|
}
|
|
627
|
-
type StopTimeLapseAction = ActionBase<"stopTimeLapse", StopTimeLapseParam>;
|
|
667
|
+
export type StopTimeLapseAction = ActionBase<"stopTimeLapse", StopTimeLapseParam>;
|
|
628
668
|
/** Locks gimbal pitch angle during a mapping strip. */
|
|
629
|
-
interface GimbalAngleLockParam {
|
|
669
|
+
export interface GimbalAngleLockParam {
|
|
630
670
|
payloadPositionIndex: number;
|
|
631
671
|
}
|
|
632
|
-
type GimbalAngleLockAction = ActionBase<"gimbalAngleLock", GimbalAngleLockParam>;
|
|
672
|
+
export type GimbalAngleLockAction = ActionBase<"gimbalAngleLock", GimbalAngleLockParam>;
|
|
633
673
|
/**
|
|
634
674
|
* Unlocks gimbal angle after a mapping strip ends.
|
|
635
675
|
* ⚠️ No `actionActuatorFuncParam` element is emitted in XML — this action has no params.
|
|
636
676
|
*/
|
|
637
|
-
interface GimbalAngleUnlockAction {
|
|
677
|
+
export interface GimbalAngleUnlockAction {
|
|
638
678
|
actionId: number;
|
|
639
679
|
actionActuatorFunc: "gimbalAngleUnlock";
|
|
640
680
|
}
|
|
641
681
|
/** Sets camera focus mode (e.g. "manual") before a mapping run. */
|
|
642
|
-
interface SetFocusTypeParam {
|
|
682
|
+
export interface SetFocusTypeParam {
|
|
643
683
|
payloadPositionIndex: number;
|
|
644
684
|
/** e.g. `"manual"`, `"auto"`. */
|
|
645
685
|
cameraFocusType: string;
|
|
646
686
|
}
|
|
647
|
-
type SetFocusTypeAction = ActionBase<"setFocusType", SetFocusTypeParam>;
|
|
687
|
+
export type SetFocusTypeAction = ActionBase<"setFocusType", SetFocusTypeParam>;
|
|
648
688
|
/** M4D/M4TD only. */
|
|
649
|
-
interface SearchlightParam {
|
|
689
|
+
export interface SearchlightParam {
|
|
650
690
|
payloadPositionIndex: number;
|
|
651
691
|
actionUUID?: string;
|
|
652
692
|
/** 0 = off, 1 = illuminate, 2 = flash. */
|
|
@@ -654,7 +694,7 @@ interface SearchlightParam {
|
|
|
654
694
|
/** 0–100. */
|
|
655
695
|
searchlightBrightness: number;
|
|
656
696
|
}
|
|
657
|
-
type SearchlightAction = ActionBase<"searchlight", SearchlightParam>;
|
|
697
|
+
export type SearchlightAction = ActionBase<"searchlight", SearchlightParam>;
|
|
658
698
|
//#endregion
|
|
659
699
|
//#region src/types/placemark.d.ts
|
|
660
700
|
/**
|
|
@@ -662,7 +702,7 @@ type SearchlightAction = ActionBase<"searchlight", SearchlightParam>;
|
|
|
662
702
|
*
|
|
663
703
|
* Note coordinate order: `Point.coordinates` is `lon,lat` per KML (no altitude).
|
|
664
704
|
*/
|
|
665
|
-
interface TemplateWaypointPlacemark {
|
|
705
|
+
export interface TemplateWaypointPlacemark {
|
|
666
706
|
Point: {
|
|
667
707
|
coordinates: LngLat;
|
|
668
708
|
};
|
|
@@ -693,10 +733,11 @@ interface TemplateWaypointPlacemark {
|
|
|
693
733
|
actionGroup?: ActionGroup[];
|
|
694
734
|
}
|
|
695
735
|
/** Survey-area boundary polygon, shared by mapping2d / mapping3d Placemarks. */
|
|
696
|
-
interface TemplatePolygon {
|
|
736
|
+
export interface TemplatePolygon {
|
|
697
737
|
outerBoundaryIs: {
|
|
698
738
|
LinearRing: {
|
|
699
|
-
/** Space-separated `lon,lat,alt` triples. */
|
|
739
|
+
/** Space-separated `lon,lat,alt` triples. */
|
|
740
|
+
coordinates: string;
|
|
700
741
|
};
|
|
701
742
|
};
|
|
702
743
|
}
|
|
@@ -704,7 +745,7 @@ interface TemplatePolygon {
|
|
|
704
745
|
* `Placemark` inside a `mapping2d` Folder. Per the WPML spec the shooting/mapping
|
|
705
746
|
* params live HERE alongside the polygon — NOT on the Folder.
|
|
706
747
|
*/
|
|
707
|
-
interface Mapping2dPlacemark {
|
|
748
|
+
export interface Mapping2dPlacemark {
|
|
708
749
|
/** M300/M350 only. */
|
|
709
750
|
caliFlightEnable?: boolean;
|
|
710
751
|
elevationOptimizeEnable: boolean;
|
|
@@ -737,7 +778,7 @@ interface Mapping2dPlacemark {
|
|
|
737
778
|
height: Meters;
|
|
738
779
|
}
|
|
739
780
|
/** `Placemark` inside a `mapping3d` (oblique) Folder. Params live here, not on the Folder. */
|
|
740
|
-
interface Mapping3dPlacemark {
|
|
781
|
+
export interface Mapping3dPlacemark {
|
|
741
782
|
caliFlightEnable?: boolean;
|
|
742
783
|
inclinedGimbalPitch: Degrees;
|
|
743
784
|
/** Range `[1, 15]`. */
|
|
@@ -752,7 +793,7 @@ interface Mapping3dPlacemark {
|
|
|
752
793
|
height: Meters;
|
|
753
794
|
}
|
|
754
795
|
/** `Placemark` inside a FlightHub 2 patrol-area `targetdetection` Folder. */
|
|
755
|
-
interface TargetDetectionPlacemark {
|
|
796
|
+
export interface TargetDetectionPlacemark {
|
|
756
797
|
direction: Degrees;
|
|
757
798
|
margin: number;
|
|
758
799
|
gimbalPitchMode: "fixed";
|
|
@@ -763,9 +804,12 @@ interface TargetDetectionPlacemark {
|
|
|
763
804
|
mappingHeadingParam: MappingHeadingParam;
|
|
764
805
|
gimbalPitchAngle: Degrees;
|
|
765
806
|
recordEnable: boolean;
|
|
807
|
+
/** FlightHub 2 always emits this action for patrol-area routes. */
|
|
808
|
+
targetDetectionActionEnable?: boolean;
|
|
809
|
+
action?: TargetDetectionAction;
|
|
766
810
|
}
|
|
767
811
|
/** `Placemark` inside a `mappingStrip` Folder — uses a LineString; params live here. */
|
|
768
|
-
interface MappingStripPlacemark {
|
|
812
|
+
export interface MappingStripPlacemark {
|
|
769
813
|
caliFlightEnable: boolean;
|
|
770
814
|
/** Optional field observed in FlightHub 2 mappingStrip exports. */
|
|
771
815
|
elevationOptimizeEnable?: boolean;
|
|
@@ -784,7 +828,8 @@ interface MappingStripPlacemark {
|
|
|
784
828
|
/** Overlap ratios as percentages `[0, 100]`. */
|
|
785
829
|
overlap: Overlap;
|
|
786
830
|
LineString: {
|
|
787
|
-
/** Space-separated `lon,lat,alt` triples. Alt consumed only when `stripUseTemplateAltitude === true`. */
|
|
831
|
+
/** Space-separated `lon,lat,alt` triples. Alt consumed only when `stripUseTemplateAltitude === true`. */
|
|
832
|
+
coordinates: string;
|
|
788
833
|
};
|
|
789
834
|
ellipsoidHeight: Meters;
|
|
790
835
|
height: Meters;
|
|
@@ -797,7 +842,7 @@ interface MappingStripPlacemark {
|
|
|
797
842
|
* The spec's `useGlobalXxx` switches are template-only — in waylines.wpml the
|
|
798
843
|
* params are inlined unconditionally, so they are required here.
|
|
799
844
|
*/
|
|
800
|
-
interface WaylinesPlacemark {
|
|
845
|
+
export interface WaylinesPlacemark {
|
|
801
846
|
Point: {
|
|
802
847
|
coordinates: LngLat;
|
|
803
848
|
};
|
|
@@ -825,7 +870,7 @@ interface WaylinesPlacemark {
|
|
|
825
870
|
* `template.kml` document. Mirrors `<kml><Document>` structure.
|
|
826
871
|
* See `docs/kmz/template-kml.html`.
|
|
827
872
|
*/
|
|
828
|
-
type Template = WaypointTemplate | Mapping2dTemplate | Mapping3dTemplate | MappingStripTemplate | TargetDetectionTemplate;
|
|
873
|
+
export type Template = WaypointTemplate | Mapping2dTemplate | Mapping3dTemplate | MappingStripTemplate | TargetDetectionTemplate;
|
|
829
874
|
interface TemplateDocumentBase {
|
|
830
875
|
/** Unix milliseconds. */
|
|
831
876
|
author?: string;
|
|
@@ -837,10 +882,10 @@ interface TemplateDocumentBase {
|
|
|
837
882
|
};
|
|
838
883
|
missionConfig: MissionConfig;
|
|
839
884
|
}
|
|
840
|
-
interface WaypointTemplate extends TemplateDocumentBase {
|
|
885
|
+
export interface WaypointTemplate extends TemplateDocumentBase {
|
|
841
886
|
Folder: WaypointFolder;
|
|
842
887
|
}
|
|
843
|
-
interface WaypointFolder {
|
|
888
|
+
export interface WaypointFolder {
|
|
844
889
|
templateType: "waypoint";
|
|
845
890
|
/** Range `[0, 65535]`. */
|
|
846
891
|
templateId: number;
|
|
@@ -861,10 +906,10 @@ interface WaypointFolder {
|
|
|
861
906
|
globalWaypointHeadingParam: WaypointHeadingParam;
|
|
862
907
|
Placemark: TemplateWaypointPlacemark[];
|
|
863
908
|
}
|
|
864
|
-
interface Mapping2dTemplate extends TemplateDocumentBase {
|
|
909
|
+
export interface Mapping2dTemplate extends TemplateDocumentBase {
|
|
865
910
|
Folder: Mapping2dFolder;
|
|
866
911
|
}
|
|
867
|
-
interface Mapping2dFolder {
|
|
912
|
+
export interface Mapping2dFolder {
|
|
868
913
|
templateType: "mapping2d";
|
|
869
914
|
templateId: number;
|
|
870
915
|
waylineCoordinateSysParam: WaylineCoordinateSysParam;
|
|
@@ -873,10 +918,10 @@ interface Mapping2dFolder {
|
|
|
873
918
|
/** Holds the survey polygon AND all shooting/mapping params (per WPML nesting). */
|
|
874
919
|
Placemark: Mapping2dPlacemark;
|
|
875
920
|
}
|
|
876
|
-
interface Mapping3dTemplate extends TemplateDocumentBase {
|
|
921
|
+
export interface Mapping3dTemplate extends TemplateDocumentBase {
|
|
877
922
|
Folder: Mapping3dFolder;
|
|
878
923
|
}
|
|
879
|
-
interface Mapping3dFolder {
|
|
924
|
+
export interface Mapping3dFolder {
|
|
880
925
|
templateType: "mapping3d";
|
|
881
926
|
templateId: number;
|
|
882
927
|
waylineCoordinateSysParam: WaylineCoordinateSysParam;
|
|
@@ -885,10 +930,10 @@ interface Mapping3dFolder {
|
|
|
885
930
|
/** Holds the survey polygon AND all shooting/mapping params. */
|
|
886
931
|
Placemark: Mapping3dPlacemark;
|
|
887
932
|
}
|
|
888
|
-
interface TargetDetectionTemplate extends TemplateDocumentBase {
|
|
933
|
+
export interface TargetDetectionTemplate extends TemplateDocumentBase {
|
|
889
934
|
Folder: TargetDetectionFolder;
|
|
890
935
|
}
|
|
891
|
-
interface TargetDetectionFolder {
|
|
936
|
+
export interface TargetDetectionFolder {
|
|
892
937
|
templateType: "targetdetection";
|
|
893
938
|
templateId: number;
|
|
894
939
|
waylineCoordinateSysParam: WaylineCoordinateSysParam;
|
|
@@ -896,10 +941,10 @@ interface TargetDetectionFolder {
|
|
|
896
941
|
payloadParam?: PayloadParam;
|
|
897
942
|
Placemark: TargetDetectionPlacemark;
|
|
898
943
|
}
|
|
899
|
-
interface MappingStripTemplate extends TemplateDocumentBase {
|
|
944
|
+
export interface MappingStripTemplate extends TemplateDocumentBase {
|
|
900
945
|
Folder: MappingStripFolder;
|
|
901
946
|
}
|
|
902
|
-
interface MappingStripFolder {
|
|
947
|
+
export interface MappingStripFolder {
|
|
903
948
|
templateType: "mappingStrip";
|
|
904
949
|
templateId: number;
|
|
905
950
|
waylineCoordinateSysParam: WaylineCoordinateSysParam;
|
|
@@ -915,7 +960,7 @@ interface MappingStripFolder {
|
|
|
915
960
|
* The XML `<wpml:startActionGroup>` element only wraps raw `<wpml:action>` items —
|
|
916
961
|
* it has no `actionGroupId`, `actionGroupMode`, or `actionTrigger` elements.
|
|
917
962
|
*/
|
|
918
|
-
interface StartActionGroup {
|
|
963
|
+
export interface StartActionGroup {
|
|
919
964
|
action: Action[];
|
|
920
965
|
}
|
|
921
966
|
/**
|
|
@@ -925,11 +970,11 @@ interface StartActionGroup {
|
|
|
925
970
|
* Cardinality: `Folder` is `1..*` — `mapping3d` templates expand to 5 Folders
|
|
926
971
|
* (1 ortho + 4 oblique).
|
|
927
972
|
*/
|
|
928
|
-
interface Waylines {
|
|
973
|
+
export interface Waylines {
|
|
929
974
|
missionConfig: MissionConfig;
|
|
930
975
|
Folder: WaylinesFolder[];
|
|
931
976
|
}
|
|
932
|
-
interface WaylinesFolder {
|
|
977
|
+
export interface WaylinesFolder {
|
|
933
978
|
/** Links back to template Folder's `templateId`. */
|
|
934
979
|
templateId: number;
|
|
935
980
|
waylineId: number;
|
|
@@ -981,7 +1026,7 @@ interface PlanOptions {
|
|
|
981
1026
|
*
|
|
982
1027
|
* Mapping templates require `options.lineSpacing` (meters between flight lines).
|
|
983
1028
|
*/
|
|
984
|
-
declare function plan(template: Template, options?: PlanOptions): Waylines;
|
|
1029
|
+
export declare function plan(template: Template, options?: PlanOptions): Waylines;
|
|
985
1030
|
//#endregion
|
|
986
1031
|
//#region src/plan/plan-mapping-strip.d.ts
|
|
987
1032
|
interface MappingStripRegion {
|
|
@@ -1011,12 +1056,14 @@ interface MappingStripDerived {
|
|
|
1011
1056
|
surveyAreaSize: number;
|
|
1012
1057
|
regions: MappingStripRegion[];
|
|
1013
1058
|
flightRoutes: MappingStripRegionRoute[];
|
|
1059
|
+
/** Horizontal mission distance, including known ingress and finish travel. */
|
|
1014
1060
|
totalFlightLength: Meters;
|
|
1015
1061
|
photoSpacing: Meters;
|
|
1016
1062
|
estimatedPhotoCount: number;
|
|
1063
|
+
/** Estimated horizontal flying seconds at the configured work/transit speeds. */
|
|
1017
1064
|
estimatedDuration: number;
|
|
1018
1065
|
}
|
|
1019
|
-
declare function deriveMappingStrip(template: MappingStripTemplate, options?: PlanOptions): MappingStripDerived;
|
|
1066
|
+
export declare function deriveMappingStrip(template: MappingStripTemplate, options?: PlanOptions): MappingStripDerived;
|
|
1020
1067
|
//#endregion
|
|
1021
1068
|
//#region src/validate/index.d.ts
|
|
1022
1069
|
/**
|
|
@@ -1025,10 +1072,10 @@ declare function deriveMappingStrip(template: MappingStripTemplate, options?: Pl
|
|
|
1025
1072
|
*
|
|
1026
1073
|
* The function is non-throwing by design — callers decide how to react.
|
|
1027
1074
|
*/
|
|
1028
|
-
declare function validate(doc: Template | Waylines): Issue[];
|
|
1075
|
+
export declare function validate(doc: Template | Waylines): Issue[];
|
|
1029
1076
|
//#endregion
|
|
1030
1077
|
//#region src/plan/geometry.d.ts
|
|
1031
1078
|
/** Great-circle distance between two WGS-84 coordinates, in meters. */
|
|
1032
|
-
declare function haversineMeters(a: LngLat, b: LngLat): number;
|
|
1079
|
+
export declare function haversineMeters(a: LngLat, b: LngLat): number;
|
|
1033
1080
|
//#endregion
|
|
1034
|
-
export {
|
|
1081
|
+
export type { MappingStripDerived, MappingStripRegion, MappingStripRegionRoute, PlanOptions };
|