AirspeedSelector: only update with lpos if coming from GNSS (#23268)

Compared to GNSS, alternate position observation methods are less accurate
and thus generally not good enough to do airspeed validation with.
Airspeed validation is thus disabled if no GNSS fusion is happening.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2024-06-14 17:10:08 +02:00
committed by GitHub
parent c0d6b67633
commit f646f1ba98
3 changed files with 22 additions and 22 deletions
@@ -56,7 +56,7 @@ struct airspeed_validator_update_data {
float airspeed_true_raw;
uint64_t airspeed_timestamp;
matrix::Vector3f ground_velocity;
bool lpos_valid;
bool gnss_valid;
float lpos_evh;
float lpos_evv;
matrix::Quatf q_att;
@@ -175,15 +175,15 @@ private:
void update_in_fixed_wing_flight(bool in_fixed_wing_flight) { _in_fixed_wing_flight = in_fixed_wing_flight; }
void update_wind_estimator(const uint64_t timestamp, float airspeed_true_raw, bool lpos_valid,
void update_wind_estimator(const uint64_t timestamp, float airspeed_true_raw, bool gnss_valid,
const matrix::Vector3f &vI,
float lpos_evh, float lpos_evv, const Quatf &q_att);
void update_CAS_scale_validated(bool lpos_valid, const matrix::Vector3f &vI, float airspeed_true_raw);
void update_CAS_scale_validated(bool gnss_valid, const matrix::Vector3f &vI, float airspeed_true_raw);
void update_CAS_scale_applied();
void update_CAS_TAS(float air_pressure_pa, float air_temperature_celsius);
void check_airspeed_data_stuck(uint64_t timestamp);
void check_airspeed_innovation(uint64_t timestamp, float estimator_status_vel_test_ratio,
float estimator_status_mag_test_ratio, const matrix::Vector3f &vI, bool lpos_valid);
float estimator_status_mag_test_ratio, const matrix::Vector3f &vI, bool gnss_valid);
void check_load_factor(float accel_z);
void update_airspeed_valid_status(const uint64_t timestamp);
void reset();