ekf: refactor fake position control logic

This commit is contained in:
bresch
2022-01-25 15:07:48 +01:00
committed by Mathieu Bresciani
parent 42404ade77
commit 1502d77df2
6 changed files with 134 additions and 61 deletions
+6 -2
View File
@@ -382,8 +382,7 @@ private:
uint64_t _time_last_flow_terrain_fuse{0}; ///< time the last fusion of optical flow measurements for terrain estimation were performed (uSec)
uint64_t _time_last_arsp_fuse{0}; ///< time the last fusion of airspeed measurements were performed (uSec)
uint64_t _time_last_beta_fuse{0}; ///< time the last fusion of synthetic sideslip measurements were performed (uSec)
uint64_t _time_last_fake_pos{0}; ///< last time we faked position measurements to constrain tilt errors during operation without external aiding (uSec)
uint64_t _time_last_fake_pos_fuse{0}; ///< last time we faked position measurements to constrain tilt errors during operation without external aiding (uSec)
uint64_t _time_last_gps_yaw_fuse{0}; ///< time the last fusion of GPS yaw measurements were performed (uSec)
uint64_t _time_last_gps_yaw_data{0}; ///< time the last GPS yaw measurement was available (uSec)
uint8_t _nb_gps_yaw_reset_available{0}; ///< remaining number of resets allowed before switching to another aiding source
@@ -1009,6 +1008,11 @@ private:
void stopFlowFusion();
void startFakePosFusion();
void resetFakePosFusion();
void stopFakePosFusion();
void fuseFakePosition();
void setVelPosFaultStatus(const int index, const bool status);
// reset the quaternion states and covariances to the new yaw value, preserving the roll and pitch