EKF: misc improvements to handling of accel clipping

This commit is contained in:
Paul Riseborough
2021-02-09 19:55:32 +11:00
committed by Paul Riseborough
parent 9c89fa3b29
commit c566318db5
3 changed files with 6 additions and 11 deletions
+1 -1
View File
@@ -152,7 +152,7 @@ void Ekf::predictCovariance()
// When on ground, only consider an accel bias observable if aligned with the gravity vector
const bool is_bias_observable = (fabsf(_R_to_earth(2, index)) > 0.8f) || _control_status.flags.in_air;
const bool do_inhibit_axis = do_inhibit_all_axes || !is_bias_observable;
const bool do_inhibit_axis = do_inhibit_all_axes || !is_bias_observable || _imu_sample_delayed.delta_vel_clipping[index];
if (do_inhibit_axis) {
// store the bias state variances to be reinstated later