Commit Graph

1926 Commits

Author SHA1 Message Date
Oliver Jowett 22d21cd013 Rework the interactive-mode Mode column to show more detail.
New Mode values:

S:  Mode S, no ADS-B
A0: ADS-B v0, DO-260
A1: ADS-B v1, DO-260A
A2: ADS-B v2, DO-260B
NT: ADS-B non-transponder
R:  ADS-R
T:  TIS-B
2021-02-18 14:20:44 +08:00
Oliver Jowett 3324f072cd Set an up to date message timestamp when refreshing interactive mode, just
in case.
2021-02-18 14:02:54 +08:00
Oliver Jowett 5a33b4ee8f Set at least airground = AG_UNCERTAIN for airborne position messages with valid altitudes.
DF18 messages don't have a CA field so we can't set airground from that.
That meant that aircraft tracking wouldn't update airground state at all from a DF18
airborne position message, even if the existing tracked airground state was stale.
It seems reasonable to set at least AG_UNCERTAIN if we're seeing airborne positions
with valid altitude data.

Fixes github issue #113
2021-02-18 13:57:27 +08:00
eric1tran d8d5f2a117 Change button color on filter set 2021-02-10 20:40:57 +00:00
Oliver Jowett 33bb2d929b Mark cpu_features and starch as vendored code 2021-02-10 14:12:26 +08:00
Oliver Jowett d1f6d02e9a Try to handle generated starch output more sensibly in merges & github compare mode 2021-02-10 13:58:14 +08:00
Jurre Van Wouw c4e346698e
Add NetBSD detection to Makefile; use NetBSD's curses (simply called curses) rather than ncurses on NetBSD (#111) 2021-02-10 12:44:30 +08:00
eric1tran 4eab12497e Update filter slider default values accordingly when changing the DisplayUnits 2021-02-10 01:06:35 +00:00
Eric Tran b7205e2e64
faup1090 changes to consume commands via stdin (#107)
* Create a network service and connection faup's stdin. Create a Modes.faup_rate_multiplier attribute and set from faup command input

* Use faup_rate_multiplier to adjust the minAge for emitting messages

* Convert upload_rate_multiplier to a double and adjust minAge with it

* Cleanup

* Var name change

* MODES_NOTUSED define for unused modes client object

* Sanity check on faup multiplier field
2021-02-09 07:25:51 -06:00
Oliver Jowett c421c31152 Overhaul of message scoring & error correction.
Major changes:

Try to error-correct all messages that potentially could be DF11/17/18
even if the original DF value is different. This allows messages with
correctable damage in the first 5 bits to be correctable.

Track recently-seen DF18 addresses separately to DF17 addresses.
DF18 does not imply Mode S support, so we don't want to treat it like
a known Mode S emitter, but once we've heard some DF18 for an aircraft
we can be more confident about future DF18 messages for the same
address.

Rework the scoring system so it's just a big enum that lists all the
possible outcomes in the order that we want. This makes the relative
ordering of different messages clearer, and makes it easier to move
messages above/below the accept thresholds as needed.

Don't accept 2-bit-error-corrected messages that are from aircraft we
have not previously seen. This greatly reduces the number of garbage
messages when using 2-bit error correction.

Overall results are:

 * more CPU required for decoding (approx 30% increase in my tests)
   as we're doing a lot more speculative CRC-checking work
 * no significant change to message rates with error correction off
 * about 5% more 1-bit-corrected DF17 decodes, with a
   disproportionate increase in those messages contributing to
   successful position decodes / unique aircraft counts
 * _fewer_ decodes with 2-bit correction (versus old code with 2-bit
   correction), but the message quality is substantially improved,
   the rate of garbage decodes / phantom aircraft is greatly reduced

sample stats:

1-bit correction, old code:
    141158 total usable messages
    137852 accepted with correct CRC
      3306 accepted with 1-bit error repaired
     27446 DF17 messages
        51 unique aircraft tracks

1-bit correction, new code:
    141296 total usable messages
    137854 accepted with correct CRC
      3442 accepted with 1-bit error repaired
     27528 DF17 messages
        55 unique aircraft tracks

2-bit correction, old code:
    142656 total usable messages
    137809 accepted with correct CRC
      3283 accepted with 1-bit error repaired
      1564 accepted with 2-bit error repaired
     28803 DF17 messages
       349 unique aircraft tracks (<- note that most of these are garbage)

2-bit correction, new code:
    142426 total usable messages
    137822 accepted with correct CRC
      3420 accepted with 1-bit error repaired
      1184 accepted with 2-bit error repaired
     28666 DF17 messages
        55 unique aircraft tracks
2021-02-09 20:10:55 +08:00
Oliver Jowett 132702cfa7 Regenerate starch-generated code for starch update & aarch64 wisdom 2021-02-09 14:16:12 +08:00
Oliver Jowett 40c24b1c55 Add temporary wisdom.aarch64 2021-02-09 14:15:05 +08:00
Oliver Jowett 5600d3fc71
Merge pull request #108 from gtjoseph/dev-fa-starch-aarch64
Starch config: Add aarch64
2021-02-09 14:08:52 +08:00
Oliver Jowett fa80e7c917 Update starch to upstream commit f76162205fa082d4c9a75b89eb4295e03f5f68fd 2021-02-09 14:05:05 +08:00
eric1tran 270c629515 Italicize filter count text 2021-02-09 04:42:02 +00:00
eric1tran 8c892973be Merge branch 'dev' of github.com:flightaware/dump1090 into dev 2021-02-09 04:33:57 +00:00
eric1tran d5184efa6e Display a count of active filters 2021-02-09 04:33:50 +00:00
eric1tran c2e1c1f6d5 Rearrage My ADS-B Stats page button 2021-02-08 20:14:45 +00:00
George Joseph 2308c1d196 Starch: Changed aarch64 flavor to use simd
The flavor is now armv8_neon_simd
2021-02-08 10:10:44 -07:00
Oliver Jowett d8cca659e7 Remove stray extra cpufeatures makefile include 2021-02-09 00:30:25 +08:00
Oliver Jowett 4ad6c7b4d3 Disable non-generic starch build on stretch/jessie 2021-02-08 23:55:57 +08:00
George Joseph 1b0bcefae6 Starch config: Add aarch64
* Added aarch64 to dsp/starchgen.py and Makefile.
* Regenerated files
2021-02-07 17:08:53 -07:00
Oliver Jowett 1b1f9de119 Increase default stats json buffer size to 8k. Retry with a larger buffer if we run out of space, like we do with aircraft.json
With the addition of the per-DF stats, the stats output started to exceed 4k in some cases (notably, you need --net turned on).

Fixes #106
2021-02-07 22:22:01 +08:00
eric1tran 0aedcffc5b Version changes to 5.0~dev 2021-02-07 01:26:43 +00:00
Oliver Jowett 2e59e8f1d6 magnitude_power_uc8_benchmark: don't rely on a previous benchmark including <math.h>
Fixes #105
2021-02-05 14:36:06 +08:00
Oliver Jowett d1fc00a273 Write final stats.json on exit 2021-02-04 16:36:13 +08:00
Oliver Jowett 6a11387861 Collect stats on messages received by DF type 2021-02-04 16:33:26 +08:00
Oliver Jowett 11fb727325 Don't run track / filter expiry if reading recorded captures via --ifile 2021-02-04 16:28:46 +08:00
Oliver Jowett 5782ad7468 Fix a stupid fifo bug that would orphan enqueued data.
This magically didn't really affect normal operation, because in
normal operation the demodulator can consume data faster than it
is produced, so the fifo never grows beyond 0-1 items.

However in cases where the demodulator is slow and the producer
is fast (e.g. reading from a file and running with lots of debug on)
the fifo would lose buffers as soon as it had more than one pending.
2021-02-02 17:51:25 +08:00
Oliver Jowett fdc1ac731d Update starch to upstream commit 521d7632a1076733030017a571facd1cd304e669 2021-02-02 11:34:37 +08:00
Oliver Jowett 2c7b331352 Pass literal type names to STARCH_BENCHMARK_ALLOC (fixes #103) 2021-02-02 11:13:35 +08:00
Oliver Jowett f1c576b657 Support --stats-every with intervals <60 seconds. Add --json-stats-every option
Previously, json stats updates were fixed to 60 seconds, and using --stats--every
with an interval less than 60 seconds produced confusing results.

This commit fixes --stats-every with short intervals, and adds --json-stats-every
to control the json stats update interval. Note that if --json-stats-every is not
a multiple of 60 seconds, then the 1-/5-/15-minute data may not include all data
up to the current time (in that case, the most recent data is reflected in
the "latest" stats)

This implements the alternative approach discussed in PR #89
2021-02-01 15:18:42 +08:00
Oliver Jowett 490b5ce36f Clean up generateStatsJson error handling a bit 2021-02-01 14:07:00 +08:00
Oliver Jowett ab7aa856bc Make stats display fixed-width.
The numbers displayed on the stats output were also very hard to
keep track of because the display widths kept changing depending
on the value.  They are now displayed with fixed widths.

(courtesy @gtjoseph)
(cherry picked from commit 19decfee0cef5f9a93a533f45f072cb1b0a6da2a)
2021-02-01 12:52:01 +08:00
Oliver Jowett 5e8be14f2e
Merge pull request #99 from MavEtJu/fix-interactive-ttl
Fix interactive mode alignment of Time when TTL is > 99
2021-02-01 11:56:01 +08:00
Oliver Jowett 2ea75a345d fix merge indentation 2021-02-01 11:50:43 +08:00
Oliver Jowett 1eab1fc04b
Merge branch 'dev' into fix-interactive-ttl 2021-02-01 11:48:07 +08:00
Oliver Jowett dbdf18dcc0 Increase alignment requirements of uc8_t to avoid warnings when interpreting as uint16_t 2021-02-01 11:26:39 +08:00
Oliver Jowett 3eb2783cdf Use abs, not fabs, on integer types 2021-02-01 11:25:23 +08:00
Edwin Groothuis c06c697e26 When using a --interactive-ttl of more than 99, the alignment
didn't work out.
2021-01-23 17:48:49 +11:00
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
Oliver Jowett c7675b3cd1 Add missed expiry code for emergency / nac_v fields; initialize emergency_valid.
(noticed by @wiedehopf)

Fixes #96
2021-01-15 18:20:50 +08:00
eric1tran b3fcf82473 Merge branch 'filter_enhancements' into dev 2021-01-08 17:31:53 +00:00
Oliver Jowett e8adeb3414 Fix double-counting of overlap samples in stats. 2021-01-05 19:25:44 +08:00
eric1tran 8c325e04a0 Fix up long decimal issue for min/max altitude values 2020-12-14 23:24:45 +00:00
eric1tran 3577cb4057 Adjust max altitude filter to 65000 2020-12-14 19:56:51 +00:00
eric1tran 9950e72d1a Fix minimum width of sidebar and more spacing cleanup 2020-12-14 16:39:34 +00:00
eric1tran 8f9abe57be Add noUiSlider js files 2020-12-14 16:03:07 +00:00
eric1tran 930d2534a2 Speed filter and white space cleanup 2020-12-14 14:37:16 +00:00
eric1tran 22e02dbc62 noUiSlider for altitude filtering plus other styling 2020-12-14 06:34:40 +00:00