Flight Tracking For Fun and Learning - Getting Started

Lauren boekhorstPosted by Laurens Boekhorst on 7-3-2016

There are various places where you can obtain a prebuilt flight tracker and upload your data to one of the established flight tracking services, but where is the fun in that? You can build one with your own hardware, almost from scratch! All you need is a digital television receiver and Linux.


Automatic Dependent Surveillance Broadcast, or ADS-B for short, is a data link system that is slated to replace radar as the primary surveillance method for controlling aircraft worldwide. It periodically broadcasts information such as identification, satellite position and velocity through an onboard transmitter that is more accurate than radar-based systems. The most common transmitters operate at a frequency of 1090 MHz. For aviation enthusiasts, this is great news, because it means these transmissions can be captured using a cheap, off the shelf, digital television receiver!


To get this going, we need some hardware. Most importantly, we need a digital television receiver, more commonly known as a DVB-T receiver. It doesn’t really matter which brand, as long as it contains an RTL2832U demodulator and a USB interface. Other hardware is not supported by the capture software. I have connected the receiver to a Raspberry Pi 2 Model B running Raspbian Jessie Lite, but you should be able to connect the receiver to any machine running Linux and have it supported out of the box.

The next step is to get some plumbing out of the way. We will not be demodulating the actual radio signals from the receiver ourselves. This task is best left up to dump1090, a robust demodulator with the ability to send captured messages in hexadecimal format across the network. It requires the librtlsdr and libusb development headers to be installed from your system’s repository, so be sure to install these first. You can then install dump1090 with:

git clone https://github.com/antirez/dump1090.git
cd dump1090/
sudo mv dump1090 /usr/local/bin/

After it has been installed, run it with:

dump1090 --net

If there is traffic in your area, and the antenna is appropriately placed, it should not be long before you start seeing transmissions logged in your terminal. If you do, you are good to go!


Our flight tracker is composed of three separate components. At the very bottom of the technology stack is the physical receiver and the decoder. At the very top is the web application that visualizes the air traffic in your area. Tying these two together is the multilink gateway service, which is responsible for facilitating communication between these two components by means of a web socket. We will first install the multilink gateway service, move on to the receiver, and finally get the web application up and running.

The multilink gateway service is a Phoenix application and for the purpose of this article I assume that you already have it installed. If you do not, refer to http://www.phoenixframework.org/docs/installation for instructions on installing Phoenix. Let’s now clone the repository and install its dependencies:

git clone https://github.com/lboekhorst/gateway.git
cd mgs
mix deps.get

Now that the dependencies are installed, you can run the multilink gateway service with:

mix phoenix.server

This will run the multilink gateway service in a development environment and expose a web socket for our receiver to connect to.


The decoder is a Ruby 2.0+ application and as such requires Ruby to be installed on your system. In this case, I am also assuming that you already have. The decoder has been published as a gem and can be installed with:

gem install adsb-cli

After it has been installed, you can run it with:

adsb --gateway ws://localhost/socket/websocket

If you have your prerequisites set up properly, it should not be long before you see messages being passed on to the multilink gateway service.


The front end is simply a collection of static HTML, JavaScript, and CSS that can be hosted from anywhere, but in order to build the application you are required to have Node and Bower installed. Again, I am assuming that you already have. Let’s clone the repository install its dependencies:

git clone https://github.com/lboekhorst/atis.git
cd atis
npm install
bower install

After the dependencies have been installed, you can run the front end with:

GATEWAY=ws://localhost/socket/websocket gulp serve

Open up your browser and navigate to your local host. You should see a map opening up, and if you have the multilink gateway service and decoder properly in place, it should not be long before you see aircraft showing up on the map!


Over the course of this article we have configured our hardware and installed all of the software we need to start tracking flights. Next time, we’ll take a look at the architecture of the system and go a little further in-depth in terms of technology.

Lauren boekhorst

Laurens Boekhorst

Consultant • JavaScript, Ruby • github.com/lboekhorstlinkedin.com/in/lboekhorst • Private pilot

Bij Kabisa staat privacy hoog in het vaandel. Wij vinden het belangrijk dat er zorgvuldig wordt omgegaan met de data die onze bezoekers achterlaten. Zo zult u op onze website geen tracking-cookies vinden van third-parties zoals Facebook, Hotjar of Hubspot. Er worden alleen cookies geplaatst van Google en Vimeo. Deze worden gebruikt voor analyses, om zo de gebruikerservaring van onze websitebezoekers te kunnen verbeteren. Tevens zorgen deze cookies ervoor dat er relevante advertenties worden getoond. Lees meer over het gebruik van cookies in ons privacy statement.