mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 13:13:35 +08:00
EKF: reset position when stopping GPS use and EV is active
This commit is contained in:
committed by
Paul Riseborough
parent
267195a11b
commit
93eb1266f6
@@ -616,6 +616,10 @@ void Ekf::controlGpsFusion()
|
||||
// Handle the case where we are using GPS and another source of aiding and GPS is failing checks
|
||||
if (_control_status.flags.gps && gps_checks_failing && (_control_status.flags.opt_flow || _control_status.flags.ev_pos)) {
|
||||
_control_status.flags.gps = false;
|
||||
// Reset position state to external vision if we are going to use absolute values
|
||||
if (_control_status.flags.ev_pos && !(_params.fusion_mode & MASK_ROTATE_EV)) {
|
||||
resetPosition();
|
||||
}
|
||||
ECL_WARN("EKF GPS data quality poor - stopping use");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user