The flight tracker project described here has now been incorporated into my combined aircraft and ship tracking system, "Plane/Sailing". Head to that link if you want to see what it's become, or carry on reading below to check out its predecessor!
I run a relatively simple home-made ADS-B aircraft tracker using and old Raspberry Pi, a cheap Software Defined Radio dongle, and some software. It’s installed in my shed, and provides tracking of planes across the south of the UK.
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 Model B that I used.) 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. I used the dipole antenna mount that came with it, and the two vertical antennas set to roughly 69mm long—quarter of the wavelength of ADS-B's 1090MHz signal. (You can see one antenna fitted in the photo above, adding the second antenna pointing downwards to make a dipole doubles the receive signal, an extra 3dB.)
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. I fixed that in this commit, which has since been merged into Dump 1090, but I don’t believe that has been incorporated into the latest PiAware images yet. If you’re recreating this build, you may need to look at my commit and make the same change for yourself 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. This kind of goes against how dump1090 expects to be used, so I haven’t done a pull request for that—if you want tail number and airframe ID lookup to be accessible from outside the local web server, you will need to recreate that for yourself.
Since I wanted HTTPS support, I also got a certificate from Let’s Encrypt to serve the same web root on port 443 as well—instructions can be found here.
As well as providing data to FlightAware, I also wanted to provide data to its "competitors" FlightRadar24 and ADS-B Exchange. The easiest way to do this was as I found in this forum post – to stick with the PiAware base software, then add the additional software for FlightRadar24 and ADS-B Exchange on top. Downloading and running this script got FlightRadar24 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. Then, this script got me set up with ADS-B Exchange.
The system architecture is 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.