ekf2: delete obsolete _bad_vert_accel_detected

This commit is contained in:
Daniel Agar
2021-12-13 09:13:39 -05:00
parent 986cf288da
commit fc17797548
2 changed files with 2 additions and 3 deletions
-1
View File
@@ -550,7 +550,6 @@ private:
// imu fault status
uint64_t _time_bad_vert_accel{0}; ///< last time a bad vertical accel was detected (uSec)
uint64_t _time_good_vert_accel{0}; ///< last time a good vertical accel was detected (uSec)
bool _bad_vert_accel_detected{false}; ///< true when bad vertical accelerometer data has been detected
uint16_t _clip_counter{0}; ///< counter that increments when clipping ad decrements when not
// variables used to control range aid functionality
+2 -2
View File
@@ -86,7 +86,7 @@ bool Ekf::fuseVerticalVelocity(const Vector3f &innov, const Vector2f &innov_gate
// but limit innovation to prevent spikes that could destabilise the filter
float innovation;
if (_bad_vert_accel_detected && !innov_check_pass) {
if (_fault_status.flags.bad_acc_vertical && !innov_check_pass) {
const float innov_limit = innov_gate(1) * sqrtf(innov_var(2));
innovation = math::constrain(innov(2), -innov_limit, innov_limit);
innov_check_pass = true;
@@ -160,7 +160,7 @@ bool Ekf::fuseVerticalPosition(const Vector3f &innov, const Vector2f &innov_gate
// but limit innovation to prevent spikes that could destabilise the filter
float innovation;
if (_bad_vert_accel_detected && !innov_check_pass) {
if (_fault_status.flags.bad_acc_vertical && !innov_check_pass) {
const float innov_limit = innov_gate(1) * sqrtf(innov_var(2));
innovation = math::constrain(innov(2), -innov_limit, innov_limit);
innov_check_pass = true;