mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-17 05:37:35 +08:00
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.
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user