Commit Graph

1756 Commits

Author SHA1 Message Date
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
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
eric1tran af4951a494 Merge branch 'additional_filtering' into dev 2020-12-11 16:58:13 +00:00
eric1tran ea5a2b8740 Set button to take you to claim url if the feeder is not claimed 2020-12-11 16:56:48 +00:00
eric1tran a0dc843842 Add a button that will take you your My ADS-B Stats page if claimed 2020-12-11 16:42:24 +00:00
eric1tran 16b3d12670 Keep configuration buttons highlighted while active and some styling 2020-12-10 00:55:00 +00:00
eric1tran 829fe1b5e2 Filter and Column buttons to expand panels and styling cleanup 2020-12-09 23:34:32 +00:00
eric1tran 47e4df2b7b Put filters into an accordion style dropdown 2020-12-09 18:22:15 +00:00
eric1tran 1916fc6648 Use regex match for filter comparisons 2020-12-09 15:18:05 +00:00
eric1tran ad56c1363b Include SkyAware in version display 2020-12-08 20:44:14 +00:00
eric1tran 9b85a30c91 Enable all data source checkboxes by default 2020-12-08 20:34:04 +00:00
eric1tran cd6d3a373b Comments and spacing 2020-12-08 17:24:10 +00:00
eric1tran c466a4724f Add filtering on data source 2020-12-08 17:24:10 +00:00
eric1tran e2b2ce3f63 Add checkboxes next to data source legend and css styling 2020-12-08 17:24:10 +00:00
eric1tran d3459b1697 Adding filtering by aircraft ident 2020-12-08 17:24:10 +00:00
eric1tran 0fddde5126 Make aircraft type filter case insensitive 2020-12-08 17:24:10 +00:00
eric1tran f4f2f3ddad Add filtering by aircraft type 2020-12-08 17:24:09 +00:00
Oliver Jowett c1eeda612e fifo_acquire / fifo_dequeue: maybe fix pthread_cond_timedwait error handling
It was possible, due to an off-by-one error in normalize_timespec, that
the computed deadline passed to pthread_cond_timedwait had tv_nsec == 1000000000.
glibc would reject this with EINVAL. While I never caught this in the act, there
seem to be two follow-on problems from this:

1) we were looking for a negative return from pthread_cond_timedwait and testing errno.
This is not how errors are reported, instead pthread functions return the error value
directly. So the enclosing loop could spin forever, repeatedly passing the bad deadline
value.

2) even if the error handling caught the EINVAL return, it assumed that the mutex was
no longer held and didn't release it; but on error returns, the mutex state is actually
untouched.

Fix both cases (probably), and log about unusual returns from pthread_cond_timedwait
2020-11-17 19:59:59 +08:00
Oliver Jowett 5c043e8496 normalize_timespec: handle tv_nsec == 1000000000 correctly 2020-11-17 19:59:47 +08:00
Eric Tran e48006311b Fix type on SkyAware README 2020-10-12 03:08:41 +00:00
Oliver Jowett f0055c978d Avoid false positives for address 000000 in the icao filter hashtable 2020-10-08 19:30:06 +08:00
Eric Tran 66f26846b8 Merge branch 'master' into dev 2020-10-02 16:36:11 +00:00