Commit Graph

29 Commits

Author SHA1 Message Date
Oliver Jowett ac97423249 Misc adaptive gain changes:
Update adaptive gain control loop to handle interactions between burst detection and dynamic range control.

Internal doc updates & naming cleanups.

Stats tweaks.
2021-07-07 20:57:34 +08:00
Oliver Jowett fd8f2d77e1 Fix adaptive gain stats not getting set on stats_current -> zeros
appearing in stats output. Now we have a validity flag for the stats
members where we have to pick one value and not simply sum data.
2021-07-07 20:18:54 +08:00
Oliver Jowett 56625449e8
Adaptive gain, first pass (#134)
This PR adds basic adaptive gain support, which adjusts SDR gain on the fly based on the noise & signal levels seen.

There are two control mechanisms:

Dynamic range control is enabled by the --adaptive-range option. This adjusts SDR gain to try to achieve a minimum dynamic range, regardless of the exact hardware in the RF path.

Burst (loud message) control is enabled by the --adaptive-burst option. This decreases SDR gain when undecodable loud messages are heard, allowing for better reception of nearby aircraft at the expense of range.

This is only the basic implementation - see the PR for remaining work to do.
2021-06-29 20:11:13 +08:00
Oliver Jowett 6a11387861 Collect stats on messages received by DF type 2021-02-04 16:33:26 +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 b2e9153653 Add stats for unreliable tracks 2019-11-27 21:41:33 +08:00
Oliver Jowett 2142d2edf5 Whitespace changes only: cleaning up trailing whitespace at EOL 2017-06-15 18:17:07 +01:00
Oliver Jowett 52464b97c1 Remove internal webserver code entirely. 2016-12-29 18:35:35 +00:00
Oliver Jowett e4ceea33da Disable the internal webserver at build time. 2016-07-10 11:56:31 +01:00
Oliver Jowett acd38708cc Fix a couple of places that refer to "noise floor".
We measure the total power of everything we can't demodulate;
that's not really the noise floor.
2016-05-31 11:52:25 +01:00
Oliver Jowett 2b466535de Support multiple listening ports per listener type.
Beast input defaults to listening on both 30004 and 30104.
Drop the FATSV listener entirely (use faup1090 for that)
Ignore --net-beast.
2016-01-24 18:47:58 +00:00
Oliver Jowett 8d1df036ae Don't use DF0/4/16/20 altitudes when DF17/18 altitudes are available.
The DF17/18 values are generally more trustworthy as they have full
CRC coverage. Errors in the CRC bits of a DF0/4/16/20 message can
result in the contained altitude being attributed to the wrong aircraft.
2015-06-26 20:43:46 +01:00
Oliver Jowett 5c2ec7106e Clean up dependencies.
Move ModeA/C demodulator to demod_2000 (decoding stays in mode_ac.c)
Remove dependency on interactive.c in stats.c
faup1090 then doesn't need interactive.c at all.
2015-06-26 18:36:14 +01:00
Oliver Jowett 656df98a76 Add --stats-range 2015-06-19 17:29:14 +01:00
Oliver Jowett 21bdc45bf0 Tweaks to noise measurements. 2015-06-16 10:13:25 +01:00
Oliver Jowett 15ea5ba3da Rearrangements to the receive thread.
Magnitude conversion now happens immediately when sample data is
received, so there is no risk of newly received data clobbering old
data under CPU overload.
2015-04-09 18:51:31 +01:00
Oliver Jowett f6d2f3dfff More CPR stats. 2015-02-19 18:53:11 +00:00
Oliver Jowett bfe2cb0336 NUCp tracking and CPR position sanity checks.
Track NUCp when we compute positions.

Do speed checks when we have an updated position with the same or worse NUCp
before accepting the new position. Don't do speed checks on new postions if
they improve NUCp - assume that the new position is better.

Include NUCp in aircraft.json

Gather stats on reasons for rejecting CPR data due to range/speed check failures.

Expire old positions if we have had no updates for 60 seconds.

Closes #16, closes #17.
2015-02-18 00:12:35 +00:00
Oliver Jowett af4f81caf7 Include timezone in stats output. 2015-02-17 21:35:23 +00:00
Oliver Jowett f9ed7e4a97 More time_t -> milliseconds conversions.
This lets us support fractional net flush times among other things, which is handy.
2015-02-10 22:24:22 +00:00
Oliver Jowett a49b5b8830 Add stats for total aircraft tracks and tracks that have only a single message. 2015-02-08 18:47:39 +00:00
Oliver Jowett 704d8aaffb Don't try to log signal peak power if no peaks recorded. 2015-02-06 13:27:47 +00:00
Oliver Jowett df5e41363a Fix compile error. 2015-01-23 01:49:14 +00:00
Oliver Jowett 5b40377b98 Measure CPU for demodulator, read thread, and background tasks individually. 2015-01-23 01:22:22 +00:00
Oliver Jowett fe0a87a588 Fix remote_received_modes counter. 2015-01-22 20:40:30 +00:00
Oliver Jowett a59077a370 Stats overhaul. 2015-01-22 19:49:19 +00:00
Oliver Jowett 19082d92ea Measure signal power / noise power (at least in 2.4MHz mode).
Switch signalLevel back to a power measurement, don't put SNR in there.
But make it a 0.0 - 1.0 double so we're not scaling everywhere.

Adjust for the amplitude offset when calculating power.

Adapt everything else to the new scheme.
2015-01-22 01:01:39 +00:00
Oliver Jowett ed4d481772 Import CPR changes from experimental branch. 2015-01-20 18:41:44 +00:00
Oliver Jowett b9b76da02d Stats rearrangement, based on experimental branch changes. 2015-01-20 17:16:35 +00:00