disables adaptive gain.
This is needed for the case where a v5 package with an unmodified
config file is upgraded. dpkg will install the v6 default config
file automatically so it will already be a v6 config by the time
that upgrade-config runs, but we do still need to go in and
disable adaptive gain.
These messages duplicate ADS-B messages so it's not clear why
they are being interrogated for, and we don't really trust them
enough to do anything with the position information. But
recognizing/decoding them where possible does let us exclude other
Comm-B message types, avoiding some false positives.
The legacy -10 value is still supported for compatbility with old
configs, but new configs should just select an appropriate gain e.g.
60dB.
rtlsdr default gain continues to be the highest regular gain step (~ 49.6dB)
on upgrade to 6.0. (Not extensively tested yet)
We do this for two reasons:
1) the config file layout is completely different, it's error-prone
and tedious to force the user to manually transfer their customizations
on upgrade;
2) if there are user modifications to the config file, an upgrade triggered
remotely via piaware will prefer to keep the original config file intact
rather than installing the new version, and the old version just won't
work correctly with the new infrastructure.
Now we have specific config options for different features rather
than just a big list of command-line options. You can still provide
custom options via EXTRA_OPTIONS or OVERRIDE_OPTIONS.
Also adds adaptive gain settings, and a "slow cpu" setting which
can turn on cpu-reducing options automatically when a slower (armv6)
CPU is in use.
This makes the adaptive gain code only process some fraction of all samples,
rather than every sample. This helps a lot with CPU on slower machines.
We default to a 50% duty cycle to save some CPU without really affecting
the behavior much.
We split the one-second adaptive gain blocks into 20* 50ms "subblocks"
Each subblock is either entirely processed or not processed at all,
based on the configured duty cycle. (This means that the duty cycle
can only be specified in approx 5% increments, but that should be
fine)
For adaptive dynamic range, there's no further complications - we
just look at fewer samples to compute the noise floor.
For adaptive burst, we need to scale up the measured burst rate by
1/duty cycle to account for the samples that we didn't process. It's
also more likely to cause functional changes as it's quite possible
for a relatively small number of loud messages being missed to
affect the computed rate substantially. Not many options there other
than increasing the duty cycle when adaptive burst handling is wanted.