Fork of the Flightaware dump1090 code base with an additional branch for integration with the EOSS SDR system.
Go to file
Oliver Jowett bff71dc820
Move all converters to starch-based implementations (#97)
* Switch all conversion routines to use starch.

main user-visible changes:

 * ensure you check out submodules ('git clone --recurse-submodules")
 * --version shows the CPU features and DSP implementations in use
 * --wisdom allows overriding of the built-in architecture wisdom
 * --dcfilter no longer supported
 * "starch-benchmark" binary will benchmark all options on the
   current machine and can produce a wisdom file to feed to
   the --wisdom option

If you have a usecase for --dcfilter, please get in touch and
let me know - it's an edge case and for now there's no starch/DSP
support for it, but support can be written if needed.

In almost all cases the new conversion routines are slightly or
substantially faster than the old conversion routines. The only case
that is slower is SC16/SC16Q11 on a Pi 0, which is around 10% slower
due to changing from heavily approximated lookup tables to higher
quality results (but SC16 is probably already out of reach of a Pi 0)

* No need to build with SC16Q11_TABLE_BITS any more

* Add oneoff/uc8_capture_stats

(reads a UC8 capture; measures min/max/mean I and Q)

* Switch UC8 conversion to 127.4 center, 128 range.

Looking at actual UC8 captures from a RTL2832, the mean I and Q
are actually at 127.4, so use that as the zero point.

This means that the resulting I/Q maximum values could be as large as
127.6. Switch to 128 for simplicity.

* Switch to the new UC8 zero offset in benchmarks, fix some bugs

* Fix some bugs in SC16/SC16Q11 validation, tighten the max error requirements

* Ditch UC8 approximation path, add a NEON VRQSQRTE path.

* Tweak the SC16 exact path, add a new impl that uses a mix of
u32 & floats.

* SC16Q11 impl tweaks:

 * add a u32->float exact path
 * ditch the approximation path
 * add a NEON VRSQRTE path
 * add a 12-bit table path (using the full signed I/Q value, not absolute value)

* Ditch SC16 approximation path, add NEON vrsqrte path

* Add oneoff/dsp_error_measurement

This runs sample input through the DSP functions that are
allowed to be inexact and dumps the results as a TSV suitable for
feeding to gnuplot to look at the actual errors.

* Update make clean, make wisdom targets

* Update wisdom based on benchmarking

* Preserve the raw wisdom benchmark data

* Update to latest starch

* Update .gitignore for new wisdom files

* Update starch generated code

* Build starch-benchmark as part of the 'all' target

* Use wisdom from /etc/dump1090-fa/wisdom.local if present

* Package starch-benchmark and a helper script to generate local wisdom data

* Remove submodules in preparation for importing them directly

* Import cpu_features v0.6.0 from https://github.com/google/cpu_features/releases/tag/v0.6.0

* Import starch at commit a725c8491dc33a321565d451b385131e589d8490
from https://github.com/flightaware/starch
2021-01-21 19:45:00 +08:00
bladerf bladeRF docs and custom bitstream. 2017-02-03 00:36:41 +00:00
compat Try to clean up the compat stuff a bit 2020-08-07 15:08:45 +08:00
cpu_features Move all converters to starch-based implementations (#97) 2021-01-21 19:45:00 +08:00
debian Move all converters to starch-based implementations (#97) 2021-01-21 19:45:00 +08:00
debian-jessie Move all converters to starch-based implementations (#97) 2021-01-21 19:45:00 +08:00
debian-stretch Move all converters to starch-based implementations (#97) 2021-01-21 19:45:00 +08:00
dsp Move all converters to starch-based implementations (#97) 2021-01-21 19:45:00 +08:00
oneoff Move all converters to starch-based implementations (#97) 2021-01-21 19:45:00 +08:00
public_html Fix up long decimal issue for min/max altitude values 2020-12-14 23:24:45 +00:00
starch Move all converters to starch-based implementations (#97) 2021-01-21 19:45:00 +08:00
testfiles Initial commit of Dump1090, a simple Mode S decoder. 2013-01-05 13:52:25 +01:00
tools Update README with current compressed csv file 2020-09-24 06:10:58 +00:00
wisdom Move all converters to starch-based implementations (#97) 2021-01-21 19:45:00 +08:00
.gitattributes Compress vrs.csv since it's basically readonly. 2016-09-10 17:43:10 +01:00
.gitignore Move all converters to starch-based implementations (#97) 2021-01-21 19:45:00 +08:00
.travis.yml More build deps 2019-03-04 15:43:45 +00:00
COPYING GPL. 2015-01-20 16:49:01 +00:00
Jenkinsfile Remove dump1090.deb reference in Jenkinsfile breaking builds 2020-09-11 22:12:24 +00:00
LICENSE GPL. 2015-01-20 16:49:01 +00:00
Makefile Move all converters to starch-based implementations (#97) 2021-01-21 19:45:00 +08:00
Makefile.cpufeatures Move all converters to starch-based implementations (#97) 2021-01-21 19:45:00 +08:00
README-json.md Expose modea_hit / modec_hit in aircraft.json 2020-08-24 15:03:17 +08:00
README.md Update FreeBSD instructions to use pkg not ports for pkgconf 2020-08-24 14:15:09 +08:00
ais_charset.c Put ais_charset in its own file to make building commb tests a little easier 2019-05-02 17:24:26 +08:00
ais_charset.h Put ais_charset in its own file to make building commb tests a little easier 2019-05-02 17:24:26 +08:00
anet.c IPv6 support (in theory). 2016-02-16 13:00:55 +00:00
anet.h IPv6 support (in theory). 2016-02-16 13:00:55 +00:00
comm_b.c Remove comm-b "consistency" bonuses, look at inconsistent data only. 2019-05-02 18:19:27 +08:00
comm_b.h WIP: More Comm-B & ADS-B decoding. 2017-06-15 18:07:40 +01:00
convert.c Move all converters to starch-based implementations (#97) 2021-01-21 19:45:00 +08:00
convert.h Whitespace changes only: cleaning up trailing whitespace at EOL 2017-06-15 18:17:07 +01:00
cpr.c fix -Wmissing-declaration warnings 2020-06-29 16:42:21 -07:00
cpr.h Whitespace changes only: cleaning up trailing whitespace at EOL 2017-06-15 18:17:07 +01:00
cprtests.c Whitespace changes only: cleaning up trailing whitespace at EOL 2017-06-15 18:17:07 +01:00
cpu.c Move all converters to starch-based implementations (#97) 2021-01-21 19:45:00 +08:00
cpu.h Move all converters to starch-based implementations (#97) 2021-01-21 19:45:00 +08:00
crc.c Whitespace changes only: cleaning up trailing whitespace at EOL 2017-06-15 18:17:07 +01:00
crc.h Whitespace changes only: cleaning up trailing whitespace at EOL 2017-06-15 18:17:07 +01:00
demod_2400.c Factor out FIFO handling; reimplement as a linked list, not a circular buffer. 2020-08-05 19:50:38 +08:00
demod_2400.h Whitespace changes only: cleaning up trailing whitespace at EOL 2017-06-15 18:17:07 +01:00
dsp-types.h Move all converters to starch-based implementations (#97) 2021-01-21 19:45:00 +08:00
dump1090.c Move all converters to starch-based implementations (#97) 2021-01-21 19:45:00 +08:00
dump1090.h Move all converters to starch-based implementations (#97) 2021-01-21 19:45:00 +08:00
faup1090.c Clean up linkage of struct Modes to actually make sense. 2020-06-06 21:52:04 +08:00
fifo.c fifo_acquire / fifo_dequeue: maybe fix pthread_cond_timedwait error handling 2020-11-17 19:59:59 +08:00
fifo.h Factor out FIFO handling; reimplement as a linked list, not a circular buffer. 2020-08-05 19:50:38 +08:00
icao_filter.c Avoid false positives for address 000000 in the icao filter hashtable 2020-10-08 19:30:06 +08:00
icao_filter.h Whitespace changes only: cleaning up trailing whitespace at EOL 2017-06-15 18:17:07 +01:00
interactive.c Interactive mode updates 2020-09-29 06:23:55 -06:00
mode_ac.c More WIP 2017-12-07 10:34:08 -06:00
mode_s.c Treat ADS-R as a separate source type (higher priority than TIS-B, lower priority than direct ADS-B) 2019-12-11 12:43:19 -06:00
mode_s.h Put ais_charset in its own file to make building commb tests a little easier 2019-05-02 17:24:26 +08:00
net_io.c Forward MLAT traffic to Stratux JSON output, marked with IsMlat:true value in JSON 2020-09-10 10:20:21 +02:00
net_io.h faup1090: write _v on every line, bump TSV_VERSION 2019-03-19 18:10:38 +00:00
prepare-build.sh Drop wheezy support. 2020-08-06 13:44:07 +08:00
sdr.c Handle builds with no SDR support better. 2020-08-11 12:55:17 +08:00
sdr.h Factor out sdr thread CPU monitoring 2020-08-05 19:50:38 +08:00
sdr_bladerf.c Clean up the bladerf driver a bit 2020-08-05 19:50:38 +08:00
sdr_bladerf.h Whitespace changes only: cleaning up trailing whitespace at EOL 2017-06-15 18:17:07 +01:00
sdr_hackrf.c Fix hackrf compilation when uint64_t is not a long 2020-08-05 19:50:38 +08:00
sdr_hackrf.h Added support for HackRF One 2019-12-09 18:55:40 -03:00
sdr_ifile.c Factor out FIFO handling; reimplement as a linked list, not a circular buffer. 2020-08-05 19:50:38 +08:00
sdr_ifile.h Whitespace changes only: cleaning up trailing whitespace at EOL 2017-06-15 18:17:07 +01:00
sdr_limesdr.c limesdr: use --gain (in dB) if --limesdr-gain was not specified 2020-10-01 13:53:50 +08:00
sdr_limesdr.h limesdr: basic implementation of LimeSDR support 2020-07-29 23:09:27 +03:00
sdr_rtlsdr.c Use a bounce buffer for rtlsdr on ARM to work around zero-copy problems. 2020-08-05 19:50:38 +08:00
sdr_rtlsdr.h Whitespace changes only: cleaning up trailing whitespace at EOL 2017-06-15 18:17:07 +01:00
stats.c Add stats for unreliable tracks 2019-11-27 21:41:33 +08:00
stats.h Add stats for unreliable tracks 2019-11-27 21:41:33 +08:00
track.c Add missed expiry code for emergency / nac_v fields; initialize emergency_valid. 2021-01-15 18:20:50 +08:00
track.h Interactive mode updates 2020-09-29 06:23:55 -06:00
util.c normalize_timespec: handle tv_nsec == 1000000000 correctly 2020-11-17 19:59:47 +08:00
util.h fix a trivial copy-paste typo in comments 2020-08-31 22:53:14 +03:00
view1090.c Interactive mode updates 2020-09-29 06:23:55 -06:00
wisdom.arm Move all converters to starch-based implementations (#97) 2021-01-21 19:45:00 +08:00
wisdom.generic Move all converters to starch-based implementations (#97) 2021-01-21 19:45:00 +08:00
wisdom.x86 Move all converters to starch-based implementations (#97) 2021-01-21 19:45:00 +08:00

README.md

dump1090-fa Debian/Raspbian packages

dump1090-fa is a ADS-B, Mode S, and Mode 3A/3C demodulator and decoder that will receive and decode aircraft transponder messages received via a directly connected software defined radio, or from data provided over a network connection.

It is the successor to dump1090-mutability and is maintained by FlightAware.

It can provide a display of locally received aircraft data in a terminal or via a browser map. Together with PiAware it can be used to contribute crowd-sourced flight tracking data to FlightAware.

It is designed to build as a Debian package, but should also be buildable on many other Linux or Unix-like systems.

Building under buster

$ sudo apt-get install build-essential debhelper librtlsdr-dev pkg-config dh-systemd libncurses5-dev libbladerf-dev libhackrf-dev liblimesuite-dev
$ dpkg-buildpackage -b --no-sign

Building under stretch

$ sudo apt-get install build-essential debhelper librtlsdr-dev pkg-config dh-systemd libncurses5-dev libbladerf-dev
$ dpkg-buildpackage -b --no-sign

Building under jessie

Dependencies - bladeRF

You will need a build of libbladeRF. You can build packages from source:

$ git clone https://github.com/Nuand/bladeRF.git  
$ cd bladeRF  
$ git checkout 2017.12-rc1  
$ dpkg-buildpackage -b

Or Nuand has some build/install instructions including an Ubuntu PPA at https://github.com/Nuand/bladeRF/wiki/Getting-Started:-Linux

Or FlightAware provides armhf packages as part of the piaware repository; see https://flightaware.com/adsb/piaware/install

Dependencies - rtlsdr

This is packaged with jessie. sudo apt-get install librtlsdr-dev

Actually building it

Nothing special, just build it (dpkg-buildpackage -b)

Building with limited dependencies

The package supports some build profiles to allow building without all required SDR libraries being present. This will produce a package with limited SDR support only.

Pass --build-profiles to dpkg-buildpackage with a comma-separated list of profiles. The list of profiles should include custom and zero or more of rtlsdr, bladerf, hackrf, limesdr depending on what you want:

$ dpkg-buildpackage -b --no-sign --build-profiles=custom,rtlsdr          # builds with rtlsdr support only
$ dpkg-buildpackage -b --no-sign --build-profiles=custom,rtlsdr,bladerf  # builds with rtlsdr and bladeRF support
$ dpkg-buildpackage -b --no-sign --build-profiles=custom                 # builds with _no_ SDR support (network support only)

Building manually

You can probably just run "make" after installing the required dependencies. Binaries are built in the source directory; you will need to arrange to install them (and a method for starting them) yourself.

make BLADERF=no will disable bladeRF support and remove the dependency on libbladeRF.

make RTLSDR=no will disable rtl-sdr support and remove the dependency on librtlsdr.

make HACKRF=no will disable HackRF support and remove the dependency on libhackrf.

make LIMESDR=no will disable LimeSDR support and remove the dependency on libLimeSuite.

Building on OSX

Minimal testing on Mojave 10.14.6, YMMV.

$ brew install librtlsdr
$ brew install libbladerf
$ brew install hackrf
$ brew install pkg-config
$ make

Building on FreeBSD

Minimal testing on 12.1-RELEASE, YMMV.

# pkg install gmake
# pkg install pkgconf
# pkg install rtl-sdr
# pkg install bladerf
# pkg install hackrf
$ gmake