mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-12-01 21:52:12 +08:00
fix(ekf2): hard reset external position estimate while position aiding active (#27856)
(cherry picked from commit 1d02832798)
This commit is contained in:
1 parent
a01442c003
commit
037c248dce
1 file changed
+3
-3
@@ -336,11 +336,11 @@ bool Ekf::resetGlobalPosToExternalObservation(const double latitude, const doubl
|
||||
|
||||
const bool innov_rejected = (test_ratio > 1.f);
|
||||
|
||||
if (!_control_status.flags.in_air || (eph > 0.f && eph < 1.f) || innov_rejected) {
|
||||
if (!_control_status.flags.in_air || (eph > 0.f && eph < 1.f) || innov_rejected
|
||||
|| isHorizontalPositionAidingActive()) {
|
||||
// When on ground or accuracy chosen to be very low, we hard reset position
|
||||
// this allows the user to still send hard resets at any time
|
||||
// Also reset when another position source is active as it it would otherwise have almost no
|
||||
// visible effect to the position estimate.
|
||||
// Also hard reset when a position aiding source is active
|
||||
ECL_INFO("reset position to external observation");
|
||||
_information_events.flags.reset_pos_to_ext_obs = true;
|
||||
|
||||
|
||||
Reference in new issue
Block a user