Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/modules/ekf2/EKF/ekf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Loading