ekf2: refactor gps vel/pos fusion control logic

This commit is contained in:
bresch
2021-11-01 13:59:34 +01:00
committed by Mathieu Bresciani
parent 9afc390552
commit 689ab12845
5 changed files with 230 additions and 177 deletions
+6
View File
@@ -661,6 +661,9 @@ private:
bool fuseVerticalPosition(const Vector3f &innov, const Vector2f &innov_gate, const Vector3f &obs_var,
Vector3f &innov_var, Vector2f &test_ratio);
void fuseGpsVelPos();
bool isVelStateAlignedWithObs() const;
// calculate optical flow body angular rate compensation
// returns false if bias corrected body rate data is unavailable
bool calcOptFlowBodyRateComp();
@@ -804,6 +807,9 @@ private:
void controlGpsFusion();
void controlGpsYawFusion(bool gps_checks_passing, bool gps_checks_failing);
bool hasHorizontalAidingTimedOut() const;
bool isRecentTakeoff() const;
// control fusion of magnetometer observations
void controlMagFusion();