DEV Community

mesas998
mesas998

Posted on

Django Live Flight Tracker

https://magula10.pythonanywhere.com/flight/

This was the first project on which I used AI. Gemini proposed an OpenStreetMap design which enhanced the traditional Django request-response paradigm by first rendering the OpenStreetMap in the template, then making a second request to a second Django endpoint that returns the flight data as JSON.

To avoid running up my FlightRadar24 API bill, I limited most queries to 10 results. If enough people start using the site, FR24 eventually responds with HTTP 429 (rate limit exceeded), so handling scale and caching remain open problems.

The frontend performs a simple dead-reckoning calculation on each aircraft: speed multiplied by 1 second multiplied by the sine and cosine of the track (45 degrees is northeast) to estimate where each aircraft will be one second later. Every 10 seconds the client refreshes from the server and corrects the estimated positions, which is why you'll see aircraft "blink" into slightly different locations.

Probably the most frequent search will be by airport e.g. HYD - Rajiv Gandhi International.

I'm particularly interested in feedback or collaboration around map performance, API rate limiting, caching, aircraft position prediction, and frontend visualization.

Top comments (0)