mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 11:03:33 +08:00
EKF: Fix reversion from GPS to no-aiding mode (#412)
* EKF: Do not delay reversion to no-aiding mode if parameter initiated * EKF: Move no-aid reversion resets to helper functions * EKF: Prevent unwanted fusion of velocity data during no aiding mode
This commit is contained in:
+8
-2
@@ -64,7 +64,10 @@ bool Ekf::resetVelocity()
|
||||
zeroOffDiag(P,4,6);
|
||||
|
||||
} else {
|
||||
return false;
|
||||
// Used when falling back to non-aiding mode of operation
|
||||
_state.vel(0) = 0.0f;
|
||||
_state.vel(1) = 0.0f;
|
||||
setDiag(P,4,5,25.0f);
|
||||
}
|
||||
|
||||
// calculate the change in velocity and apply to the output predictor state history
|
||||
@@ -122,7 +125,10 @@ bool Ekf::resetPosition()
|
||||
setDiag(P,7,8,sq(_ev_sample_delayed.posErr));
|
||||
|
||||
} else {
|
||||
return false;
|
||||
// Used when falling back to non-aiding mode of operation
|
||||
_state.pos(0) = _last_known_posNE(0);
|
||||
_state.pos(1) = _last_known_posNE(1);
|
||||
setDiag(P,7,8,sq(_params.pos_noaid_noise));
|
||||
}
|
||||
|
||||
// calculate the change in position and apply to the output predictor state history
|
||||
|
||||
Reference in New Issue
Block a user