ekf_hgt: call specific height reset function instead of generic one

- Also use the delayed current data instead of newest that might not be
available (gps buffer is sometimes empty if the dt between samples is
larger than the delayed horizon).

- Separate "baro fault" from "baro intermittent": intermittent is a
  temporary failure and should prevent from switching to baro right now,
  but "fault" means that it should never be used anymore

- In case of height timeout, check for metrics but not for consistency
  as the filter is likely to have diverged already.
This commit is contained in:
bresch
2022-02-22 11:49:25 +01:00
committed by Mathieu Bresciani
parent cba73585e1
commit edabfd2f0e
4 changed files with 145 additions and 166 deletions
-5
View File
@@ -101,11 +101,6 @@ bool Ekf::collect_gps(const gps_message &gps)
_gps_origin_eph = gps.eph;
_gps_origin_epv = gps.epv;
// if the user has selected GPS as the primary height source, switch across to using it
if (_params.vdist_sensor_type == VDIST_SENSOR_GPS) {
startGpsHgtFusion();
}
_information_events.flags.gps_checks_passed = true;
ECL_INFO("GPS checks passed");