Sunday, December 28, 2014

Flight tracking via ADS-B on a Raspberry Pi

Here's a fun little project you can build that is at the cross-roads of computing and radio communications: a flight tracker using SDR (Software-defined radio) to receive ADS-B transmissions directly from aircraft flying overhead using a Raspberry Pi with a DVB-T USB stick. Once you've built the system, you can direct your web browser to a port on the Raspberry Pi to take a look at all the airplanes near your location - not a lot going on above the White Mountains this Sunday afternoon:

Screenshot 2014 12 28 14 19 05

I've recently built three of these and linked them all to the FlightAware tracking website, where you can see the flights currently tracked by all three receivers, as well as tracking statistics regarding number of flights seen per day, etc. Here is the complete system with the three cables being power, Ethernet, and the antenna connection:

20141228 151553 1

The basis of this tracking is the Automatic dependent surveillance – broadcast (ADS–B) that each airplane transmits on a frequency of 1090 MHz, which contains GPS position, speed, altitude, heading, ascent/descent, and other navigational data. This information is normally used by ATC (Air Traffic Control) as well as received by other airplanes to provide situational awareness and allow self separation i.e. collision avoidance. Since this is being broadcast in a standardized format, it can be received and decoded by anybody, including ground stations.

Which brings us to the cheapest and most interesting way to receive these signals: SDR, or Software-defined radio - a technology where components that have been typically implemented in hardware (e.g. mixers, filters, amplifiers, modulators/demodulators, detectors, etc.) are instead implemented by means of software in a computer. All you need is an antenna and a UBS device that can support SDR applications, such as a cheap DVB-T USB stick.

For the computer system we don't need much processing power, so the Raspberry Pi Model B+ is the perfect choice for a low-priced stand-alone system that can easily handle the decoding of the ADS-B signal using the open-source dump1090 software and stream the data to a tracking site, such a FlightAware.

FlightAware also has some good instructions on how to build the system as well as a shopping list of all the components you will need: Build a PiAware ADS-B Receiver. Overall, the complete system, including case, power supply, Ethernet cable, etc. will cost you about $105.

However, the tiny antenna that comes standard with the DVB-T stick is only good for reception of signals from a very limited range. So one of the components you might want to upgrade sooner or later is the antenna by getting one that is actually appropriate for 1090 MHz, such as this vertical ADS-B outdoor base station antenna, or this ADS-B blade indoor antenna. I opted for the indoor antenna, since I didn't want to run extra antenna cables to the roof. And the indoor antenna is already so much better than the original tiny DVB-T whip.

Screenshot 2014 11 19 10 44 58

As you can see in this diagram, upgrading the antenna on November 12th resulted in the system being able to receive about 40,000 - 50,000 positions per day instead of 13,000 - 14,000 positions with the tiny original antenna - the correct antenna really makes a huge difference in the capability and range of the system!

Overall this is a fun little project to do on a rainy weekend. You can either build it all by yourself, or use it as an opportunity to teach the kids how to build a computer. Some Linux and networking skills are required, but nothing too complicated. And there are good instructions available for each step of the process.

No comments: