projecthorus / sondehub-tracker

🎈 Frontend for SondeHub Radiosonde Tracking
https://v2.sondehub.org
MIT License
59 stars 24 forks source link

Make use of prediction info to determine ground level. #302

Open darksidelemm opened 8 months ago

darksidelemm commented 8 months ago

Currently we have some code which decides if a payload has 'landed', and it makes some not brilliant assumptions about what ground level is (refer 'The Colorado Problem'). Ideally we'd be comparing against terrain information, but that would require a lot of Ruaumoko API polls.

However, whenever a prediction is run in Tawhiri (which has direct access to the ruaumoko terrain dataset), it terminates the prediction at ground level. Therefore, the last point in any prediction we get will be ground level in the landing area.

We could extract this ground level altitude and store it, and use that to decide if the payload has landed!

darksidelemm commented 8 months ago

This change will need to be made in updateVehicleInfo function, in tracker.js