Mode S and ADS-B

Hello,

I finally checked in the infamous Mode Select code to
branches/developers/wb1hbu/wip and I am glad this portion is done.

I spent a couple of days cleaning the code up a little. I also added
some features. Likely I missed using a few neat gnuradio functions.

There is a usrp_oscope_ms.py program that displays the Mode Select
signal, Reference Level, and Attributes. Triggering off of channel 2
(Reference Level) allows the display of Mode Select waveforms. I made
the attributes go negative so they are more visible. I was surprised at
the results.

The usrp_mode_s_logfile.py program outputs Mode Select frame information
to a log file. It does no decoding of the data. It logs the data bits
and other attributes of the signal and error correction. It is a good
program to run if you are in a heavy air traffic area and want to
generate megabytes of text within an hour.

73 Eric

Eric A. Cottrell wrote:

(Reference Level) allows the display of Mode Select waveforms. I made
the attributes go negative so they are more visible. I was surprised at
the results.

The usrp_mode_s_logfile.py program outputs Mode Select frame information
to a log file. It does no decoding of the data. It logs the data bits
and other attributes of the signal and error correction. It is a good
program to run if you are in a heavy air traffic area and want to
generate megabytes of text within an hour.
Hi Eric,
I tried out your code.
Does it run on your machine in realtime?
I have a dual-core athlon X2 3800 and both processor go to 100 % when I
run it.
(I didn’t know gnuradio could use both processors , I though we still
had the single-threaded-scheduler)

This gives me a lot of USRP overruns (UoUoUo) so it doesn’t work very
well this way.
Does mode-s really need a samplerate of 8000000

Another question.
I know 1090 Mhz is the frequency they use in the US.
I googled for info on frequencies for mode-s and ads-b and it seems
multiple frequencies could be used.
Does anyone know of an overview of the actual frequencies in use, at
which places.
(I live in the netherlands)

Greetings,
Martin
I tried increasing the decimation but then the code refuses to run
(requires 8000000 sps)

Martin D. wrote:

Hi Eric,
I tried out your code.
Does it run on your machine in realtime?
Yes. It works quite well on my Core 2 Duo.
I have a dual-core athlon X2 3800 and both processor go to 100 % when I run it.
(I didn’t know gnuradio could use both processors , I though we still had the single-threaded-scheduler)

This gives me a lot of USRP overruns (UoUoUo) so it doesn’t work very well this way.
Does mode-s really need a samplerate of 8000000
The methods I used to implement the code do require 8000000 and that is
the slower rate with 10000000 the preferred rate. I may be wasting some
CPU cycles.

One thing to try is to use the scope program to set the threshold. The
default is low for alot of front ends including the DBSRX. The DBSRX
tends to be deaf. Also I find a gain setting of 32 to 36 seems to work
best for the DBSRX. If the threshold is set too low I find that so much
data is being processed that even my Core 2 Duo will start UoUoUo a
little. I set the threshold so that most of the noise is below the
threshold value. Try a gain of 32 and a threshold of 75 to start. If
you set the scope to sync on channel 2 going negative you should see
Mode Select frames of various amplitudes.

Getting the antenna up in the clear is important. A discone will work
if you have a good receiver but I found building a simple 1/4 wave
ground plane on an N connector beats out the discone.

I had good results using my AOR 5000 as a front end. I used the
wideband IF output through a 20 dB amplifier to the LFRX board. I have
tried other receivers with tapped IF outputs and did not get good
results. I think it is the combination of the low noise front end of
the AOR 5000 and being able to turn off AGC.

I am experimenting with antennas and want to find a GAsFet preamp that
covers the band here in the US.

Another question.
I know 1090 Mhz is the frequency they use in the US.
I googled for info on frequencies for mode-s and ads-b and it seems multiple frequencies could be used.
Does anyone know of an overview of the actual frequencies in use, at which places.
(I live in the netherlands)
1090 MHz is the international frequency. You may be thinking about UAT
for smaller private aircraft.

73 Eric

Eric A. Cottrell wrote

One thing to try is to use the scope program to set the threshold. The
default is low for alot of front ends including the DBSRX. The DBSRX
tends to be deaf. Also I find a gain setting of 32 to 36 seems to work
best for the DBSRX.

The DBSRX typically has a noise figure around 3-5dB. I wouldn’t call
that deaf. You are connecting a discone to a wide open front end
without a filter, so it is far more likely that you are experiencing
desense from the thousands of other signals you are picking up. Also,
raising the gain above 32 would reduce the noise figure you see.

Getting the antenna up in the clear is important. A discone will work
if you have a good receiver but I found building a simple 1/4 wave
ground plane on an N connector beats out the discone.

Probably because it is more frequency selective than the discone, thus
reducing the strong interferers.

When you set up a discone on the DBSRX you need to understand that you
are picking up multiple cellphone bands, the pager bands, 2 ISM bands,
microwave ovens, radars, etc, in addition to the nice weak signals you
are looking for.

Matt

Eric A. Cottrell wrote:

signal, Reference Level, and Attributes. Triggering off of channel 2
73 Eric
Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page


View this message in context:
http://www.nabble.com/Mode-S-and-ADS-B-tf4016583.html#a12406175
Sent from the GnuRadio mailing list archive at Nabble.com.

Matt E. wrote:

raising the gain above 32 would reduce the noise figure you see.

Getting the antenna up in the clear is important. A discone will work
if you have a good receiver but I found building a simple 1/4 wave
ground plane on an N connector beats out the discone.

Hello,

Well I got spoiled with my AOR 5000 as a front end. It uses a GAs MES
FET as a front end for 1.0 to 1.6 GHz. Unfortunely the GAs MES FET is
not working but it only cuts the range in half. I was using an external
Preamp but that got broken when I hooked it up in the car. I assume
when they say 12 volts that they mean 12 volts and not over 13.6 volts.

I tended to use 36 as gain for the DBSRX. I used my DBSRX board
yesterday and got different results from earlier tests. It appears the
Maxium chip is working but the LNA is gone. Time to order another
one.

Probably because it is more frequency selective than the discone, thus
reducing the strong interferers.

When you set up a discone on the DBSRX you need to understand that you
are picking up multiple cellphone bands, the pager bands, 2 ISM bands,
microwave ovens, radars, etc, in addition to the nice weak signals you
are looking for.

Not to mention the decrease of gain from the discone. Another factor at
my station is my discone is lower and has more blockage. I need to
replace the coax at my test antenna site because the N connector came
off and the coax got exposed to the rain.

I am upset because I want to test my code to make sure my later changes
did not break anything but hardware keep breaking! So it may be
possible the code in my branch does not work as good as past code. I
want to do some testing of various setups but I need to get everything
working again. :frowning:

73 Eric

Eric A. Cottrell wrote:

/usr/local/lib/python/site-packages/gnuradio). The default
prefix for compile is /usr/local so you may have to add subdirectories
under the /usr/local directory to various paths.

73 Eric

Thanks Eric,
I see what you are saying. What I ended up doing to correct the error
is svn’d your version of gnuradio:
svn co http://gnuradio.org/svn/gnuradio/branches/developers/wb1hbu/wip/
gnuradio.1
then: ./bootstrap, ./configure, make, make check, make install.
What does it take to keep a stable release of gnuradio and only add your
piece of gr-air and have it all compile and install correctly?

Now when I run usrp_mode_s_logfile.py I get:

Traceback (most recent call last):
File “./usrp_mode_s_logfile.py”, line 3, in ?
from gnuradio import gr, gru, usrp, optfir, eng_notation, blks, air
File “/usr/local/lib/python2.4/site-packages/gnuradio/gr/init.py”,
line 27, in ?
from gnuradio_swig_python import *
File
“/usr/local/lib/python2.4/site-packages/gnuradio/gr/gnuradio_swig_python.py”,
line 23, in ?
from gnuradio_swig_py_runtime import *
File
“/usr/local/lib/python2.4/site-packages/gnuradio/gr/gnuradio_swig_py_runtime.py”,
line 6, in ?
import _gnuradio_swig_py_runtime
ImportError: libgromnithread.so: cannot open shared object file: No such
file or directory

When I run a find on libgromnithread.so I get:
/usr/local/lib/libgromnithread.so
/home/towens/gnuradio.1/omnithread/.libs/libgromnithread.so

I did see a make check error that showed error on check_TESTS
/gnuradio.1/gnuradio-core/src/python/gnuradio/gr, check_am, and
check_recursive

Thanks for your help,

Tom

Tom O wrote:

Tom

Hello,
air is the name of the python library that contains the gr-air blocks.
Make sure you compiled and installed gnuradio properly and have
PYTHONPATH set correctly.
There should be several _air.* and air.* files in site-packages/gnuradio
(typically /usr/lib/python/site-packages/gnuradio or
/usr/local/lib/python/site-packages/gnuradio). The default
prefix for compile is /usr/local so you may have to add subdirectories
under the /usr/local directory to various paths.

73 Eric

Eric A. Cottrell wrote:

/usr/local/lib/python/site-packages/gnuradio). The default
prefix for compile is /usr/local so you may have to add subdirectories
under the /usr/local directory to various paths.

73 Eric

Eric,

(I can find numpy at /usr/lib/python2.4/site-packages/Numeric/_numpy.so)

Here is the make check errors:

EE

======================================================================

ERROR: test_blks_import (main.test_head)


Traceback (most recent call last):

File “./qa_kludged_imports.py”, line 35, in test_blks_import

from gnuradio import blks

File
“/home/towens/gnuradio/gnuradio-core/src/python/gnuradio/blks/init.py”,
line 37, in ?

exec “from gnuradio.blksimpl.%s import *” % (f,)

File “”, line 1, in ?

File
“/home/towens/gnuradio/gnuradio-core/src/python/gnuradio/blksimpl/qam256.py”,
line 28, in ?

from gnuradio import gr, gru, modulation_utils

File
“/home/towens/gnuradio/gnuradio-core/src/python/gnuradio/gru/init.py”,
line 37, in ?

exec “from gnuradio.gruimpl.%s import *” % (f,)

File “”, line 1, in ?

File
“/home/towens/gnuradio/gnuradio-core/src/python/gnuradio/gruimpl/gnuplot_freqz.py”,
line 28, in ?

import numpy

ImportError: No module named numpy

======================================================================

ERROR: test_gru_import (main.test_head)


Traceback (most recent call last):

File “./qa_kludged_imports.py”, line 39, in test_gru_import

from gnuradio import gru

File
“/home/towens/gnuradio/gnuradio-core/src/python/gnuradio/gru/init.py”,
line 37, in ?

exec “from gnuradio.gruimpl.%s import *” % (f,)

File “”, line 1, in ?

File
“/home/towens/gnuradio/gnuradio-core/src/python/gnuradio/gruimpl/gnuplot_freqz.py”,
line 28, in ?

import numpy

ImportError: No module named numpy

Traceback (most recent call last):

File “./qa_rational_resampler.py”, line 24, in ?

from gnuradio import blks

File
“/home/towens/gnuradio/gnuradio-core/src/python/gnuradio/blks/init.py”,
line 37, in ?

exec “from gnuradio.blksimpl.%s import *” % (f,)

File “”, line 1, in ?

File
“/home/towens/gnuradio/gnuradio-core/src/python/gnuradio/blksimpl/qam256.py”,
line 28, in ?

from gnuradio import gr, gru, modulation_utils

File
“/home/towens/gnuradio/gnuradio-core/src/python/gnuradio/gru/init.py”,
line 37, in ?

exec “from gnuradio.gruimpl.%s import *” % (f,)

File “”, line 1, in ?

File
“/home/towens/gnuradio/gnuradio-core/src/python/gnuradio/gruimpl/gnuplot_freqz.py”,
line 28, in ?

import numpy

ImportError: No module named numpy

Setting runtime on 0x8166d50 to 0x810cfb8

start: entered

flattening test_block

start_threads: entered

wait: entered

.Setting runtime on 0x8166d50 to 0x8178168

start: entered

flattening test_block

start_threads: entered

wait: entered

start: entered

FAIL: run_tests

===================

1 of 1 tests failed

===================

make[6]: *** [check-TESTS] Error 1

make[6]: Leaving directory
`/home/towens/gnuradio/gnuradio-core/src/python/gnuradio/gr’

make[5]: *** [check-am] Error 2

make[5]: Leaving directory
`/home/towens/gnuradio/gnuradio-core/src/python/gnuradio/gr’

make[4]: *** [check-recursive] Error 1

make[4]: Leaving directory
`/home/towens/gnuradio/gnuradio-core/src/python/gnuradio’

make[3]: *** [check-recursive] Error 1

make[3]: Leaving directory
`/home/towens/gnuradio/gnuradio-core/src/python’

make[2]: *** [check-recursive] Error 1

make[2]: Leaving directory `/home/towens/gnuradio/gnuradio-core/src’

make[1]: *** [check-recursive] Error 1

make[1]: Leaving directory `/home/towens/gnuradio/gnuradio-core’

make: *** [check-recursive] Error 1

Thanks again,

Tom

Tom -

On Aug 31, 2007, at 10:18 AM, Tom Owens wrote:

(I can find numpy at /usr/lib/python2.4/site-packages/Numeric/
_numpy.so)

You haven’t installed numpy yet, or it’s not in the PYTHONPATH
environment variable; the “_numpy.so” you refer to is just a shared
library in the Numeric package.

After installing numpy you’ll have a directory: /usr/lib/python2.4/
site-packages/numpy … or wherever numpy gets installed on your
system; just make sure that prefix is included in the PYTHONPATH. - MLD

On Fri, Aug 31, 2007 at 09:37:25AM -0400, Tom Owens wrote:

ImportError: cannot import name air
There should be several _air.* and air.* files in site-packages/gnuradio
is svn’d your version of gnuradio:
svn co http://gnuradio.org/svn/gnuradio/branches/developers/wb1hbu/wip/
gnuradio.1
then: ./bootstrap, ./configure, make, make check, make install.
What does it take to keep a stable release of gnuradio and only add your
piece of gr-air and have it all compile and install correctly?

Two separate build trees each specifying their own --prefixes. You’ll
need distinct values of PYTHONPATH to select between the two at
runtime.

Eric KGNU

Eric B. wrote:

Hi Eric,
Hello,

I believe that’s an obsolete piece of Numeric (Numeric != numpy).

When I install numpy, it ends up in it’s own directory like this:

/usr/local/lib/python2.4/site-packages/numpy

Eric K7GNU

Thanks all,
I went to http://numeric.scipy.org which led me to
http://sourceforge.net/projects/numpy and installed NumPy. I suppose I
should read the README that comes with gnuradio when I go to a different
version gnuradio. Eric C.'s usrp_oscope_ms.py seems to work now.
I’ll have to take a look at it since the default parameters give alot of
USRP overruns. Make check was successful besides the timeout problem
with mblock.

-Tom

On Fri, Aug 31, 2007 at 10:18:15AM -0400, Tom Owens wrote:

ImportError: cannot import name air
PYTHONPATH set correctly.

(I can find numpy at /usr/lib/python2.4/site-packages/Numeric/_numpy.so)

Here is the make check errors:

I believe that’s an obsolete piece of Numeric (Numeric != numpy).

When I install numpy, it ends up in it’s own directory like this:

/usr/local/lib/python2.4/site-packages/numpy

Eric K7GNU