Implementation of an ADS-B/Mode-S Receiver in GNU Radio

From Ettus Knowledge Base
Revision as of 14:12, 15 May 2016 by Ettus (Talk | contribs) (modes_rx)

Jump to: navigation, search

Application Note Number

AN-363

Revision History

Date Author Details
2016-05-01 Nate Temple Initial creation

Abstract

This AN guides the reader through the implementation of an ADS-B/Mode-S receiver using the gr-air-modes Out-of-Tree (OOT) module for GNU Radio. An explanation of ADS-B is also provided, and several real-world, over-the-air examples and profiled.

Overview

The Ettus Research™ USRP™ (Universal Software Radio Peripheral) is used for a number of military and aerospace applications. In this example, the USRP N210 and WBX daughterboard is used to receive and decode ADS-B/Mode-S beacons from real-world aircraft. While a USRP N210/WBX is used for this demonstration, a B200/B210/B200mini/B205mini/E310/E312 or X300/X310 with an appropriate daughter board will also work. The information from these beacons is displayed on a Google Earth map. This demonstration shows the flexibility offered by GNU Radio, an open source package and it's strong user-base.

The GNU Radio Out-Of-Tree module (OOT) gr-air-modes will be use to receive ADS-B/Mode-S with the USRP.

Introduction

Automatic Dependent Surveillance – Broadcast (ADS–B) is a surveillance technology in which an aircraft determines its position via satellite navigation and periodically broadcasts it, enabling it to be tracked. The information can be received by air traffic control ground stations as a replacement for secondary radar. It can also be received by other aircraft to provide situational awareness and allow self separation.

ADS–B is "automatic" in that it requires no pilot or external input. It is "dependent" in that it depends on data from the aircraft's navigation system.

[ add details about where ADS-B is required and only partially used ]

Requirements

  • Python >= 2.5
  • PyZMQ
  • NumPy
  • SciPy
  • SQLite 3.7 or later
  • CMake 2.6 or later
  • Gnuradio >= 3.5.0
  • Ettus UHD >= 3.4.0

Installation

You will need to have a working installation of GNU Radio and UHD to proceed with this Application Note. If you do not yet have GNU Radio and UHD installed, please reference the Building and Installing the USRP Open-Source Toolchain (UHD and GNU Radio) on Linux and OS X Application Notes.

You can also use the Live SDR Environment to follow along with this Application Note. For more information on the Live SDR Environment, see the Live SDR Environment Getting Started Guides Application Note.

The instructions below will install the required dependencies, build and then install the Out-Of-Tree module gr-air-modes.

   $ sudo apt-get install sqlite3 libsqlite3-dev python-zmq python-numpy python-scipy
   $ git clone https://github.com/bistromath/gr-air-modes.git
   $ cd gr-air-modes/
   $ mkdir build
   $ cd build
   $ cmake ../
   $ make
   $ sudo make install
   $ sudo ldconfig

Usage

After successfully building and installing the gr-air-modes OOT, you will have two applications to receive ADS-B/Mode-S.

modes_rx

  • Command line based, textual output of decoded data


Example modes_rx output:

$ modes_rx -r 10e6
linux; GNU C++ version 4.8.4; Boost_105400; UHD_003.010.git-202-g9e0861e1

-- Opening a USRP2/N-Series device...
-- Current recv frame size: 1472 bytes
-- Current send frame size: 1472 bytes
Setting gain to 19
Gain is 19
Rate is 10000000
Using Volk machine: avx_64_mmx_orc
(-63 0.34132346) Type 0 (short A-A surveillance) from ab3639 at 8200ft (Vertical TCAS resolution only)
(-62 1.38402336) Type 0 (short A-A surveillance) from ac9fbe at 33025ft (Vertical TCAS resolution only)
(-62 1.44277776) Type 0 (short A-A surveillance) from ac9fbe at 33025ft (speed 300-600kt)
(-62 1.64927856) Type 11 (all call reply) from ab3639 in reply to interrogator 0 with capability level 6
(-63 1.68898826) Type 11 (all call reply) from ac9fbe in reply to interrogator 0 with capability level 6
(-65 2.36897966) Type 0 (short A-A surveillance) from ac9ff6 at 33025ft (Vertical TCAS resolution only)
(-69 2.91286006) Type 4 (short surveillance altitude reply) from 70b06 at 58300ft (AIRBORNE ALERT)
(-63 3.06877306) Type 17 BDS0,5 (position report) from ab3639 at (36.102610, -115.289183) at 8350ft
(-64 3.21826886) Type 0 (short A-A surveillance) from a46d29 at 11800ft (Vertical TCAS resolution only)
(-64 3.22831576) Type 0 (short A-A surveillance) from ab3639 at 8375ft (Vertical TCAS resolution only)

modes_gui

  • GUI based interface with Google Maps integration

Starting modes_gui

In order to start modes_gui, invoke it from the command line by running:

   $ modes_gui
modes figure 1.png

After the GUI has started you will need to set the following settings:

  • Select UHD as Source
  • Set Sample Rate
  • Set Threshold
  • Set Gain
  • Optional
    • Set Latitude
    • Set Longitude
    • Check KML and Set Output Filename

After adjusting the above settings, click "Start" to begin capturing ADS-B/Mode-S packets. You will see the Reports/second field fluctuate as packets are decoded; as aircraft are identified, their ID will populate the Visible Aircraft list.

modes figure 2.png

Once aircraft have populated the Visible Aircraft list, if you highlight an ID, and click on the Dashboard tab, it will display the details of the aircraft including it's Bearing, Range, Heading, Speed, Altitude, Climb Rate, Latitude, Longitude and Signal Strength. Not all aircraft will broadcast every field of data.

modes figure 3.png

The Azimuth Map tab will display a plot of overall distance of all received packets that have included Latitude and Longitude data.

modes figure 4.png

The Map tab will overlay the aircraft's broadcasted location in real time.

The Live Data tab will display a scrolling text field of all data packets decoded.

modes figure 5.png

Plotting KML Data

By enabling the KML setting within modes_gui, or with the --KML flag in modes_rx, it will output all aircraft data to a Google Earth compatible KML file. This KML file can be imported into Google Earth and viewed after the capture is complete.

To import the KML data file and auto refresh follow the steps below:

  1. Start Google Earth
  2. Select "Add" -> "Network Link" from the menu bar
  3. Enter a description into the "Name" field such as "ADS-B"
  4. Click "Browse" and navigate to the location of the KML output file and select it
  5. Select the "Refresh" tab
  6. Under the "Time-Based Refresh" select "Periodically" and set a time frame you would like the data to refresh. (e.g. 4 seconds)
  7. Click "OK"
modes figure 6.png

Conclusion

Receiving and decoding ADS-B/Mode-S with a USRP is an exciting and rewarding exercise which demonstrates the flexibility of the USRP in real world applications. Decoding ADS-B/Mode-S is just one of the many applications available using the GNU Radio SDR framework with it's vast library of OOT modules available at CGRAN. For more detailed guides to using your USRP, please see the Application Notes section of the Ettus Research Knowledge Base.

Additional Resources