I run a relatively simple home-made ADS-B aircraft tracker using and old Raspberry Pi, Software Defined Radio dongle, and some software. It’s installed in my shed, and provides reasonable tracking of planes going in and out of the nearby airport.
The Raspberry Pi is an original one I had lying around; I found the easiest setup was to use PiAware from FlightAware. (This asks for a Raspberry Pi 3, but works just fine on the original.) The PiAware link has a good guide to getting it all set up.
My SDR dongle is an R820T from RTL-SDR.com, and worked perfectly out of the box, with the included antenna extended to approximately 67mm.
Following the simple instructions from FlightAware gives you a device that will automatically upload tracking data to their website, and also provides a local web server (via the included Dump1090 software) that shows what’s being tracked.
This web interface is nice, but I wanted to go one further and add military symbology, airspace layers from openAIP on the map, and some tweaks to the information shown. Rather than getting dirty and recompiling a fork of Dump1090, I discovered that a simple JSON HTTP request underlies its own web interface’s data retrieval. I therefore chose to write my own web front-end, and use Dump1090’s JSON as a data source. (There are other “proper” ADS-B formats available from Dump1090 as well, but JSON is the most convenient to use from a web application.)
When setting this up, I did encounter a problem, which is that PiAware’s lighttpd web server config has a problem with the
Access-Control-Allow-Origin flag that it uses to enable cross-site script requests for the data. This commit, which hopefully will be merged into Dump 1090, shows you how I fixed that in
/etc/lighttpd/conf-available/89-dump1090-fa.conf. I also made this change while I was there there to expose the JSON files in
/db/ to the outside world as well as just those in
/data/, so U.M.I.D. can fetch tail number and airframe IDs.
As well as providing data to FlightAware, I also wanted to provide data to its competitor FlightRadar24. The easiest way to do this was as I found in this forum post – to stick with the PiAware base software, then add the FlightRadar24 software on top. Downloading and running this script got it all set up. The procedure is now even simpler than shown in the forum post, because the script detects running instances of Dump1090 and knows not to interfere with them, so you are no longer required to be so careful with the options you provide.
The system architecture is therefore as follows:
If you’d like to see what I’m currently tracking, my custom front-end is online at https://flightmap.ianrenton.com, and the software it runs is on Github under a Public Domain licence if you’d like your own copy.