fix(ekf2): hard reset external position estimate while position aiding active (#27856)

(cherry picked from commit 1d02832798)
This commit is contained in:
Marco Hauswirth authored and Ramon Roche committed 2026-08-08 20:31:58 -07:00
1 parent a01442c003
commit 037c248dce
1 file changed
+3 -3
+3 -3
View File
@@ -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;