From e72969f25dd1a243e48c783dedc0f198ee08c2b8 Mon Sep 17 00:00:00 2001
From: GuLiMmo <2820890765@qq.com>
Date: Wed, 20 Mar 2024 17:19:04 +0800
Subject: [PATCH] update:新增航线、航点事件编辑
---
src/utils/cesium/use-kmz-tsa.ts | 69 +++++++++++++++++-----------------
1 files changed, 35 insertions(+), 34 deletions(-)
diff --git a/src/utils/cesium/use-kmz-tsa.ts b/src/utils/cesium/use-kmz-tsa.ts
index d7ff54c..01a09c6 100644
--- a/src/utils/cesium/use-kmz-tsa.ts
+++ b/src/utils/cesium/use-kmz-tsa.ts
@@ -160,51 +160,52 @@
81: '1',
} as const
const templateJson = {
- author,
- createTime,
- updateTime: createTime,
+ author: { '#text': author },
+ createTime: { '#text': createTime },
+ updateTime: { '#text': createTime },
missionConfig: {
- flyToWaylineMode: 'safely',
- finishAction: 'goHome',
- exitOnRCLost: 'goContinue',
- executeRCLostAction: 'goBack',
- takeOffSecurityHeight: 20,
- takeOffRefPoint: '0.000000,0.000000,0.000000',
- takeOffRefPointAGLHeight: 0,
- globalTransitionalSpeed: 15,
- globalRTHHeight: 80,
+ flyToWaylineMode: { '#text': 'safely' },
+ finishAction: { '#text': 'goHome' },
+ exitOnRCLost: { '#text': 'goContinue' },
+ executeRCLostAction: { '#text': 'goBack' },
+ takeOffSecurityHeight: { '#text': 20 },
+ takeOffRefPoint: { '#text': '' },
+ takeOffRefPointAGLHeight: { '#text': 0 },
+ globalTransitionalSpeed: { '#text': 15 },
+ globalRTHHeight: { '#text': 80 },
droneInfo: {
- droneEnumValue,
- droneSubEnumValue: droneModel[payloadEnumValue],
+ droneEnumValue: { '#text': droneEnumValue },
+ droneSubEnumValue: { '#text': droneModel[payloadEnumValue] },
},
payloadInfo: {
- payloadEnumValue,
- payloadSubEnumValue: droneModel[payloadEnumValue],
- payloadPositionIndex: 0,
+ payloadEnumValue: { '#text': payloadEnumValue },
+ payloadSubEnumValue: { '#text': droneModel[payloadEnumValue] },
+ payloadPositionIndex: { '#text': 0 },
},
},
Folder: {
- templateType: 'waypoint',
- useGlobalTransitionalSpeed: 0,
- templateId: 0,
+ templateType: { '#text': 'waypoint' },
+ useGlobalTransitionalSpeed: { '#text': 0 },
+ templateId: { '#text': 0 },
waylineCoordinateSysParam: {
- coordinateMode: 'WGS84',
- heightMode: 'EGM96',
- globalShootHeight: 50,
- positioningType: 'GPS',
- surfaceFollowModeEnable: 1,
- surfaceRelativeHeight: 100,
+ coordinateMode: { '#text': 'WGS84' },
+ heightMode: { '#text': 'EGM96' },
+ globalShootHeight: { '#text': 50 },
+ positioningType: { '#text': 'GPS' },
+ surfaceFollowModeEnable: { '#text': 1 },
+ surfaceRelativeHeight: { '#text': 100 },
},
- autoFlightSpeed: 7,
- gimbalPitchMode: 'usePointSetting',
+ autoFlightSpeed: { '#text': 7 },
+ gimbalPitchMode: { '#text': 'usePointSetting' },
+ globalHeight: { '#text': '100' },
globalWaypointHeadingParam: {
- waypointHeadingMode: 'followWayline',
- waypointHeadingAngle: 0,
- waypointPoiPoint: '0.000000,0.000000,0.000000',
- waypointHeadingPathMode: 'followBadArc',
+ waypointHeadingMode: { '#text': 'followWayline' },
+ waypointHeadingAngle: { '#text': 0 },
+ waypointPoiPoint: { '#text': '0.000000,0.000000,0.000000' },
+ waypointHeadingPathMode: { '#text': 'followBadArc' },
},
- globalWaypointTurnMode: 'toPointAndStopWithDiscontinuityCurvature',
- globalUseStraightLine: 0,
+ globalWaypointTurnMode: { '#text': 'toPointAndStopWithDiscontinuityCurvature' },
+ globalUseStraightLine: { '#text': 0 },
Placemark: [],
},
}
--
Gitblit v1.9.3