【类 型】:fix

【原  因】:判断了是否 有经纬度  才往数组里面存经纬高
【过  程】:
【影  响】:导致没有经纬度得时候 也没有高度
This commit is contained in:
air 2026-01-08 15:26:30 +08:00
parent 931505e782
commit 9b1e5ffbee

View File

@ -197,11 +197,12 @@ export default {
// 便
const position = JSON.parse(jsonData.position)
// lon, lat, alt
if (position.lon !== 0 && position.lat !== 0 &&
position.lon !== null && position.lat !== null &&
position.lon !== '' && position.lat !== '') {
// if (position.lon !== 0 && position.lat !== 0 &&
// position.lon !== null && position.lat !== null &&
// position.lon !== '' && position.lat !== '') {
// plane.planeState.position.push([position.lon / 10e6, position.lat / 10e6, Number(position.alt)])
// }
plane.planeState.position.push([position.lon / 10e6, position.lat / 10e6, Number(position.alt)])
}
if (plane.planeState.position.length > 1000) {
plane.planeState.position.shift() //
}