Jump to content

Suggestion for flight paths when crossing date line


nicky9499

Recommended Posts

G'day Nabeel and dev team,

 

I'm writing to propose a suggestion to improve how the flight path is displayed when crossing the date line (or basically one side of the global map to the other).

Right now its behavior is to draw an extremely long line right across to connect to the "other side".

 

Example, when crossing the Pacific Ocean:

dateline.PNG.0e994dd73a7d6a5dc53100f854454802.PNG

 

I am not a developer by trade, so please excuse me if this is simpler said than done.

My suggestion is to simply have a rule for each drawn segment:
 

if, segment length = x

then, do not draw

 

where x is an extremely large distance such as 1000nm, which would be highly unlikely for any flight to cover without at least crossing a waypoint or navaid.

This solution would leave a gap between the edge of the map and the waypoint closest to it for planned path (yellow), but the tracked path (white) will be accurate.

Please let me know your thoughts or comments on this. Thank you.

Edited by nicky9499
Link to comment
Share on other sites

  • Administrators

Yeah, this is a limitation of the mapping library I'm using, since it doesn't "infinite scroll" the maps. I believe it's on their roadmap.

 

But thanks for the suggestion, I have something like that on my mind, where if there's one point to another point, and it intersects the date line, turn into that into 2 separate segments, so from p1 -> dateline, dateline -> p2. I just haven't quite done the research or looked into the math to determine whether there is a crossing of that boundary, but also, getting the coordinates of where it's intersected, to draw that out.

 

On a quick search I see https://gis.stackexchange.com/questions/83425/splitting-linestrings-on-dateline-with-openlayers

 

But any other suggestions on an algorithm would be great. We can discuss it on Discord too. I'll probably end up doing some research about this over the next few days to finally get it off my list :)

Link to comment
Share on other sites

Hi Nabeel, thanks for the reply and insight! An extension of your idea - I am going along the K.I.S.S. school of thought here - why not just straight up not display any segment that crosses the date line? Since update interval is relatively frequent in vmsACARS, I doubt anyone would be complaining that a very short stretch of their flight path over the big open sea is missing.

Link to comment
Share on other sites

  • Administrators

It doesn't save you much; the same calculations still need to happen to determine which points are going to cross the boundary. So you'd only omit drawing that single line segment, instead of calculating where that last segment would intersect the date line. But for drawing out the route, you can't omit that, since it's a pretty large line that's spanning it. The way I have it, it's the same code which splits the line up. The interesting thing I found in my research was the recommendation in the GeoJSON spec on how to handle it:

 

https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.9

 

Anyway - I have something working now that I'm going to push to alpha, if you want to try. Shoot me a message on Discord if you're not in the alpha distro list.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...