吉安感知网项目-前端
罗广辉
2026-03-05 edf1e6efa079e91aeb162e9376c84fecbea85528
feat: 轨迹假的高度
1 files modified
8 ■■■■■ changed files
applications/drone-command/src/views/recordManage/historyTracks/TrajectoryDiaLog.vue 8 ●●●●● patch | view | raw | blame | history
applications/drone-command/src/views/recordManage/historyTracks/TrajectoryDiaLog.vue
@@ -128,13 +128,15 @@
    speed: 5,
})
const MOCK_FLIGHT_HEIGHT = 120
// 角度转c3
function degreesToC3({ longitude, latitude, height = 0 }) {
    return Cesium.Cartesian3.fromDegrees(longitude, latitude, height)
}
// 渲染航线
function drawFlightPath() {
    const positions = list.value.map(p => degreesToC3(p))
    const positions = list.value.map(p => degreesToC3({ ...p, height: MOCK_FLIGHT_HEIGHT }))
    if (!positions.length) return
    droneLineEntity && geometricSource.entities.remove(droneLineEntity)
    droneLineEntity = geometricSource.entities.add({
@@ -142,7 +144,7 @@
            width: 4,
            positions: positions,
            material: arrowLineMaterialProperty,
            clampToGround: true,
            clampToGround: false,
        },
    })
    startDroneEntity && geometricSource.entities.remove(startDroneEntity)
@@ -153,7 +155,7 @@
            width: 40,
            height: 40,
            verticalOrigin: Cesium.VerticalOrigin.CENTER,
            heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
            heightReference: Cesium.HeightReference.NONE,
        },
    })
    viewer.flyTo(droneLineEntity, { duration: 0 })