# Gnuradio Mode S project released

**URL:** <https://www.ruby-forum.com/t/gnuradio-mode-s-project-released/197989>\
**Category:** GNU Radio\
**Created:** [October 24, 2010, 4:08am UTC](https://www.ruby-forum.com/t/gnuradio-mode-s-project-released/197989 "2010-10-24T04:08:52Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Post date:** [October 24, 2010, 4:08am UTC](https://www.ruby-forum.com/t/gnuradio-mode-s-project-released/197989/1 "2010-10-24T04:08:52Z")

</div>

Hi all,

I finally got around to cleaning up my Mode S receiver enough for public  
release. The following is a short description of the software:

The Gnuradio Mode S project implements a Mode S/ADS-B receiver. Mode S  
is the latest aircraft transponder technology, primarily used in  
commercial aircraft. Probably 30% of those aircraft currently broadcast  
their position via ADS-B (more in Europe, less in the US), which is a  
protocol that uses Mode S extended squitters as the transport layer. By  
2020 all aircraft operating in controlled US airspace will be required  
to broadcast ADS-B.

The receiver demodulates and decodes the 1090MHz PPM-modulated Mode S  
transmissions using industry-standard techniques to mitigate FRUIT  
(transmissions on top of one another) and correct multiple bit errors.  
Using a USRP with a DBSRX + LNA + SAW filter, ranges of 220 miles have  
been regularly seen. The WBX should allow similar ranges without the  
filter and LNA, although I haven’t really tested WBX much. It is of  
course line-of-sight, making antenna site selection important.

TL;DR: Follow airplanes around from 200 miles with your USRP.

The receiver allows interfacing to a number of output formats, including  
KML for Google Earth. Screenshots of the Google Earth interface can be  
found here:

[http://nerdnetworks.org/~bistromath/photos/adsb/](http://nerdnetworks.org/~bistromath/photos/adsb/)

There is also a TCP port 30003 interface to use with PlanePlotter, a  
third-party application to view aircraft data. PlanePlotter isn’t free,  
and I haven’t tested it at all, so while it should work, YMMV. If you do  
test it, let me know.

There are definitely still bugs in it – one thing that comes to mind is  
that a very few aircraft seem to produce data which uses correct headers  
for position packets but which contains non-position data. This causes  
“impossible” aircraft positions. Luckily it seems to be pretty rare.

Future developments for the receiver include implementation of networked  
multilateration using the VRT timestamps of USRP2. Multilateration  
allows the time-based triangulation of aircraft which use Mode S but  
which do not broadcast ADS-B. Three or more networked USRP2s should  
allow position determination to a reasonable degree of accuracy.

Clone the Git repository to build the software with the usual  
bootstrap/configure/make/make install rigmarole; it should compile on  
anything you have Gnuradio installed on, although with a 4Msps data rate  
it does require a bit of CPU power. In order to use the KML output you  
will have to have libsqlite3 and python-sqlite installed, although since  
those are Python dependencies it will still compile without them. I  
think that’s it for the dependencies. Oh, it uses UHD, so you should  
finally get around to building UHD and gr-uhd to use this software.

git clone git://github.com/bistromath/gr-air-modes.git

There is also a CGRAN page with corresponding SVN repo, which is a  
mirror of the Github repo:  
[https://www.cgran.org/wiki/gr-air-modes/](https://www.cgran.org/wiki/gr-air-modes/)

The Python executable is src/python/uhd\_modes.py.

Best,  
Nick

---

<div class="post-metadata">

**Author:** ![nickfaraday](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/b2d939/32.png) [@nickfaraday](https://www.ruby-forum.com/u/nickfaraday)\
**Post date:** [October 24, 2010, 5:15am UTC](https://www.ruby-forum.com/t/gnuradio-mode-s-project-released/197989/2 "2010-10-24T05:15:37Z")

</div>

On Sat, Oct 23, 2010 at 06:52:34PM -0700, Nick F. wrote:

> Hi all,
> 
> I finally got around to cleaning up my Mode S receiver enough for public  
> release. The following is a short description of the software:

Cool stuff!

Thanks!  
Eric

---

<div class="post-metadata">

**Author:** ![nickfaraday](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/b2d939/32.png) [@nickfaraday](https://www.ruby-forum.com/u/nickfaraday)\
**Post date:** [October 24, 2010, 6:16pm UTC](https://www.ruby-forum.com/t/gnuradio-mode-s-project-released/197989/3 "2010-10-24T18:16:33Z")

</div>

What would be involved in running this with a USRP2 and WBX?

Thanks,  
Al

----- Original Message -----  
From: “Nick F.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Sent: Saturday, October 23, 2010 9:52 PM  
Subject: [Discuss-gnuradio] Gnuradio Mode S project released

---

<div class="post-metadata">

**Author:** ![nickfaraday](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/b2d939/32.png) [@nickfaraday](https://www.ruby-forum.com/u/nickfaraday)\
**Post date:** [October 24, 2010, 6:19pm UTC](https://www.ruby-forum.com/t/gnuradio-mode-s-project-released/197989/4 "2010-10-24T18:19:43Z")

</div>

On Sun, 2010-10-24 at 12:15 -0400, Allen Vinegar wrote:

> What would be involved in running this with a USRP2 and WBX?

Download, compile, run. You should plug an antenna in at some point in  
the process.

If you aren’t using UHD yet, you’ll have to download and install UHD and  
gr-uhd as well as burn a new SD card image. Instructions for that  
process are here:  
[http://code.ettus.com/redmine/ettus/projects/uhd/wiki](http://code.ettus.com/redmine/ettus/projects/uhd/wiki)

–n

---

<div class="post-metadata">

**Author:** ![nickfaraday](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/b2d939/32.png) [@nickfaraday](https://www.ruby-forum.com/u/nickfaraday)\
**Post date:** [October 24, 2010, 6:32pm UTC](https://www.ruby-forum.com/t/gnuradio-mode-s-project-released/197989/5 "2010-10-24T18:32:55Z")

</div>

Thanks for quick answer!

Al

----- Original Message -----  
From: “Nick F.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: “Allen Vinegar” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Cc: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Sent: Sunday, October 24, 2010 12:18 PM  
Subject: Re: [Discuss-gnuradio] Gnuradio Mode S project released

---

<div class="post-metadata">

**Author:** ![nickfaraday](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/b2d939/32.png) [@nickfaraday](https://www.ruby-forum.com/u/nickfaraday)\
**Post date:** [October 24, 2010, 7:47pm UTC](https://www.ruby-forum.com/t/gnuradio-mode-s-project-released/197989/6 "2010-10-24T19:47:09Z")

</div>

Nick,

is it thinkable to operate the decoder at a lower sample rate ?  
(e.g. at 2 MS/s or even less)

```
   *am*
```

---

<div class="post-metadata">

**Author:** ![nickfaraday](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/b2d939/32.png) [@nickfaraday](https://www.ruby-forum.com/u/nickfaraday)\
**Post date:** [October 24, 2010, 8:38pm UTC](https://www.ruby-forum.com/t/gnuradio-mode-s-project-released/197989/7 "2010-10-24T20:38:48Z")

</div>

On Sun, 2010-10-24 at 19:22 +0200, Andrea M. wrote:

> Nick,
> 
> is it thinkable to operate the decoder at a lower sample rate ?  
> (e.g. at 2 MS/s or even less)

Mode S operates at 1Mbit/s bit rate, and being pulse-position-modulated  
the data rate is effectively 2Mchips/s. In order to guarantee at least  
one sample falls reasonably close to the center of the chip you have to  
sample multiple points per chip. If you could ensure somehow that your  
samples were aligned with the chip centers, you could sample at 2Msps.

Nick

---

<div class="post-metadata">

**Author:** ![nickfaraday](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/b2d939/32.png) [@nickfaraday](https://www.ruby-forum.com/u/nickfaraday)\
**Post date:** [October 24, 2010, 9:19pm UTC](https://www.ruby-forum.com/t/gnuradio-mode-s-project-released/197989/8 "2010-10-24T21:19:01Z")

</div>

On 10/24/2010 07:22 PM, Andrea M. wrote:

> is it thinkable to operate the decoder at a lower sample rate ?  
> (e.g. at 2 MS/s or even less)

I found this reference

[http://www.tech-software.net/adsb\_decode1.php](http://www.tech-software.net/adsb_decode1.php)

in a Eric A. Cottrell message that explains why we need an high sample  
rate:

[…]  
I thought that the USRP and DVB tuner board could also receive ADS-B and  
Mode S. I did not know if my discone and long coax run would work. So  
I did some experiments.

I used the fft and oscilloscope programs to check for activity. I did  
see activity on 1090 MHz. I then modified the oscilloscope program to  
do AM detection with the gr.complex\_to\_mag() function. I saw various  
pulse trains that look correct. There were some short ones that look  
like old transponders and longer ones that look like Mode S. I found  
the range of good gain settings was narrow (31 to 35) with 33 to be the  
best. I found the decimation of 16 gave good pulse shapes. The pulse  
timings are in 500 nS units so you need 250 nS sample times at least.  
[…]

So, I believe there is no hope to decode this stuff with HAM SDR  
hardware.

```
     *am*

```

---

<div class="post-metadata">

**Author:** ![nickfaraday](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/b2d939/32.png) [@nickfaraday](https://www.ruby-forum.com/u/nickfaraday)\
**Post date:** [October 24, 2010, 11:40pm UTC](https://www.ruby-forum.com/t/gnuradio-mode-s-project-released/197989/9 "2010-10-24T23:40:26Z")

</div>

Hello,

Articles I read say that a 10MSPS rate gives better performance that a  
8MSPS rate. I used the 8MSPS rate and still got good performance.

The oversampling is used in determining if the pulse is valid or part of  
interference. Some receivers use a huge ROM lookup table to convert all  
the sample values of the PPM slot into a one or zero.

73 Eric  
----- Start Original Message -----  
Sent: Sun, 24 Oct 2010 20:40:18 +0200  
From: Andrea M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: [Discuss-gnuradio] Gnuradio Mode S project released

> ## the range of good gain settings was narrow (31 to 35) with 33 to be the tel: +393356992791 fax: +390623318709
> 
> * * *
> 
> Discuss-gnuradio mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](http://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

----- End Original Message -----
