This is an old revision of the document!
Is a family member or friend flying?
Did they give you their flight number?
Great, so instead of having to pull out your phone to track the journey regularly, why not have the Flight Tracker on your desk. Just enter the flight number, and all the information about the flight is shown on a screen (speed, position, altitude, time remaining…).
Moreover, an animation of the plane will be made which will allow you to have an interactive follow-up.
The user enters the flight number on the Arduino software serial monitor. Then, via the ESP8266, a request to a dedicated aircraft tracking API is sent with the entered flight number. An analysis of the response then retrieves the necessary information and displays it on the LCD screen. In order to represent the current position of the aircraft, relative to the time remaining, an angle will be determined and the servo motor will move to it.
Schema :
I used the Arduino IDE including SoftwareSerial, LiquidCrystal_I2C, Servo, ESP8266, WiFi Client Secure and ArduinoJSON libraries.
I'm using two different APIs. The first one, Aviation Edge, allow me to find a flight by its IATA Code, which can be found on the ticket. The api response is parsed, and then it's possible to create a variable to store the value of one of the numerous variables which can be found in the response, just by giving its path.
I'm using the Speed, altitude, departure and arrival Airport's IATA codes.
To determine the remaining percentage of the route, I use another API (AirLabs) that gives me the coordinates of the airports. Then I use the Haversine function, which allows me to calculate the distance between two pairs of coordinates. I can then calculate the ratio (remaining distance / total distance) to know how many distance the plane still has to fly.
Incoming soon
Arduino Code : https://github.com/KINGBAP/FlightTracker