| | |
| | | if (!droneEntity) { |
| | | droneEntity = cesium.getEntityById('drone_fly') |
| | | } |
| | | console.log(data.deviceInfo[data.currentSn], '====deviceInfo====') |
| | | if (droneEntity) { |
| | | const orientation = { |
| | | heading: data.deviceInfo[data.currentSn].attitude_head, |
| | | pitch: data.deviceInfo[data.currentSn].attitude_pitch, |
| | | roll: data.deviceInfo[data.currentSn].attitude_roll |
| | | } |
| | | cesium.updateEntityPosition(data.deviceInfo[data.currentSn].longitude, data.deviceInfo[data.currentSn].latitude, 'drone_fly', orientation) |
| | | } else { |
| | |
| | | width: 36, |
| | | height: 36, |
| | | scale: 1.0, |
| | | rotation: 0.0 |
| | | }, |
| | | heading: data.deviceInfo[data.currentSn].attitude_head, |
| | | pitch: data.deviceInfo[data.currentSn].attitude_pitch, |
| | | roll: data.deviceInfo[data.currentSn].attitude_roll |
| | | } |
| | | cesium.addPoint(setting) |
| | | } |