A personal project of mine for tracking aircraft flying around the New Orleans region. This is accomplished by receiving the aircraft’s Mode-S and ADS-B broadcasts.
Every aircraft is equipped with a transponder that broadcasts a unique HEX code. It can also can be programmed to broadcast a callsign (Ident), squawk code and altitude. This type of broadcast is called Mode-S. ADS-B, or Automatic Dependent Surveillance–Broadcast, is the next-gen version of Mode-S. With ADS-B, an aircraft can broadcast its’ exact latitude and longitude along with its other Mode-S data.
As just a personal project, I built the logging site to store all these flights into a database for archiving.
Flights with a “Private” operator tag are not stored.
Coverage range is about 200NM around New Orleans.
Coverage Stats @ FlightAware
Tracker PC: Raspberry Pi 3 Model B
Receiver: FlightAware Pro Stick Plus
Antenna: FlightAware 1090MHz ADS-B Antenna w/FlightAware 1090MHz Band-pass Filter
Power: TP-Link Gigabit Ethernet PoE Splitter Adapter to power Pi via POE connection.
Virtual Radar PC: Intel i3 NUC w/Window 10
Raspberry Pi, Receiver, and Antenna installed in attic.
How Does It Work?
The Raspberry Pi is the heart of the system, running FlightAware’s PiAware software. PiAware is an application specifically made for receiving and decoding Mode-S and ADS-B broadcasts from RTL-SDR devices. It has the ability to broadcast that data to different applications and display it on a website it creates with a google map.
I have PiAware currently setup to push data to 2 destinations. FlightAware and VirtualRadar on a Windows PC
Virtual Radar is a windows application running on separate PC. Virtual Radar pulls in the broadcast information from PiAware and generates a real-time map. Virtual Radar also reaches out to a online database to pull information about the plane, such as photos, operator information, route information if a callsign is received, and more. A plugin called Database Writer is used to store all this information into a SQLite database which is used to generate the data on this website.
To sum how what happens…
- The Virtual Radar PC runs a batch file every 10 minutes that fetches data from the Virtual Radar SQLite database, dumps it into a CSV file and uploads it to the Raspberry Pi.
- A cronjob then runs 2 php files on the Pi. The 1st script runs every 5 minutes and pulls the GPS Track of all the recent flights from Virtual Radar’s SQLite database and uploads to the MySQL database on the website. The 2nd script runs every 30mins and pulls the data from the CSV file and processes each flight. Part of that process includes grabbing the aircraft type and callsign if available. The script will first check the Callsign archive for the flight, and if found, use the flight data I’ve archived. If no record is found it’ll then reach out to Flightware to try and pull in the flight information (which is then archived). The script will then check the GPS table for an available track and fetch if it it exists. Each flight record is then added to the website’s MySQL database.
- The data is now stored in the database and available for viewing on the website.
Virtual Radar has a route database it uses, but often times I find these routes out-of-date, missing or using destinations for different legs of the callsign. I discovered FlightAware offers a free option for it’s new API XML 3 feed. It gives you 500 queries a month, but as a ADS-B Tracker, you get 500 more, so 1,000 total.
To reduce the daily query count, I archive everything into a database table as mentioned above. Since I’m catching aircraft in the same area daily, whatever part of a route a flight is one will generally be the same day to day. So there’s no need to fetch the same info over and over from FlightAware. I also only check FlightAware for data from from major airlines. I simply filter it down to flights that broadcast a callsign 5 or more characters long and are flying primarily a Boeing, Airbus, or MD aircraft. This pretty much narrows it down to the airlines, and excludes general aviation flights who my use a different call sign every flight.
It was a fun challenge to figure out, and I’m still tweaking the code. In the future I want to have callsigns updated every 2-3 months in case they do eventually change.
Much of the inspiration for creating the Flight Log came from Rob Jone’s website, http://sonicgoose.com/ Many of the scripts to used to pull in flight data came from Rob’s site.
Another tracker site, http://flights.hillhome.org, built upon Rob’s original tools but expanded it more, creating the method for pulling in the VRS GPS tracks from flights. He also has a nice tutorial online at https://github.com/ProHill/VRS-flights-db will all the scripts.
All of the aircraft images in the flight log were created by Scott at https://www.norebbo.com. He creates some fantastically, awesome drawings of aircraft and shares them all. Go check him out!!