fpw / avitab

X-Plane plugin that displays a tablet to aid VR usage
GNU Affero General Public License v3.0
299 stars 58 forks source link

Improvements to route overlaying at the -180/+180 longitude discontinuity #186

Closed mjh65 closed 9 months ago

mjh65 commented 9 months ago

These modifications enhance the depiction of the route leg that crosses the discontinuity by avoiding the addition of a route waypoint at the discontinuity. The update also fixes a route overlay bug at the -180/+180 longitude discontinuity. The formula for working out the latitude where the route leg crossed the boundary contained an error which resulted in the image::drawLine() method getting stuck in an infinite loop. This update fixes the algorithm and prevents the problem occuring. There should probably be something in the drawLine function to check for and avoid this.