| | |
| | | const cesium = cesiumOperation() |
| | | // 添加机场标注 |
| | | watch(() => store.state.deviceState, (data, oldData) => { |
| | | console.log(data, 'data') |
| | | // cesium.removeAllPoint() |
| | | if (data.currentType === EDeviceTypeName.Aircraft && data.deviceInfo[data.currentSn]) { |
| | | // cesium.removeById('drone_fly') |
| | |
| | | cesium.updateEntityPosition(data.deviceInfo[data.currentSn].longitude, data.deviceInfo[data.currentSn].latitude, 'drone_fly', orientation) |
| | | // 根据机场状态码判断是否实时更新轨迹航线 |
| | | if (data.dockInfo[data.currentSn] && (data.dockInfo[data.currentSn].basic_osd.mode_code === 3 || data.dockInfo[data.currentSn].basic_osd.mode_code === 4 || data.dockInfo[data.currentSn].basic_osd.mode_code === 5)) { |
| | | console.log(data, '======', data.dockInfo[data.currentSn], '==========') |
| | | // 生成新的位置数组 |
| | | const newPositions = Cesium.Cartesian3.fromDegreesArray([oldData.deviceInfo[data.currentSn].longitude, oldData.deviceInfo[data.currentSn].latitude, data.deviceInfo[data.currentSn].longitude, data.deviceInfo[data.currentSn].latitude]) |
| | | previousPositions.value = previousPositions.value.concat(newPositions) |