* AirspeedValidator: remove additional one second of hysteresis for triggering
innovation checks
- this check already uses an integrator and so adding more delay just makes
log analysis more difficult and does not really add any value
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* removed unnecessary conditions
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* AirspeedValidator: only disable innov checks if ASPD_FS_INTEG is negative
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* get rid of unnecessary check on innovation threshold parameter
Signed-off-by: RomanBapst <bapstroman@gmail.com>
---------
Signed-off-by: RomanBapst <bapstroman@gmail.com>
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
Increase wind process noise default (ASPD_WIND_NSD) and gate
(ASPD_TAS_GATE) to be able to catch rapid wind increases with
the internal wind estimator of the airspeed validator.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Trust the beta innovations more compated to the TAS innovations.
That should help with detecting real airspeed failures even with
a dynamic wind estimate (as long as vehicle doesn't fly straight)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* AirspeedSelector: use vehicle_air_data.rho for calculating groundspeed-wind CAS
Previously the vehicle_air_data.temperature and pressure was used, instead of the
density field directly.
Only makes a difference if there is an airspeed sensor connected to provide
the air temperature.
* AirspeedSelector: only safe estimated scale in param if airspeed is valid
* AirspeedSelector: remove 0.01 cliff for saving learned scale to param
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This checks was introduced to catch the (unlikely) case of the driver publishing
a stale value that is not actually from a current measurement right after boot.
This was done by declaring it invalid if there is no update of the measurement
within the first 10s after boot.
Practice though has shown that around 0, many airspeed sensors have such a low
resolution that the reported airspeed value is often at the exact same value
for longer periods of time on totally healthy sensors, and thus we trigger
some false positive failure detections.
Given that this failure mode (driver publishing stale data) is quite rare (if
it doesn't receive new data it should stop publishing), I remove this check
here again.
When in aerodynamic flight mode and armed, there is still the data stuck
check that can trigger if there is no update for 2s.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This fixes a bug where by accident the vtol_status was considered instead of the
vehicle_status, preventing it from running on planes.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This new check is inteded to trigger if there is no data variation published by
the airspeed driver for the first 10s after the first data is published.
This is to capture malfunctioning sensors/drivers that do publish a value, this
value though does not come from real sensor measurements.
Previously this was captured by the data stuck check, but it has shown that
some drivers can publish a stuck value without being actually malfunctioning
(e.g. when the airspeed is outside of their measurement range). Checking for
any data variation is the more conservative check that still catches the above
described failure case.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
- synthetic airspeed will only be declared valid as soon as the wind variance
has dropped below a parameterized threshold. This is useful for vehicles without
an airspeed sensor which rely on synthetic airspeed but only once the vehicle
has turned sufficiently for the wind estimates to be reliable.
Signed-off-by: RomanBapst <bapstroman@gmail.com>
The noise spectral density, NSD, (square root of power spectral density) is a
continuous-time parameter that makes the tuning independent from the EKF
prediction rate.
NSD corresponds to the rate at which the state uncertainty increases
when no measurements are fused into the filter.
Given that the current prediction rate of the wind estimator is 1Hz, the
same tuning is obtained with the same values as before.
The current practice of adding topics to the default set isn't scalable,
as it affects all setups.
By making sure topics are advertised on init, logger can just discard
topics that don't exist. This does not work for all topics, so topics are
specifically marked as optional. It can be extended to more topics later
on though.
This reduces the list of topics by ~35 on a pixracer configured as quad,
and reduces RAM usage by ~1KB.
The situation where this would be desired is unclear, plus it's basically
the same as setting ASPD_SC_P_NOISE to a very small value.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Do no longer use tas_innovation from wind estimator and test ratio, but calculate
the innovation based on wind estimate, TAS measurement (including currently applied scale)
and ground velocity. Use innovations directly to trigger failure.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
- run airspeed scale estimation always, not in dedicated mode
- add option to apply scale automatically, with extra feasibility check
- add airspeed scale for all 3 possible airspeed instances
- clean up parameters
- add check for data stuck (non-changing airspeed data)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>