EKF: Use dead-reckoning status to determine if air data should modify non-wind states

This commit is contained in:
Paul Riseborough
2017-10-20 14:44:37 +11:00
parent e4ffe199ed
commit 0d32128701
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -72,6 +72,9 @@ void Ekf::fuseAirspeed()
// Perform fusion of True Airspeed measurement
if (v_tas_pred > 1.0f) {
// determine if we need the sideslip fusion to correct states other than wind
bool update_wind_only = !_is_dead_reckoning;
// Calculate the observation jacobian
// intermediate variable from algebraic optimisation
SH_TAS[0] = 1.0f/v_tas_pred;
@@ -102,7 +105,7 @@ void Ekf::fuseAirspeed()
SK_TAS[1] = SH_TAS[1];
if (((_time_last_imu - _time_last_gps) < 1e6) || ((_time_last_imu - _time_last_ext_vision) < 1e6) || ((_time_last_imu - _time_last_optflow) < 1e6)) {
if (update_wind_only) {
// If we are getting aiding from other sources, then don't allow the airspeed measurements to affect the non-windspeed states
for (unsigned row = 0; row <= 21; row++) {
Kfusion[row] = 0.0f;
File diff suppressed because one or more lines are too long