After this year’s UN Week, I wanted to see if my ADS-B receiver had picked up any of the cool aircraft that came to NYC but obviously wasn’t able to stare at the screen 24/7. I searched around but couldn’t find anything that did exactly what I wanted, which was to save and notify me of any aircraft from my receiver that met my criteria, so I decided to write my own script, which I called PlaneCatcher.
PlaneCatcher Features:
-Daily reports of aircraft of note, saved on Raspberry Pi
-Live notification on iOS, Android, or browser via Pushover with link to view on FlightAware
-Shows time first received, Flight ID, aircraft registration (or Mode-S hex if not available), and country
-Filter by exact registration (not all countries supported)
-Filter by registration country (again, not all supported)
-Filter by Mode-S hex
-Filter by Flight ID
-Works by querying aircraft.json at two second intervals
Example of Android notifications:
Example of daily report:
The code is available at: PlaneCatcherv1 - Pastebin.com
Setup:
-For notifications to work on Pushover, you need to have the requests Python module installed or rewrite the code to send HTTP POST requests without the module. You’ll also need a Pushover account.
- Copy python file onto Raspberry Pi.
- Fill out all the parts in the code marked with “////”
- Fill out the arrays in the code listed below:
-“filteredairlines”: airlines you don’t want to be notified about, this takes the first three letters from the flight ID [e.g. “SWA”]
-“filteredcountries”: aircraft from countries aircraft you don’t want to be notified about, use the country’s two letter code [e.g. “US”]
-“desiredregs”: registrations you want to be notified about, this overrides the filteredairlines and filteredcountries list [e.g. “N123AB”]
-“desiredairlines”: airlines you want to be notified about, this also overrides filteredairlines and filteredcountries
-“desiredhexcodes”: any hexcodes for aircraft that don’t have registration support [e.g. “c060a6”] - Start the daemon by running
python NameOfSavedCodeFile.py start
Side notes:
-In the notification and in the daily summary if the registration can be calculated from the Mode-S hex it will be included. If not, the hex will take its place.
-If the country of origin can be calculated from the hex the two letter country code will be included. For the list of countries supported, see the first chunk of code. Also, I haven’t verified the countries other than the US and Canada.
-US Military hex codes are not included in the US filter. If you would like to filter military aircraft as well, find 0xA00000
and replace it with 0xAFFFFF
.
-Countries that have registration calculation support are: United States, Canada, South Africa, France, Germany, Belgium, Denmark, Finland, Greece, Portugal, Romania, Turkey, Jordan, Pakistan, Singapore, Syria, Australia, Argentina, Russia, Cuba, South Korea, and Japan.
-The -flights.dat file shows each unique notified flight (no duplicates)
-The -raw.dat file shows all of the raw input from aircraft.json from notified flights
-My Raspberry Pi does not run the PiAware image so I can’t attest to its compatibility there, but I don’t see why there would be any issues.
Hope someone is able to find some utility from this!