Browse Source

fixed issue with airspeed never fused

master
CarlOlsson 9 years ago
parent
commit
51c8715638
  1. 9
      EKF/control.cpp

9
EKF/control.cpp

@ -744,7 +744,9 @@ void Ekf::controlAirDataFusion()
// if the airspeed measurements have timed out for 10 seconds we declare the wind estimate to be invalid // if the airspeed measurements have timed out for 10 seconds we declare the wind estimate to be invalid
_control_status.flags.wind = false; _control_status.flags.wind = false;
} else if (_tas_data_ready) { }
if (_tas_data_ready) {
// if we have airspeed data to fuse and winds states are inactive, then // if we have airspeed data to fuse and winds states are inactive, then
// they need to be activated and the corresponding states and covariances reset // they need to be activated and the corresponding states and covariances reset
if (!_control_status.flags.wind) { if (!_control_status.flags.wind) {
@ -753,14 +755,9 @@ void Ekf::controlAirDataFusion()
resetWindCovariance(); resetWindCovariance();
} }
}
// always fuse airspeed if available and the wind states are active
if (_tas_data_ready && _control_status.flags.wind) {
fuseAirspeed(); fuseAirspeed();
} }
} }
void Ekf::controlMagFusion() void Ekf::controlMagFusion()

Loading…
Cancel
Save