EKF: Prevent rounding errors causing bad conditioned covariance matrix

The previous practice of relying on the off-diagonals being zero caused problems with conditioning of the magnetometer fusion on one flight. By storing the variances when the learning inhibit becomes active and ensuring that the rows and columns in the covariance matrix for the inhibited states are always zero, the observed numerical conditioning error has been eliminated for replay of the problem flight log .
This commit is contained in:
Paul Riseborough
2017-04-06 13:34:37 +10:00
parent 8f6c51e10e
commit fa07536314
3 changed files with 24 additions and 11 deletions
+1
View File
@@ -198,6 +198,7 @@ bool Ekf::init(uint64_t timestamp)
_accel_mag_filt = 0.0f;
_ang_rate_mag_filt = 0.0f;
_prev_dvel_bias_var.zero();
return ret;
}