File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -228,7 +228,10 @@ export default {
228228 /*
229229 * Second step of setup, happens after the height of the starting point has been returned by Cesium
230230 * */
231- this .heightOffset = updatedPositions[0 ].height
231+ this .heightOffset = 0
232+ for (let pos of updatedPositions) {
233+ this .heightOffset = Math .max (this .heightOffset , pos .height )
234+ }
232235 this .processTrajectory (this .state .current_trajectory )
233236 this .addModel ()
234237 this .updateAndPlotTrajectory ()
@@ -522,7 +525,7 @@ export default {
522525 position = Cartesian3 .fromDegrees (
523526 pos[0 ],
524527 pos[1 ],
525- Math . max ( pos[2 ] + this .heightOffset , this . corrected_trajectory [posIndex]. height )
528+ pos[2 ] + this .heightOffset
526529 )
527530 }
528531 this .positions .push (position)
@@ -645,7 +648,7 @@ export default {
645648 this .position = Cartesian3 .fromDegrees (
646649 pos[0 ],
647650 pos[1 ],
648- Math . max ( pos[2 ] + this .heightOffset , this . heightOffset )
651+ pos[2 ] + this .heightOffset
649652 )
650653 trajectory .push (this .position )
651654 let color = this .getModeColor (pos[3 ])
You can’t perform that action at this time.
0 commit comments