Tracking planes for $20 or less

My new favourite toy is a cheap $20 USB TV tuner. It’s made to receive DVB-T signals, which aren’t even used in North America. So what use could I possibly have for it?

Back in February, Linux kernel developer Antti Palosaari discovered that certain USB TV tuners can be configured to send the raw, unprocessed radio signal straight to the computer for decoding in software. (They use this mode when tuning FM or DAB radio signals. Think of it as the Winmodem approach to radio.) Palosaari realized that by running the right software, almost any radio signal could be received by these tuners. Not long thereafter, the RTL-SDR project was born, allowing these tuners to be used in Linux.

I should note that receiving (and transmitting) radio signals in software is nothing new. Software-defined radio has been around for years, but the hardware required (such as the Ettus Research USRP has generally been expensive. The availability of a $20 software-defined radio receiver has truly opened up the world of radio to anyone who takes the time to learn.

Since getting my hands on a compatible TV tuner, I’ve been able to listen to police radio, pager networks, garage door openers, air traffic control, and lots more. I recently tweeted that I had succeeded in tracking the aircraft in my area by using my TV tuner as an ADS-B receiver and feeding the output into Google Earth. This caught the interest of a pilot friend of mine, so I thought I’d put together a tutorial for anyone interested in capturing these signals. Although the tutorial is specific to ADS-B, keep in mind that the software tools (and in particular GNU Radio) can be reconfigured to tune in virtually any radio signal.

So let’s get started!

  1. Purchase a USB TV tuner based on the Realtek RTL2832U chip. For best results, choose one that uses the Elonics E4000 tuner, which will let you tune in the widest range of frequencies, from 64 to 1700 MHz. The OsmoSDR site has a list of supported hardware to get you started. I chose the Newsky TV28T tuner, which I purchased from Aliexpress. (I paid 40 USD for two tuners, shipping included.)
  2. If you’re not running it already, download and install Ubuntu Desktop 12.04 LTS. I would recommend using the 64-bit version.
  3. Install all the available Ubuntu software updates using Update Manager and restart.
  4. Download, build and install GNU Radio using the build-gnuradio script. This can be done in a terminal window by running the following commands:

    cd ~
    mkdir build-gnuradio
    cd build-gnuradio/
    chmod a+x ./build-gnuradio

    Note that GNU Radio is quite a large piece of software and has a lot of dependencies, so the install process can take a long time.

  5. Download, build and install gr-air-modes. This is the piece of software that knows how to decode the ADS-B signals that many planes transmit. In a terminal window, run the following commands:

    cd ~
    git clone
    cd gr-air-modes
    cmake .
    sudo make install
    sudo ldconfig

  6. Plug in your TV tuner, and check whether you can receive ADS-B traffic by running the following in a terminal window: --rtlsdr

    If it works, you should see output like the following:

    (-42 0.0000000000) Type 11 (all call reply) from c0636c in reply to interrogator 0 with capability level 6
    (-41 0.0000000000) Type 17 BDS0,5 (position report) from c078b2 at (45.199942, -75.541590) at 30050ft
    (-39 0.0000000000) Type 11 (all call reply) from c078b2 in reply to interrogator 0 with capability level 6
    (-39 0.0000000000) Type 17 BDS0,9-1 (track report) from c078b2 with velocity 443kt heading 259 VS 1664
    (-40 0.0000000000) Type 17 BDS0,5 (position report) from c078b2 at (45.199616, -75.544069) at 30075ft
    (-42 0.0000000000) Type 17 BDS0,5 (position report) from c078b2 at (45.199265, -75.546504) at 30100ft

    We’re already seeing some GPS coordinates and altitudes! Press CTRL-C to stop it for now.

    If you don’t see any traffic, try going outside for better reception.

  7. To see the output in a more convenient form, we’ll use Google Earth. Download the 64-bit .deb version from the download page, and open the file to run the installer.
  8. For nicer-looking fonts in Google Earth, install the xfonts-75dpi and xfonts-100dpi packages by running the following in a terminal window:

    sudo apt-get install xfonts-75dpi xfonts-100dpi

    Then log out and log back in so the new fonts will get loaded.

  9. Launch Google Earth.
  10. If Google Earth fails to launch, it may be because it can’t find libGL. (This happened on one of my two laptops.) To fix it, run the following command in a terminal window:

    sudo ln -s /usr/lib/i386-linux-gnu/mesa/ /usr/lib/

  11. Run again, this time telling it to write its output to a KML file, the format used by Google Earth. In a terminal window, run the following: --rtlsdr --kml=planes.kml

  12. In Google Earth, select “Network Link” from the “Add” menu. Enter “Planes” in the “Name” field, then click the Browse button next to the “Link” field and choose the “planes.kml” file in the file chooser. Click on the “Refresh” tab and set a time-based refresh to occur periodically with a frequency of 5 seconds. Click “OK”, then zoom in to your location. With any luck, you should see some planes start to appear and move around!
  13. To see more details about a plane, click the “X” that appears on the map. Or go to the “Places” section in the left sidebar and expand “Planes” and “Aircraft locations”.

    Here’s a screenshot of Air Canada flight 839 coming in for a landing at YOW, with several more planes at cruising altitude in the background:

Screenshot of gr-air-modes in Google Earth

I hope you find this tutorial useful, and that you’ll do more exploring with software-defined radio once you’ve succeeded in watching planes!

32 thoughts on “Tracking planes for $20 or less”

  1. Great article. Thanks for writing it. I’m sure I’m not the only one to read and appreciate your directions.



    1. I also found these instructions to be a great help. Unfortunately I had to get a new computer and re-install everything and the current version of GNU Radio doesn’t work with gr-air. Does anyone know of a work around or windows alternative until gnu radio fixes its issues?


  2. Hi,

    Sorry for this newbee question! πŸ˜‰
    I have very little linux experience.
    everything works well untill i get to this command:
    “git clone
    it prompts me for a username and password on “”

    Is there any “anonymous” account i can use? or should i register on


    1. There should be no need to register with github, since gr-air-modes is a public repository. Can you show me the exact message you get back when you run the command?

  3. For those of who tried and failed (like me):

    1.- I used the same newsky receiver from the same store. Arrived on time and worked perfectly. Great bang for the buck!

    2.- The receiver program ( is now called modes_rx. Don’t worry for apparently they work in the same fashion (using the same commandline options, too). Install instructions are the same, but you will get a notice when you try to launch the old one.

    3.- I dind’t manage to run Google Earth from the Google-offered .deb package (as recommended). I kept on getting crashes due to missing libCl and libClGL libraries (if you don’t dig too far the error just reads “google earth crashed with signal 11”). Deinstalled the google .deb package and used the google-earth-package metapackage from the ubuntu repository. That worked like a charm (and you get the added benefit of windows-fonts auto installation).

    This is frikin’ amazing πŸ˜€

  4. Very good tutorial. Having a hard time with Google Earth not displaying any of the textures, but everything else worked fine. I installed in on a 2012 Macbook Pro (9,1) and it has been working very well. I watched an airplane fly over my head as I tracked it.

    If I wanted to look more into software defined radio, where would I start? Where would I go to learn how to decode ADS-B signals?

  5. Thanks for this amazing tutorial. You mentioned that you can use the tuner to receive all kinds of signals. I live in the Washington DC metro area and, as you can imagine, there are a lot of interesting things to listen to around here. How would you use the TV tuner you have to pick up police radio frequencies? Is there a tutorial and/or software for that available online? Any help appreciated. Thanks!

  6. Is there a way to filter the responses so that you only see a particular aircraft that is transmitting an AD-B signal? Before you answer this, I assume you must be in range of the particular aircraft for this to work.

    I am looking for a solution that will allow my company to track our fleet anywhere in the country with ADS-B. Anybody have any ideas?

    1. I’m not sure whether gr-air-modes supports filtering, but if not it should be easy to add it in as a feature, or filter its with another program.

      ADS-B signals require line of sight, so they only have a range of a few hundred kilometers. You would need a lot of receivers if you wanted complete coverage of a large geographic area.

      Do airports distribute the ADS-B information they receive? There are lots of flight tracking web sites and apps out there and they must be getting their data from somewhere.

    2. I’m a pilot and I use to track my own airplane. If you register with the service you can set up multiple tail numbers to track real time and it also retains historical data for every IFR flight plan.

  7. I know you’re recommending 64 bit Intel/AMD but what about quad core ARM? (1.7Ghz ARM Cortex-A9 Quad Cores that is)

    If it worked it could be bundled into quite a small appliance. It needn’t include the google earth elements and just provide a service (I can think of a few applications that would fall short of just watching planes for interest sake.


    1. In my experience, GNU Radio performance on ARM is quite bad. I couldn’t even do something as simple as filtering an audio signal in real time on my Raspberry Pi, so I doubt you’d be able to run gr-air-modes even on a more powerful ARM chip. My guess is that the GNU Radio project’s optimization efforts have focused on x86.

  8. Thank you for this great tutorial! I got my dongle today, and already got a plane on GoogleEarth (only one, I’m in a pretty isolated house using the crappy antenna) :) I am using the GUI version of the program (modes_gui) which is full of nice features. And I think the program is updated since this article was written. I get this message when I do: –rtlsdr

    ERROR: has been deprecated. The new application name is modes_rx.


    1. From a post earlier in this thread it was noted that ‘modes_rx’ is the new utility which to type at the command prompt. If you read above the writer states that the same commands for the utility are used.

  9. when I got to step 5, it says it is a read only file system.
    does anyone know how to fix it?
    sorry, linux newbie

  10. Just wanted to say thanks for a great post – these instructions still hold up exactly, even a year after they were originally posted!

  11. my computer is 64bit ,an ubuntu12.04 . Used the build-gnuradio to install . Then I install gr-air-modes,the step cmake run error,like this:
    — Build type not specified: defaulting to release.
    — checking for module ‘gnuradio-core’
    — package ‘gnuradio-core’ not found
    — checking for module ‘gnuradio-core’
    — package ‘gnuradio-core’ not found
    — Found GNURADIO_CORE: /usr/local/lib
    CMake Error at CMakeLists.txt:76 (message):
    Gruel required to compile gr-air-modes

    — Configuring incomplete, errors occurred!

    Anyone can help? I will appreciate

  12. I’m getting the following errors after running “cmake .” (without the quotes) in step 5. Any ideas where I might be going wrong?

    smare@ubuntu:~/gr-air-modes$ cmake .
    -- The CXX compiler identification is GNU
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Build type not specified: defaulting to release.
    -- Boost version: 1.48.0
    -- Found the following Boost libraries:
    -- date_time
    -- program_options
    -- filesystem
    -- system
    -- thread
    -- checking for module 'gnuradio-core'
    -- package 'gnuradio-core' not found
    -- checking for module 'gnuradio-core'
    -- package 'gnuradio-core' not found
    CMake Error at CMakeLists.txt:76 (message):
    Gruel required to compile gr-air-modes

    -- Configuring incomplete, errors occurred!

    I ran these exact steps about a year ago and everything worked great! I’m guessing the issue has to be with the build of GNU_Radio in step 4. Any help would be greatly appreciated!

    1. Author here. Reposting after seeing your Reddit post, so other readers get the right info.

      The “master” branch of gr-air-modes remains on Gnuradio 3.6 due to the large number of users still on GR3.6. There’s a “next” branch with lots of new work and GR3.7 compatibility. Just do:

      user@ubuntu:~/gr-air-modes$ git checkout next

      …then build and install as usual. Also note, there’s a GUI app in the next branch (that doesn’t appear in the master branch). Just run “modes_gui” instead of “”.

      Eventually I’ll move the next branch into master. Just haven’t done it yet.

      One last thing: Casual Linux users who don’t want to fuss with installing Gnuradio and gr-air-modes and everything else, there’s a prebuilt ISO image here with Ubuntu 12.04, Gnuradio, gr-air-modes, and a bunch of other goodies here:

      Have fun!

  13. This is neat.

    I am putting two programs to teach H. S. Kids. One is Raspberry PI Robotics programming (linux) and the other is an intro to Ham radio. Considering ARPS, and other formats using a TNC, seems like this unit would be able to do alot. For the guy wanting to track a fleet of trucks, I have used DSC marine tracking for safety patrols on our waterways using a chart plotter and breadcrumbs but I know of others using Google Earth.

    Looking forward to getting permission from the boss (girlfriend) to get one and experiment.

    1. Keep in mind that these instructions are already somewhat out of date — you’ll probably find more recent tutorials elsewhere. Also, if you’re interested in purchasing an RTL-SDR dongle, I’d suggest you check out NooElec.

  14. I noticed in another article you are making the Raspberry Pi less British πŸ˜‰ I also note that here you are using quite a low cost Dongle. A group of engineers, again in the UK (we call ourselves SDRplay) has just brought out a more expensive ‘Radio Spectrum Processor’ which can process chunks of bandwidth up to 8MHz wide (currently works with SDR#) . But more interestingly we have documented all the APIs which control the tuner settings. Something like a Raspberry Pi could act as a host CPU allowing someone to make a very high performance passive Radar solution terminal for example. The very first review of the RSP for VHF DXing is out on

  15. This is great! But I’m having an issue where when using my USRP and Google Earth – the aircraft locations does not expand out. Using a Macbook Air btw. I get this in the X11 term:

    (-63 631.49576590) Type 0 (short A-A surveillance) from bbe6ba at 32500ft (No TCAS)
    (-64 631.86933710) Type 4 (short surveillance altitude reply) from b2cdb2 at 3100ft (SPI ALERT)
    (-64 633.24241810) Type 4 (short surveillance altitude reply) from ab541b at 39900ft (SPI)
    (-63 633.50004410) No handler for message type 24 from 99708b
    (-61 636.09070690) Type 4 (short surveillance altitude reply) from 85d261 at 46800ft (aircraft is on the ground)
    (-63 637.13180440) Type 0 (short A-A surveillance) from f7184b at 8875ft (speed 150-300kt)
    (-62 637.48916240) Type 0 (short A-A surveillance) from 915ef0 at 106300ft (speed 2400-4800kt)
    (-64 638.15547510) Type 0 (short A-A surveillance) from 7e8a33 at 59900ft (speed 300-600kt)
    (-64 639.98079410) Type 0 (short A-A surveillance) from 91842f at 124500ft (Full TCAS resolution) (aircraft is on the ground)
    (-63 640.10010260) No handler for message type 24 from e05db6
    (-62 640.58876360) Type 5 (short surveillance ident reply) from 523355 with ident 5406 (SPI ALERT)
    (-62 641.75643410) No handler for message type 24 from 85c54a
    (-63 642.46401490) Type 0 (short A-A surveillance) from 47e70 at 3100ft (speed 75-150kt) (aircraft is on the ground)
    (-64 642.54134840) No handler for message type 24 from aa5145
    (-62 643.53722890) Type 5 (short surveillance ident reply) from 184721 with ident 3630 (SPI)
    (-63 644.21703560) Type 5 (short surveillance ident reply) from e3c10 with ident 330 (aircraft is on the ground)
    (-63 645.02057490) No handler for message type 24 from 783889
    (-63 645.19892140) No handler for message type 24 from 24d9a8
    (-64 645.59874090) No handler for message type 24 from 5edbbc
    (-64 646.64577510) No handler for message type 24 from f4a97a
    (-62 647.74356410) Type 4 (short surveillance altitude reply) from a2a997 at 6000ft (GROUND ALERT)
    (-61 647.93341710) Type 5 (short surveillance ident reply) from 457c43 with ident 268 (aircraft is on the ground)
    (-64 651.10083090) No handler for message type 24 from ac7d50
    (-62 652.21720310) Type 5 (short surveillance ident reply) from 1a5aa6 with ident 2532 (aircraft is on the ground)
    (-61 654.57939160) Type 4 (short surveillance altitude reply) from f0d990 at 4850ft (SPI)
    (-61 654.67916860) Type 4 (short surveillance altitude reply) from 5fc1c8 at 54200ft (GROUND ALERT)
    (-63 655.93728940) No handler for message type 24 from 40f7e0
    (-64 656.13259810) No handler for message type 24 from cda7f1
    (-63 657.19610740) Type 4 (short surveillance altitude reply) from 5b837b at 23300ft (aircraft is on the ground)


Leave a Reply

Your email address will not be published. Required fields are marked *