ekf2: add fake height fusion logic

When there is no vertical aiding, fake height is started to constrain
the vertical channel of the EKF
This commit is contained in:
bresch
2022-09-10 12:29:29 -04:00
committed by Daniel Agar
parent aa716936bf
commit a54fa7b9b1
15 changed files with 177 additions and 7 deletions
+10 -1
View File
@@ -402,6 +402,7 @@ public:
const auto &aid_src_baro_hgt() const { return _aid_src_baro_hgt; }
const auto &aid_src_rng_hgt() const { return _aid_src_rng_hgt; }
const auto &aid_src_fake_hgt() const { return _aid_src_fake_hgt; }
const auto &aid_src_fake_pos() const { return _aid_src_fake_pos; }
const auto &aid_src_ev_yaw() const { return _aid_src_ev_yaw; }
@@ -479,7 +480,7 @@ private:
uint64_t _time_last_healthy_rng_data{0};
uint8_t _nb_gps_yaw_reset_available{0}; ///< remaining number of resets allowed before switching to another aiding source
Vector2f _last_known_posNE{}; ///< last known local NE position vector (m)
Vector3f _last_known_pos{}; ///< last known local position vector (m)
uint64_t _time_acc_bias_check{0}; ///< last time the accel bias check passed (uSec)
uint64_t _delta_time_baro_us{0}; ///< delta time between two consecutive delayed baro samples from the buffer (uSec)
@@ -549,6 +550,7 @@ private:
estimator_aid_source_1d_s _aid_src_airspeed{};
estimator_aid_source_2d_s _aid_src_fake_pos{};
estimator_aid_source_1d_s _aid_src_fake_hgt{};
estimator_aid_source_1d_s _aid_src_ev_yaw{};
@@ -932,6 +934,13 @@ private:
// control fusion of fake position observations to constrain drift
void controlFakePosFusion();
void controlFakeHgtFusion();
void startFakeHgtFusion();
void resetFakeHgtFusion();
void resetHeightToLastKnown();
void stopFakeHgtFusion();
void fuseFakeHgt();
void controlZeroVelocityUpdate();
void controlZeroInnovationHeadingUpdate();