Skip to content

Commit

Permalink
cesium: add waypoint numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
Williangalvani committed Aug 22, 2023
1 parent 2684d34 commit e30a0f2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
17 changes: 17 additions & 0 deletions src/components/CesiumViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
ClockRange,
Cartesian3,
SampledProperty,
LabelStyle,
SampledPositionProperty,
Transforms,
PolylineDashMaterialProperty,
Expand Down Expand Up @@ -838,6 +839,22 @@ export default {
})
}
})
for (const pos of points) {
const position = Cartesian3.fromDegrees(pos[0], pos[1], pos[2] + 0.3 + this.heightOffset)
this.viewer.entities.add({
parent: this.waypoints,
position: position,
label: {
text: `${pos[5]}`,
font: '12px sans-serif',
style: LabelStyle.FILL_AND_OUTLINE,
fillColor: Color.WHITE,
outlineColor: Color.BLACK,
showBackground: false,
outlineWidth: 3
}
})
}
},
plotFences (fencesList) {
Expand Down
5 changes: 4 additions & 1 deletion src/tools/dataflashDataExtractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,14 @@ export class DataflashDataExtractor {
if (cmdMsgs.Lat[i] !== 0) {
let lat = cmdMsgs.Lat[i]
let lon = cmdMsgs.Lng[[i]]
const tot = cmdMsgs.CTot[i]
const id = cmdMsgs.CId[i]
const num = cmdMsgs.CNum[i]
if (Math.abs(lat) > 180) {
lat = lat / 10e6
lon = lon / 10e6
}
wps.push([lon, lat, cmdMsgs.Alt[i]])
wps.push([lon, lat, cmdMsgs.Alt[i], tot, id, num])
}
}
}
Expand Down

0 comments on commit e30a0f2

Please sign in to comment.