Browse Source

EKF: dont check gps_check_fail_status in velocity reset (#761)

In a velocity reset we only used the GPS measurement if _gps_check_fail_status.value was equal to zero. The value of this flag is independent of EKF2_GPS_CHECK so checks can fail even if they are not configured to have any effect.
master
Carl Olsson 5 years ago committed by GitHub
parent
commit
3fa5f501ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      EKF/ekf_helper.cpp

2
EKF/ekf_helper.cpp

@ -53,7 +53,7 @@ bool Ekf::resetVelocity() @@ -53,7 +53,7 @@ bool Ekf::resetVelocity()
Vector3f vel_before_reset = _state.vel;
// reset EKF states
if (_control_status.flags.gps && _gps_check_fail_status.value==0) {
if (_control_status.flags.gps && isTimedOut(_last_gps_fail_us, (uint64_t)_min_gps_health_time_us)) {
ECL_INFO_TIMESTAMPED("reset velocity to GPS");
// this reset is only called if we have new gps data at the fusion time horizon
_state.vel = _gps_sample_delayed.vel;

Loading…
Cancel
Save