Merge branch 'dev' into staging

This commit is contained in:
eric1tran 2021-12-13 17:49:25 +00:00
commit 23f5dfef2c
261 changed files with 391 additions and 1839 deletions

2
Jenkinsfile vendored
View File

@ -8,7 +8,7 @@ node(label: 'raspberrypi') {
durabilityHint(hint: 'PERFORMANCE_OPTIMIZED')
])
def dists = ["buster", "stretch", "jessie"]
def dists = ["bullseye", "buster", "stretch"]
def srcdir = "${WORKSPACE}/src"
stage('Checkout') {

View File

@ -2,10 +2,10 @@ PROGNAME=dump1090
DUMP1090_VERSION ?= unknown
CPPFLAGS += -I. -DMODES_DUMP1090_VERSION=\"$(DUMP1090_VERSION)\" -DMODES_DUMP1090_VARIANT=\"dump1090-fa\"
CFLAGS ?= -O3 -g
DUMP1090_CFLAGS := -std=c11 -fno-common -Wall -Wmissing-declarations -Werror -W
DUMP1090_CPPFLAGS := -I. -DMODES_DUMP1090_VERSION=\"$(DUMP1090_VERSION)\" -DMODES_DUMP1090_VARIANT=\"dump1090-fa\"
DIALECT = -std=c11
CFLAGS += $(DIALECT) -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common
LIBS = -lpthread -lm
SDR_OBJ = cpu.o sdr.o fifo.o sdr_ifile.o dsp/helpers/tables.o
@ -46,7 +46,7 @@ UNAME ?= $(HOST_UNAME)
ARCH ?= $(HOST_ARCH)
ifeq ($(UNAME), Linux)
CPPFLAGS += -D_DEFAULT_SOURCE
DUMP1090_CPPFLAGS += -D_DEFAULT_SOURCE
LIBS += -lrt
LIBS_USB += -lusb-1.0
LIBS_CURSES := -lncurses
@ -55,32 +55,35 @@ endif
ifeq ($(UNAME), Darwin)
ifneq ($(shell sw_vers -productVersion | egrep '^10\.([0-9]|1[01])\.'),) # Mac OS X ver <= 10.11
CPPFLAGS += -DMISSING_GETTIME
DUMP1090_CPPFLAGS += -DMISSING_GETTIME
COMPAT += compat/clock_gettime/clock_gettime.o
endif
CPPFLAGS += -DMISSING_NANOSLEEP
DUMP1090_CPPFLAGS += -DMISSING_NANOSLEEP
COMPAT += compat/clock_nanosleep/clock_nanosleep.o
LIBS_USB += -lusb-1.0
LIBS_CURSES := -lncurses
CPUFEATURES ?= yes
# cpufeatures reportedly does not work (yet) on darwin arm64
ifneq $($(ARCH),arm64)
CPUFEATURES ?= yes
endif
endif
ifeq ($(UNAME), OpenBSD)
CPPFLAGS += -DMISSING_NANOSLEEP
DUMP1090_CPPFLAGS += -DMISSING_NANOSLEEP
COMPAT += compat/clock_nanosleep/clock_nanosleep.o
LIBS_USB += -lusb-1.0
LIBS_CURSES := -lncurses
endif
ifeq ($(UNAME), FreeBSD)
CPPFLAGS += -D_DEFAULT_SOURCE
DUMP1090_CPPFLAGS += -D_DEFAULT_SOURCE
LIBS += -lrt
LIBS_USB += -lusb
LIBS_CURSES := -lncurses
endif
ifeq ($(UNAME), NetBSD)
CFLAGS += -D_DEFAULT_SOURCE
DUMP1090_CPPFLAGS += -D_DEFAULT_SOURCE
LIBS += -lrt
LIBS_USB += -lusb-1.0
LIBS_CURSES := -lcurses
@ -90,7 +93,7 @@ CPUFEATURES ?= no
ifeq ($(CPUFEATURES),yes)
include Makefile.cpufeatures
CPPFLAGS += -DENABLE_CPUFEATURES -Icpu_features/include
DUMP1090_CPPFLAGS += -DENABLE_CPUFEATURES -Icpu_features/include
endif
RTLSDR ?= yes
@ -98,10 +101,10 @@ BLADERF ?= yes
ifeq ($(RTLSDR), yes)
SDR_OBJ += sdr_rtlsdr.o
CPPFLAGS += -DENABLE_RTLSDR
DUMP1090_CPPFLAGS += -DENABLE_RTLSDR
ifdef RTLSDR_PREFIX
CPPFLAGS += -I$(RTLSDR_PREFIX)/include
DUMP1090_CPPFLAGS += -I$(RTLSDR_PREFIX)/include
ifeq ($(STATIC), yes)
LIBS_SDR += -L$(RTLSDR_PREFIX)/lib -Wl,-Bstatic -lrtlsdr -Wl,-Bdynamic $(LIBS_USB)
else
@ -115,7 +118,7 @@ ifeq ($(RTLSDR), yes)
RTLSDR_CFLAGS := $(shell pkg-config --cflags librtlsdr)
RTLSDR_CFLAGS := $(filter-out -std=%,$(RTLSDR_CFLAGS))
RTLSDR_CFLAGS := $(filter-out -I/,$(RTLSDR_CFLAGS))
CFLAGS += $(RTLSDR_CFLAGS)
DUMP1090_CFLAGS += $(RTLSDR_CFLAGS)
# some linux librtlsdr packages return a bare -L with no path in --libs
# which horribly confuses things because it eats the next option on the command line
@ -130,22 +133,22 @@ endif
ifeq ($(BLADERF), yes)
SDR_OBJ += sdr_bladerf.o
CPPFLAGS += -DENABLE_BLADERF
CFLAGS += $(shell pkg-config --cflags libbladeRF)
DUMP1090_CPPFLAGS += -DENABLE_BLADERF
DUMP1090_CFLAGS += $(shell pkg-config --cflags libbladeRF)
LIBS_SDR += $(shell pkg-config --libs libbladeRF)
endif
ifeq ($(HACKRF), yes)
SDR_OBJ += sdr_hackrf.o
CPPFLAGS += -DENABLE_HACKRF
CFLAGS += $(shell pkg-config --cflags libhackrf)
DUMP1090_CPPFLAGS += -DENABLE_HACKRF
DUMP1090_CFLAGS += $(shell pkg-config --cflags libhackrf)
LIBS_SDR += $(shell pkg-config --libs libhackrf)
endif
ifeq ($(LIMESDR), yes)
SDR_OBJ += sdr_limesdr.o
CPPFLAGS += -DENABLE_LIMESDR
CFLAGS += $(shell pkg-config --cflags LimeSuite)
DUMP1090_CPPFLAGS += -DENABLE_LIMESDR
DUMP1090_CFLAGS += $(shell pkg-config --cflags LimeSuite)
LIBS_SDR += $(shell pkg-config --libs LimeSuite)
endif
@ -157,27 +160,33 @@ endif
ifneq ($(CPUFEATURES),yes)
# need to be able to detect CPU features at runtime to enable any non-standard compiler flags
STARCH_MIX := generic
CPPFLAGS += -DSTARCH_MIX_GENERIC
DUMP1090_CPPFLAGS += -DSTARCH_MIX_GENERIC
else
ifeq ($(ARCH),x86_64)
# AVX, AVX2
STARCH_MIX := x86
CPPFLAGS += -DSTARCH_MIX_X86
DUMP1090_CPPFLAGS += -DSTARCH_MIX_X86
else ifeq ($(findstring aarch,$(ARCH)),aarch)
STARCH_MIX := aarch64
DUMP1090_CPPFLAGS += -DSTARCH_MIX_AARCH64
else ifeq ($(findstring arm64,$(ARCH)),arm64)
# Apple calls this arm64, not aarch64
STARCH_MIX := aarch64
DUMP1090_CPPFLAGS += -DSTARCH_MIX_AARCH64
else ifeq ($(findstring arm,$(ARCH)),arm)
# ARMv7 NEON
STARCH_MIX := arm
CPPFLAGS += -DSTARCH_MIX_ARM
else ifeq ($(findstring aarch,$(ARCH)),aarch)
STARCH_MIX := aarch64
CPPFLAGS += -DSTARCH_MIX_AARCH64
DUMP1090_CPPFLAGS += -DSTARCH_MIX_ARM
else
STARCH_MIX := generic
CPPFLAGS += -DSTARCH_MIX_GENERIC
DUMP1090_CPPFLAGS += -DSTARCH_MIX_GENERIC
endif
endif
all: showconfig dump1090 view1090 starch-benchmark
STARCH_COMPILE := $(CC) $(CPPFLAGS) $(CFLAGS) -c
ALL_CCFLAGS := $(CPPFLAGS) $(DUMP1090_CPPFLAGS) $(CFLAGS) $(DUMP1090_CFLAGS)
STARCH_COMPILE := $(CC) $(ALL_CCFLAGS) -c
include dsp/generated/makefile.$(STARCH_MIX)
showconfig:
@ -191,7 +200,7 @@ showconfig:
@echo " LimeSDR support: $(LIMESDR)" >&2
%.o: %.c *.h
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
$(CC) $(ALL_CCFLAGS) -c $< -o $@
dump1090: dump1090.o anet.o interactive.o mode_ac.o mode_s.o comm_b.o net_io.o crc.o demod_2400.o stats.o cpr.o icao_filter.o track.o util.o convert.o ais_charset.o adaptive.o $(SDR_OBJ) $(COMPAT) $(CPUFEATURES_OBJS) $(STARCH_OBJS)
$(CC) -g -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBS_SDR) $(LIBS_CURSES)
@ -212,25 +221,25 @@ test: cprtests
./cprtests
cprtests: cpr.o cprtests.o
$(CC) $(CPPFLAGS) $(CFLAGS) -g -o $@ $^ -lm
$(CC) $(ALL_CCFLAGS) -g -o $@ $^ -lm
crctests: crc.c crc.h
$(CC) $(CPPFLAGS) $(CFLAGS) -g -DCRCDEBUG -o $@ $<
$(CC) $(ALL_CCFLAGS) -g -DCRCDEBUG -o $@ $<
benchmarks: oneoff/convert_benchmark
oneoff/convert_benchmark
oneoff/convert_benchmark: oneoff/convert_benchmark.o convert.o util.o dsp/helpers/tables.o cpu.o $(CPUFEATURES_OBJS) $(STARCH_OBJS)
$(CC) $(CPPFLAGS) $(CFLAGS) -g -o $@ $^ -lm -lpthread
$(CC) $(ALL_CCFLAGS) -g -o $@ $^ -lm -lpthread
oneoff/decode_comm_b: oneoff/decode_comm_b.o comm_b.o ais_charset.o
$(CC) $(CPPFLAGS) $(CFLAGS) -g -o $@ $^ -lm
$(CC) $(ALL_CCFLAGS) -g -o $@ $^ -lm
oneoff/dsp_error_measurement: oneoff/dsp_error_measurement.o dsp/helpers/tables.o cpu.o $(CPUFEATURES_OBJS) $(STARCH_OBJS)
$(CC) $(CPPFLAGS) $(CFLAGS) -g -o $@ $^ -lm
$(CC) $(ALL_CCFLAGS) -g -o $@ $^ -lm
oneoff/uc8_capture_stats: oneoff/uc8_capture_stats.o
$(CC) $(CPPFLAGS) $(CFLAGS) -g -o $@ $^ -lm
$(CC) $(ALL_CCFLAGS) -g -o $@ $^ -lm
starchgen:
dsp/starchgen.py .

View File

@ -4,17 +4,19 @@
CPUFEATURES_UNAME ?= $(UNAME)
CPUFEATURES_ARCH ?= $(ARCH)
CPUFEATURES_CFLAGS ?= $(CFLAGS)
CPUFEATURES_OBJS := cpu_features/src/filesystem.o cpu_features/src/stack_line_reader.o cpu_features/src/string_view.o
CPUFEATURES_CFLAGS := -std=c99 -O -g -DSTACK_LINE_READER_BUFFER_SIZE=1024 -DNDEBUG
CPUFEATURES_EXTRA_CFLAGS := -std=c99
CPUFEATURES_EXTRA_CPPFLAGS := -DSTACK_LINE_READER_BUFFER_SIZE=1024 -DNDEBUG -Icpu_features/include
ifeq ($(CPUFEATURES_UNAME),Linux)
CPUFEATURES_OBJS += cpu_features/src/hwcaps.o
CPUFEATURES_CFLAGS += -DHAVE_STRONG_GETAUXVAL
CPUFEATURES_EXTRA_CPPFLAGS += -DHAVE_STRONG_GETAUXVAL
endif
ifeq ($(CPUFEATURES_UNAME),Darwin)
CPUFEATURES_CFLAGS += -DHAVE_SYSCTLBYNAME
CPUFEATURES_EXTRA_CPPFLAGS += -DHAVE_SYSCTLBYNAME
endif
ifeq ($(CPUFEATURES_ARCH),x86_64)
@ -33,5 +35,4 @@ ifneq (,$(findstring aarch64,$(CPUFEATURES_ARCH)))
CPUFEATURES_OBJS += cpu_features/src/cpuinfo_aarch64.o
endif
$(CPUFEATURES_OBJS): override CFLAGS := $(CPUFEATURES_CFLAGS)
$(CPUFEATURES_OBJS): override CPPFLAGS := -Icpu_features/include
$(CPUFEATURES_OBJS): override ALL_CCFLAGS := $(CPUFEATURES_CPPFLAGS) $(CPUFEATURES_EXTRA_CPPFLAGS) $(CPUFEATURES_CFLAGS) $(CPUFEATURES_EXTRA_CFLAGS)

View File

@ -16,31 +16,18 @@ 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
## Building under bullseye, buster, or stretch
```bash
$ sudo apt-get install build-essential fakeroot debhelper librtlsdr-dev pkg-config dh-systemd libncurses5-dev libbladerf-dev libhackrf-dev liblimesuite-dev
$ ./prepare-build.sh buster
$ cd buster
$ sudo apt-get install build-essential fakeroot debhelper librtlsdr-dev pkg-config libncurses5-dev libbladerf-dev libhackrf-dev liblimesuite-dev
$ ./prepare-build.sh bullseye # or buster, or stretch
$ cd package-bullseye # or buster, or stretch
$ dpkg-buildpackage -b --no-sign
```
## Building under stretch
```bash
$ sudo apt-get install build-essential debhelper librtlsdr-dev pkg-config dh-systemd libncurses5-dev libbladerf-dev
$ ./prepare-build.sh stretch
$ cd stretch
$ dpkg-buildpackage -b --no-sign
```
### Actually building it
Nothing special, just build it (`dpkg-buildpackage -b`)
## Building with limited dependencies
(Supported for buster builds only)
(Supported for bullseye and buster builds only)
The package supports some build profiles to allow building without all
required SDR libraries being present. This will produce a package with

View File

@ -107,7 +107,7 @@ static void adaptive_burst_end_of_block();
static unsigned *adaptive_range_radix; // radix-sort buckets for current block
static unsigned adaptive_range_radix_counter; // sum of all radix-sort buckets (= number of samples sorted)
static double adaptive_range_smoothed; // smoothed noise floor estimate, dBFS
static enum { RANGE_SCAN_IDLE, RANGE_SCAN_UP, RANGE_SCAN_DOWN } adaptive_range_state = RANGE_SCAN_UP;
static enum { RANGE_SCAN_IDLE, RANGE_SCAN_UP, RANGE_SCAN_DOWN, RANGE_RESCAN_UP, RANGE_RESCAN_DOWN } adaptive_range_state = RANGE_SCAN_UP;
static unsigned adaptive_range_change_timer; // countdown inhibiting control after changing gain
static unsigned adaptive_range_rescan_timer; // countdown to next upwards gain reprobe
static int adaptive_range_gain_limit; // probed maximum gain step with acceptable dynamic range
@ -196,7 +196,7 @@ void adaptive_init()
adaptive_burst_window_counter = 0;
adaptive_range_radix = calloc(sizeof(unsigned), 65536);
adaptive_range_state = RANGE_SCAN_UP;
adaptive_range_state = RANGE_RESCAN_UP;
// select and enforce gain limits
for (adaptive_gain_min = 0; adaptive_gain_min < maxgain; ++adaptive_gain_min) {
@ -514,7 +514,7 @@ static void adaptive_control_update()
// if we're currently doing a downward scan, reducing gain further may confuse it;
// stop that scan and restart it once we are no longer in a reduced-gain state
if (adaptive_range_state == RANGE_SCAN_DOWN) {
if (adaptive_range_state == RANGE_SCAN_DOWN || adaptive_range_state == RANGE_RESCAN_DOWN) {
adaptive_range_state = RANGE_SCAN_IDLE;
adaptive_range_rescan_timer = 0;
}
@ -539,12 +539,13 @@ static void adaptive_control_update()
}
switch (adaptive_range_state) {
case RANGE_SCAN_UP:
case RANGE_RESCAN_UP:
if (available_range < Modes.adaptive_range_target) {
// Current gain fails to meet our target. Switch to downward scanning.
fprintf(stderr, "adaptive: available dynamic range (%.1fdB) < required dynamic range (%.1fdB), switching to downward scan\n", available_range, Modes.adaptive_range_target);
gain_down = gain_not_up = true;
gain_down_reason = "probing dynamic range gain lower bound";
adaptive_range_state = RANGE_SCAN_DOWN;
adaptive_range_state = (adaptive_range_state == RANGE_RESCAN_UP ? RANGE_RESCAN_DOWN : RANGE_SCAN_DOWN);
if (adaptive_range_gain_limit >= current_gain) {
adaptive_range_gain_limit = current_gain - 1;
}
@ -569,11 +570,12 @@ static void adaptive_control_update()
break;
case RANGE_SCAN_DOWN:
case RANGE_RESCAN_DOWN:
if (available_range >= Modes.adaptive_range_target) {
// Current gain meets our target; we are done with the scan.
fprintf(stderr, "adaptive: available dynamic range (%.1fdB) >= required dynamic range (%.1fdB), stopping downwards scan here\n", available_range, Modes.adaptive_range_target);
adaptive_range_state = RANGE_SCAN_IDLE;
adaptive_range_rescan_timer = Modes.adaptive_range_rescan_delay;
adaptive_range_rescan_timer = (adaptive_range_state == RANGE_SCAN_DOWN ? Modes.adaptive_range_scan_delay : Modes.adaptive_range_rescan_delay);
break;
}
@ -616,7 +618,7 @@ static void adaptive_control_update()
fprintf(stderr, "adaptive: start periodic scan for acceptable dynamic range at increased gain\n");
gain_up = true;
gain_up_reason = "periodic re-probing of dynamic range gain upper bound";
adaptive_range_state = RANGE_SCAN_UP;
adaptive_range_state = RANGE_RESCAN_UP;
break;
}

View File

@ -1,30 +0,0 @@
Source: dump1090-fa
Section: embedded
Priority: extra
Maintainer: Oliver Jowett <oliver@mutability.co.uk>
Build-Depends: debhelper(>=9), librtlsdr-dev, libusb-1.0-0-dev, pkg-config, dh-systemd, libncurses5-dev, libbladerf-dev
Standards-Version: 3.9.3
Homepage: http://www.flightaware.com/
Vcs-Git: https://github.com/flightaware/dump1090.git
Package: dump1090
Architecture: all
Depends: dump1090-fa, ${misc:Depends}
Priority: extra
Section: oldlibs
Description: transitional dummy package for dump1090
This is a transitional dummy package to handle upgrades from
the old package name of "dump1090" to the new package name of
"dump1090-fa". It can safely be removed.
Package: dump1090-fa
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libbladerf1 (>= 0.2016.06), adduser, lighttpd
Replaces: dump1090 (<< 3.0)
Breaks: dump1090 (<< 3.0)
Description: ADS-B Ground Station System for RTL-SDR
Networked Aviation Mode S / ADS-B decoder/translator with RTL-SDR software
defined radio USB device support.
.
This is FlightAware's fork of dump1090-mutability, customized for use
in the PiAware sdcard images.

View File

@ -1,29 +0,0 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
override_dh_auto_build:
# jessie's gcc doesn't support the compiler flags needed for ARM-specific starch flavors;
# turn off runtime CPU detection
dh_auto_build -- RTLSDR=yes BLADERF=yes HACKRF=no LIMESDR=no DUMP1090_VERSION=$(DEB_VERSION) CPUFEATURES=no
override_dh_install:
dh_install
install -d debian/dump1090-fa/usr/bin
cp -a dump1090 debian/dump1090-fa/usr/bin/dump1090-fa
cp -a view1090 debian/dump1090-fa/usr/bin/view1090-fa
%:
dh $@ --with=systemd

View File

@ -1,8 +1,8 @@
Source: dump1090-fa
Section: embedded
Priority: extra
Maintainer: Oliver Jowett <oliver@mutability.co.uk>
Build-Depends: debhelper(>=9), librtlsdr-dev, libusb-1.0-0-dev, pkg-config, dh-systemd, libncurses5-dev, libbladerf-dev
Maintainer: Oliver Jowett <oliver.jowett@flightaware.com>
Build-Depends: debhelper(>=10), librtlsdr-dev, libusb-1.0-0-dev, pkg-config, libncurses5-dev, libbladerf-dev
Standards-Version: 3.9.3
Homepage: http://www.flightaware.com/
Vcs-Git: https://github.com/flightaware/dump1090.git

2
debian/compat vendored
View File

@ -1 +1 @@
9
10

4
debian/control vendored
View File

@ -2,13 +2,13 @@ Source: dump1090-fa
Section: embedded
Priority: extra
Maintainer: Oliver Jowett <oliver.jowett@flightaware.com>
Build-Depends: debhelper(>=9),
Build-Depends: debhelper(>=10),
librtlsdr-dev <!custom> <rtlsdr>,
libbladerf-dev <!custom> <bladerf>,
libhackrf-dev <!custom> <hackrf>,
liblimesuite-dev <!custom> <limesdr>,
libusb-1.0-0-dev <!custom> <rtlsdr> <bladerf> <hackrf> <limesdr>,
pkg-config, dh-systemd, libncurses5-dev
pkg-config, libncurses5-dev
Standards-Version: 3.9.3
Homepage: http://www.flightaware.com/
Vcs-Git: https://github.com/flightaware/dump1090.git

View File

@ -143,6 +143,7 @@ static void modesInitConfig(void) {
Modes.adaptive_range_alpha = 2.0 / (5 + 1);
Modes.adaptive_range_percentile = 40;
Modes.adaptive_range_change_delay = 10;
Modes.adaptive_range_scan_delay = 300;
Modes.adaptive_range_rescan_delay = 3600;
sdrInitConfig();
@ -373,8 +374,11 @@ static void showHelp(void)
"--adaptive-range-percentile <p> Set dynamic range noise percentile\n"
"--adaptive-range-change-delay <s> Set delay after changing gain before\n"
" resuming dynamic range control (seconds)\n"
"--adaptive-range-rescan-delay <s> Set rescan interval for dynamic range\n"
" gain scanning (seconds)\n"
"--adaptive-range-scan-delay <s> Set scan interval for dynamic range\n"
" gain scanning following a gain decrease\n"
" due to an increase in noise (seconds)\n"
"--adaptive-range-rescan-delay <s> Set periodic rescan interval for dynamic\n"
" range gain scanning (seconds)\n"
"--adaptive-min-gain <g> Set gain adjustment range lower limit (dB)\n"
"--adaptive-max-gain <g> Set gain adjustment range upper limit (dB)\n"
"--adaptive-duty-cycle <p> Set adaptive gain duty cycle %% (1..100)\n"
@ -796,6 +800,8 @@ int main(int argc, char **argv) {
Modes.adaptive_range_target = atof(argv[++j]);
} else if (!strcmp(argv[j], "--adaptive-range-change-delay") && more) {
Modes.adaptive_range_change_delay = atoi(argv[++j]);
} else if (!strcmp(argv[j], "--adaptive-range-scan-delay") && more) {
Modes.adaptive_range_scan_delay = atoi(argv[++j]);
} else if (!strcmp(argv[j], "--adaptive-range-rescan-delay") && more) {
Modes.adaptive_range_rescan_delay = atoi(argv[++j]);
} else if (sdrHandleOption(argc, argv, &j)) {

View File

@ -431,6 +431,7 @@ struct _Modes { // Internal state
unsigned adaptive_range_percentile;
float adaptive_range_target;
unsigned adaptive_range_change_delay;
unsigned adaptive_range_scan_delay;
unsigned adaptive_range_rescan_delay;
};

View File

@ -1300,6 +1300,36 @@ static int hexDigitVal(int c) {
else if (c >= 'a' && c <= 'f') return c-'a'+10;
else return -1;
}
// decode 12 hex digits as a 48-bit timestamp
static bool timestampFromHex(const char *hex, uint64_t *timestamp)
{
uint64_t ts = 0;
for (unsigned i = 0; i < 12; ++i) {
int v = hexDigitVal(hex[i]);
if (v < 0)
return false;
ts = (ts << 4) | v;
}
*timestamp = ts;
return true;
}
// decode 2 hex digits as a signal level
static bool signalFromHex(const char *hex, double *signal)
{
int d1 = hexDigitVal(hex[0]);
int d2 = hexDigitVal(hex[1]);
if (d1 < 0 || d2 < 0)
return false;
double sig = ((d1 << 4) | d2) / 255.0;
*signal = sig * sig;
return true;
}
//
//=========================================================================
//
@ -1341,26 +1371,50 @@ static int decodeHexMessage(struct client *c, char *hex) {
// and some AVR records that we can understand
if (hex[l-1] != ';') {return (0);} // not complete - abort
switch(hex[0]) {
case '<': {
mm.signalLevel = ((hexDigitVal(hex[13])<<4) | hexDigitVal(hex[14])) / 255.0;
mm.signalLevel = mm.signalLevel * mm.signalLevel;
hex += 15; l -= 16; // Skip <, timestamp and siglevel, and ;
break;}
switch (hex[0]) {
case '<':
// [0] '<'
// [1..12] timestamp
// [13..14] signal level
// [15..l-2] data
// [l-1] ';'
if (l < 18)
return 0; // truncated
if (!timestampFromHex(hex + 1, &mm.timestampMsg))
return 0; // malformed timestamp
if (!signalFromHex(hex + 13, &mm.signalLevel))
return 0; // malformed signal level
hex += 15;
l -= 16;
break;
case '@': // No CRC check
case '%': { // CRC is OK
hex += 13; l -= 14; // Skip @,%, and timestamp, and ;
break;}
case '%': // CRC is OK
// [0] '@' or '%'
// [1..12] timestamp
// [13..l-2] data
// [l-1] ';'
if (l < 16)
return 0; // truncated
if (!timestampFromHex(hex + 1, &mm.timestampMsg))
return 0; // malformed timestamp
hex += 13;
l -= 14;
break;
case '*':
case ':': {
hex++; l-=2; // Skip * and ;
break;}
case ':':
// [0] '*' or ':'
// [1..l-2] data
// [l-1] ';'
if (l < 4)
return 0; // truncated
hex++;
l -= 2;
break;
default: {
return (0); // We don't know what this is, so abort
break;}
default:
return 0;
}
if ( (l != (MODEAC_MSG_BYTES * 2))

View File

@ -35,21 +35,20 @@ FILES=$(find $TOP -mindepth 1 -maxdepth 1 -name .git -prune -o -name 'debian*' -
mkdir -p $OUT
cp -a $FILES $OUT
cp -a $TOP/debian $OUT
[ -d $TOP/debian-$DIST ] && cp -a $TOP/debian-$DIST/* $OUT/debian/
case "$DIST" in
jessie)
cp -a $TOP/debian-jessie/* $OUT/debian/
echo "Updating changelog for jessie backport build" >&2
dch --changelog $OUT/debian/changelog --local ~bpo8+ --force-distribution --distribution jessie-backports "Automated backport build for jessie"
;;
stretch)
cp -a $TOP/debian-stretch/* $OUT/debian/
echo "Updating changelog for stretch backport build" >&2
dch --changelog $OUT/debian/changelog --local ~bpo9+ --force-distribution --distribution stretch-backports "Automated backport build for jessie"
;;
buster)
echo "Updating changelog for buster backport build" >&2
dch --changelog $OUT/debian/changelog --local ~bpo10+ --force-distribution --distribution buster-backports "Automated backport build for buster"
;;
bullseye)
;;
*)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"00007":{"r":"EK-32011","t":"A319"},"0000C":{"r":"EK32008","t":"A320"},"00010":{"r":"EK-73736","t":"B735"},"00013":{"r":"EK-11001","t":"AN12"},"00024":{"r":"EK-73705","t":"B738"},"0002F":{"r":"EK-12104","t":"AN12"},"0003C":{"r":"EK-RA01","t":"A319"},"0004A":{"r":"EK-32007","t":"A319"},"00059":{"r":"EK-95015","t":"SU95"},"0005A":{"r":"EK-95016","t":"SU95"},"0005F":{"r":"EW-412TH","t":"IL76"},"00076":{"r":"EK-74723","t":"B742"},"00079":{"r":"EK-74798","t":"B742"},"00087":{"r":"EK-74799","t":"B742"},"0009D":{"r":"EK-73775","t":"B735"},"0009F":{"r":"EK-73772","t":"B735"},"000A2":{"r":"EK-SHA","t":"B735"},"00801":{"r":"4K8888","t":"A319"},"00803":{"r":"4KAZ03","t":"A319"},"00804":{"r":"4KAZ04","t":"A319"},"00805":{"r":"4KAZ05","t":"A319"},"00806":{"r":"4KAI06","t":"GLF5"},"00807":{"r":"4KAI07","t":"A320"},"00808":{"r":"4K-MEK8","t":"GLF5"},"0080C":{"r":"4KAZ12","t":"B752"},"00826":{"r":"4K-AZ38","t":"B752"},"00828":{"r":"4KAZ40","t":"IL76"},"00829":{"r":"4KAZ41","t":"IL76"},"0082B":{"r":"4K-AZ43","t":"B752"},"00836":{"r":"4K-AZ54","t":"A320"},"00838":{"r":"4K-AZ56","t":"AN12"},"0083C":{"r":"4KAZ60","t":"IL76"},"00840":{"r":"4KAZ64","t":"E190"},"00841":{"r":"4KAZ65","t":"E190"},"00842":{"r":"4KAZ66","t":"E190"},"00843":{"r":"4KAZ67","t":"E190"},"0084D":{"r":"4KAZ77","t":"A320"},"0084E":{"r":"4KAZ78","t":"A320"},"0084F":{"r":"4KAZ79","t":"A320"},"00850":{"r":"4KAZ80","t":"A320"},"00851":{"r":"4KAZ81","t":"B763"},"00852":{"r":"4KAZ82","t":"B763"},"00853":{"r":"4KAZ83","t":"A320"},"00854":{"r":"4KAZ84","t":"A320"},"00855":{"r":"4KAZ85","t":"A345"},"00856":{"r":"4KAZ86","t":"A345"},"00858":{"r":"4K-AZ88","t":"GALX"},"00864":{"r":"4KAZ100","t":"IL76"},"00865":{"r":"4KAZ101","t":"IL76"},"008D0":{"r":"4K-AZ208","t":"G280"},"00918":{"r":"4K-AZ280","t":"G280"},"00B20":{"r":"4KSW800","t":"B744"},"00B21":{"r":"4KSW888","t":"B744"},"00B70":{"r":"4K-SW880","t":"B763"},"00B78":{"r":"4KAZ888","t":"GLF4"},"00BB9":{"r":"4K-SW808","t":"B763"},"00BBE":{"r":"4KSW008","t":"B744"},"00BBF":{"r":"4KAZ11","t":"B752"},"00BC0":{"r":"4KAI08","t":"A346"},"00BC4":{"r":"4KAI88","t":"GLF6"},"00BC6":{"r":"4K-LAR","t":"GLF4"},"00BC7":{"r":"4KJJ888","t":"GLF5"},"00BC8":{"r":"4K-ASG","t":"GLF6"},"00BE8":{"r":"4KAI01","t":"B763"},"00BE9":{"r":"4KAI001","t":"B77L"},"01097":{"r":"EX-37008"},"010F2":{"r":"EX-32001","t":"A320"},"010F4":{"r":"EX-37001","t":"B733"},"010F9":{"r":"EX-73401","t":"B734"},"01839":{"r":"EZ-A779","t":"B77L"},"0183A":{"r":"EZ-A778","t":"B77L"},"0183B":{"r":"EZ-A017","t":"B738"},"0183C":{"r":"EZ-A016","t":"B738"},"0183D":{"r":"EZ-A015","t":"B738"},"01842":{"r":"EZ-A010","t":"B752"},"01846":{"r":"EZ-A011","t":"B752"},"01847":{"r":"EZ-A012","t":"B752"},"01849":{"r":"EZ-A014","t":"B752"},"01854":{"r":"EZ-A106","t":"B712"},"01855":{"r":"EZ-A107","t":"B712"},"01858":{"r":"EZ-A004","t":"B738"},"01859":{"r":"EZ-A005","t":"B738"},"0185A":{"r":"EZ-A007","t":"B737"},"0185E":{"r":"EZ-A006","t":"B737"},"0185F":{"r":"EZ-A008","t":"B737"},"01860":{"r":"EZ-A009","t":"B737"},"01861":{"r":"EZ-A777","t":"B772"},"80001":{"r":"A5-RGF","t":"A319"},"80002":{"r":"A5-RGG","t":"A319"},"82209":{"r":"JU-1011","t":"B763"},"8220A":{"r":"JU-1012","t":"B763"},"83037":{"r":"UP-B5701","t":"B752"},"83065":{"r":"UP-Y4204","t":"YK42"},"83088":{"r":"UP-I7620","t":"IL76"},"830A5":{"r":"UP-A2001","t":"A320"},"830BD":{"r":"UP-CS302","t":"C25B"},"830C2":{"r":"UP-K3501","t":"B350"},"830ED":{"r":"UP-A3001","t":"A332"},"830FE":{"r":"UP-K3502","t":"B350"},"831E8":{"r":"UP-T5409","t":"T154"}}
{"00005":{"r":"EK-73792","t":"B738"},"00007":{"r":"EK-32011","t":"A319"},"0000C":{"r":"EK32008","t":"A320"},"00010":{"r":"EK-73736","t":"B735"},"00013":{"r":"EK-11001","t":"AN12"},"00024":{"r":"EK-73705","t":"B738"},"0002F":{"r":"EK-12104","t":"AN12"},"0003C":{"r":"EK-RA01","t":"A319"},"0004A":{"r":"EK-32007","t":"A319"},"00059":{"r":"EK-95015","t":"SU95"},"0005A":{"r":"EK-95016","t":"SU95"},"0005F":{"r":"EW-412TH","t":"IL76"},"00076":{"r":"EK-74723","t":"B742"},"00079":{"r":"EK-74798","t":"B742"},"00087":{"r":"EK-74799","t":"B742"},"0009D":{"r":"EK-73775","t":"B735"},"0009F":{"r":"EK-73772","t":"B735"},"000A2":{"r":"EK-SHA","t":"B735"},"00801":{"r":"4K8888","t":"A319"},"00803":{"r":"4KAZ03","t":"A319"},"00804":{"r":"4KAZ04","t":"A319"},"00805":{"r":"4KAZ05","t":"A319"},"00806":{"r":"4KAI06","t":"GLF5"},"00807":{"r":"4KAI07","t":"A320"},"00808":{"r":"4KJJ8","t":"G280"},"0080C":{"r":"4KAZ12","t":"B752"},"00826":{"r":"4K-AZ38","t":"B752"},"00828":{"r":"4KAZ40","t":"IL76"},"00829":{"r":"4KAZ41","t":"IL76"},"0082B":{"r":"4K-AZ43","t":"B752"},"00836":{"r":"4K-AZ54","t":"A320"},"00838":{"r":"4K-AZ56","t":"AN12"},"0083C":{"r":"4KAZ60","t":"IL76"},"00840":{"r":"4KAZ64","t":"E190"},"00841":{"r":"4KAZ65","t":"E190"},"00842":{"r":"4KAZ66","t":"E190"},"00843":{"r":"4KAZ67","t":"E190"},"0084D":{"r":"4KAZ77","t":"A320"},"0084E":{"r":"4KAZ78","t":"A320"},"0084F":{"r":"4KAZ79","t":"A320"},"00850":{"r":"4KAZ80","t":"A320"},"00851":{"r":"4KAZ81","t":"B763"},"00852":{"r":"4KAZ82","t":"B763"},"00853":{"r":"4KAZ83","t":"A320"},"00854":{"r":"4KAZ84","t":"A320"},"00855":{"r":"4KAZ85","t":"A345"},"00856":{"r":"4KAZ86","t":"A345"},"00858":{"r":"4K-AZ88","t":"GALX"},"00864":{"r":"4KAZ100","t":"IL76"},"00865":{"r":"4KAZ101","t":"IL76"},"008D0":{"r":"4K-AZ208","t":"G280"},"00918":{"r":"4K-AZ280","t":"G280"},"00B20":{"r":"4KSW800","t":"B744"},"00B21":{"r":"4KSW888","t":"B744"},"00B70":{"r":"4K-SW880","t":"B763"},"00B78":{"r":"4KAZ888","t":"GLF4"},"00BB9":{"r":"4K-SW808","t":"B763"},"00BBE":{"r":"4KSW008","t":"B744"},"00BBF":{"r":"4KAZ11","t":"B752"},"00BC0":{"r":"4KAI08","t":"A346"},"00BC4":{"r":"4KAI88","t":"GLF6"},"00BC6":{"r":"4K-LAR","t":"GLF4"},"00BC7":{"r":"4KJJ888","t":"GLF5"},"00BC8":{"r":"4K-ASG","t":"GLF6"},"00BE8":{"r":"4KAI01","t":"B763"},"00BE9":{"r":"4KAI001","t":"B77L"},"01097":{"r":"EX-37008"},"010F2":{"r":"EX-32001","t":"A320"},"010F4":{"r":"EX-37001","t":"B733"},"010F9":{"r":"EX-73401","t":"B734"},"01839":{"r":"EZ-A779","t":"B77L"},"0183A":{"r":"EZ-A778","t":"B77L"},"0183B":{"r":"EZ-A017","t":"B738"},"0183C":{"r":"EZ-A016","t":"B738"},"0183D":{"r":"EZ-A015","t":"B738"},"01842":{"r":"EZ-A010","t":"B752"},"01846":{"r":"EZ-A011","t":"B752"},"01847":{"r":"EZ-A012","t":"B752"},"01849":{"r":"EZ-A014","t":"B752"},"01854":{"r":"EZ-A106","t":"B712"},"01855":{"r":"EZ-A107","t":"B712"},"01858":{"r":"EZ-A004","t":"B738"},"01859":{"r":"EZ-A005","t":"B738"},"0185A":{"r":"EZ-A007","t":"B737"},"0185E":{"r":"EZ-A006","t":"B737"},"0185F":{"r":"EZ-A008","t":"B737"},"01860":{"r":"EZ-A009","t":"B737"},"01861":{"r":"EZ-A777","t":"B772"},"80001":{"r":"A5-RGF","t":"A319"},"80002":{"r":"A5-RGG","t":"A319"},"82209":{"r":"JU-1011","t":"B763"},"8220A":{"r":"JU-1012","t":"B763"},"83037":{"r":"UP-B5701","t":"B752"},"83065":{"r":"UP-Y4204","t":"YK42"},"83088":{"r":"UP-I7620","t":"IL76"},"830A5":{"r":"UP-A2001","t":"A320"},"830BD":{"r":"UP-CS302","t":"C25B"},"830C2":{"r":"UP-K3501","t":"B350"},"830ED":{"r":"UP-A3001","t":"A332"},"830FE":{"r":"UP-K3502","t":"B350"},"831E8":{"r":"UP-T5409","t":"T154"}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More