# Track Your Flight with PyMyFlySpy

View real-time flight data on maps and graphs.

- **Source:** [Robert Heaton | Blog](https://brifing.si/source/578fe593-3691-4dae-8aff-130c348771a3)
- **Published:** 2024-12-04
- **Topic:** [Data & AI](https://brifing.si/c/data-ai)
- **Original article:** <https://robertheaton.com/pymyflyspy/>
- **On Brifing:** https://brifing.si/s/5fae6897-2f51-4c1c-98d1-40a4c22024dc

## Accessing Flight Data

During a flight, passengers often want to know the exact location of their aircraft. However, cheap and short flights may lack headrest screens and internet access. In such cases, passengers cannot know precisely where they are. Connecting to the in-flight wi-fi network can be a solution to access this data.

## Collecting Data from Wi-Fi

When you connect to the in-flight wi-fi network, you are usually greeted with a payment page. This page includes information such as flight speed, direction, and estimated arrival time. However, it may not include a map. Using Chrome developer tools, it can be seen that latitude and longitude data are null.

## Calculating Location

Even if latitude and longitude data are not available, speed and direction information from the wi-fi network can be used to dynamically calculate the aircraft's position. Starting from the airport's coordinates, the distance traveled and direction for each second can be added to estimate the real-time location.

## The PyMyFlySpy App

PyMyFlySpy is a web application that displays real-time flight data on maps and graphs. The app records all data from the in-flight wi-fi network and presents it to the user. It also allows users to write queries against the data and run custom queries.

## Multi-Airline Support

Different airlines use different wi-fi systems. PyMyFlySpy allows users to add and use recorders for different airlines. Users can open the airline's wi-fi page, use developer tools to parse the data, and add the new code to the PyMyFlySpy configuration.

## System Design

PyMyFlySpy's system is quite simple. The Firefox extension reads flight information from the airline's website and sends it to the PyMyFlySpy web server. The local web server saves the data and makes it available to the frontend. The Sqlite database stores the data, and the web frontend displays it using maps and graphs.

## User Experience

PyMyFlySpy allows passengers to know exactly where they are during a flight. The app provides flight metrics like a pilot would. Users can also query the speed and effects of turbulence they encounter during the flight.

## Demo Mode

PyMyFlySpy includes a demo mode that allows users to test the app without being on a plane. In this mode, users can try the app with a fake flight. The demo mode is ideal for those who want to understand how the app works.

## Future Potential

PyMyFlySpy is an important tool for passengers who want to track flight data in real-time. The app's ability to adapt to different airlines and allow custom queries makes it a candidate for future development. Such apps can enhance the flight experience for passengers.

## Sources covering this story

- https://robertheaton.com/pymyflyspy/ — 

---

_Summary written by Brifing from the original reporting. Copyright in the original article belongs to its publisher; read the full piece at the link above._
