A program for downloading Flightradar24 tracks, and export to KML/GPX formats.
This program will fetch the tracks within 7 days of a given aircraft given its registration.
This program uses python3 and requests module of python3.
Download and install python3 from here, and install requests
using:
pip3 install requests
You can either use git
to install the program, or just download the whole program in .zip
format from here
Install:
git clone https://github.com/chaoshaowei/flightradar-kml.git
Update:
git pull https://github.com/chaoshaowei/flightradar-kml.git
Simply edit the reg in main.py
, then run the python script.
The output file will be renamed based on the plane's registration, and the requested date. The time will be based on the event time of the flight, localized into timezone described in [OUTPUT_TZ
].
Currently, the option of using the code requires you to modify the main.py
file, and change the reg and/or the date.
Maybe there will be graphical interface to get tracks in the future.
Basic parameters:
REG_ID
= [String
]: The targeting aircraft registrationFLIGHT_ID
= [String
]: The targeting flightradar24 flight ID, which is a 24-bit hex string, ifRUN_MODE
is set toSEARCH_FLIGHT_BY_FLIGHT_ID
Advanced parameters:
OUTPUT_TZ_NUM
= [Number
]: The hours difference from GMT, which will be in the output filenameRUN_MODE
= [ENUM/Number
]: The running mode of the programLIST_FLIGHT_BY_REG
: Just list out the flights of an aircraft in the past 7 daysSEARCH_FLIGHT_BY_REG
: Download all flights of an aircraft in the past 7 daysSEARCH_FLIGHT_BY_FLIGHT_ID
: Download a specific flight
OUTPUT_KML
: [True
/False
]: Export KML or notOUTPUT_GPX
: [True
/False
]: Export GPX or not