Closed azrogers closed 5 months ago
Thanks @azrogers ! Code changes look reasonable and tested out some flights in cesium-unreal-samples.
If you could, just add a note about this in CHANGES.md
, since it's a potentially user facing fix.
Other than that, looks ready for merge.
@csciguy8 Updated CHANGES.md!
The
SimplePlanarEllipsoidCurve
used for flight paths currently doesn't work for paths where the source point is below the surface of the ellipsoid. It currently causes the calculated coordinates to be inverted, giving points on the other side of the earth. This is because the math inSimplePlanarEllipsoidCurve
first scales the source and destination points to the surface of the ellipsoid, and then assumes that these surface points must be lower in elevation than the original points for the rest of the calculations. This meant that height wasn't calculated correctly, and crucially,_sourceDirection
was calculated pointing the wrong direction, resulting in the inverted coordinates. I've fixed the math so that it should work the same when points are below the ellipsoid.