swaluver480 Posted June 3, 2023 Report Share Posted June 3, 2023 hello, does anyone know how to draw a line (route) or follow the plane using OpenStreetMap.Mapnik (leaflet).. ive searche dan dsearch but to no avail. thanks you Quote Link to comment Share on other sites More sharing options...
DisposableHero Posted June 4, 2023 Report Share Posted June 4, 2023 https://leafletjs.com/reference.html#polyline If you have the geo locations you can draw the line as you wish by using above reference. Quote Link to comment Share on other sites More sharing options...
swaluver480 Posted June 4, 2023 Author Report Share Posted June 4, 2023 thank you! 1 Quote Link to comment Share on other sites More sharing options...
swaluver480 Posted June 4, 2023 Author Report Share Posted June 4, 2023 15 hours ago, DisposableHero said: https://leafletjs.com/reference.html#polyline If you have the geo locations you can draw the line as you wish by using above reference. now do you know how to draw a line following the aircraft? Quote Link to comment Share on other sites More sharing options...
Administrators ProAvia Posted June 5, 2023 Administrators Report Share Posted June 5, 2023 I believe you have to access the position reports for the flight. What ACARS program are you using and does it store position reports in the phpVMS database? Quote Link to comment Share on other sites More sharing options...
swaluver480 Posted June 5, 2023 Author Report Share Posted June 5, 2023 (edited) 7 hours ago, ProAvia said: I believe you have to access the position reports for the flight. What ACARS program are you using and does it store position reports in the phpVMS database? Smartcars, definitely looks like it does phpmyadmin _>acarsdata feed Edited June 5, 2023 by swaluver480 Quote Link to comment Share on other sites More sharing options...
Administrators ProAvia Posted June 5, 2023 Administrators Report Share Posted June 5, 2023 In that case, you will have to write some code to retrieve that data and display it on the map and have it update from time to time. I don't recall seeing any module that displays that live - as the flight is progressing. There was at least one payware ACARS client - no longer available - that provided a flown flight map file that showed the planned route as well as the actual flight path of the aircraft.... but it only provided the display after the PIREP was filed. Quote Link to comment Share on other sites More sharing options...
DisposableHero Posted June 5, 2023 Report Share Posted June 5, 2023 22 hours ago, swaluver480 said: now do you know how to draw a line following the aircraft? Yes I know how to do that, if you can develop it on your own logic is simple * Get your live flights * Read their live position reports and build arrays for each flight * For each live flight you have, use it's last position as the last geo location, then draw lines between each geo location starting from the departure airport, preferably with a greenish color (completed part) * Then draw a geodesic line (great circle line) from the last position to arrival airport, preferably with a redish color (not completed part) * Also if you have enough data, you can draw a line for the planned route, preferably with a blueish color * Optimize your leaflet map, add some layers (like enabling / disabling the route or the plan) * Automate the updates if you wish to (like an auto refresh of the map data, re-reading everything an processing everything again, preferably find a nice way to do this to reduce server load) * Test your map while some of your pilots are flying All this can happen, depending on your skills. Nothing impossible, but not easy too. This also depends on your acars software, if it is not sending back live position data during flights then do not start even thinking about a live map, consider building a pirep map with the above logic (which will be a one time process as the flight will already be landed and finished) Good luck Important Note: Me knowing how to do it does not mean that I can do it for you, or willing to do it for you (or somebody else). I just answered your main questions with positive replies, rest is up to you (or your web developer). Quote Link to comment Share on other sites More sharing options...
swaluver480 Posted June 5, 2023 Author Report Share Posted June 5, 2023 1 hour ago, DisposableHero said: Yes I know how to do that, if you can develop it on your own logic is simple * Get your live flights * Read their live position reports and build arrays for each flight * For each live flight you have, use it's last position as the last geo location, then draw lines between each geo location starting from the departure airport, preferably with a greenish color (completed part) * Then draw a geodesic line (great circle line) from the last position to arrival airport, preferably with a redish color (not completed part) * Also if you have enough data, you can draw a line for the planned route, preferably with a blueish color * Optimize your leaflet map, add some layers (like enabling / disabling the route or the plan) * Automate the updates if you wish to (like an auto refresh of the map data, re-reading everything an processing everything again, preferably find a nice way to do this to reduce server load) * Test your map while some of your pilots are flying All this can happen, depending on your skills. Nothing impossible, but not easy too. This also depends on your acars software, if it is not sending back live position data during flights then do not start even thinking about a live map, consider building a pirep map with the above logic (which will be a one time process as the flight will already be landed and finished) Good luck Important Note: Me knowing how to do it does not mean that I can do it for you, or willing to do it for you (or somebody else). I just answered your main questions with positive replies, rest is up to you (or your web developer). just wanted info on how to do it. ill figure the rest out thank you so much! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.