ekf2: remove unnecessary code

The delta angles are now correctly accumulated in case
multiple resets are triggered during the same epoch
This commit is contained in:
bresch 2025-09-02 13:14:20 +02:00 committed by Mathieu Bresciani
parent 361d66bb44
commit eba0b99950
2 changed files with 0 additions and 10 deletions

View File

@ -522,14 +522,6 @@ bool Ekf::resetYawToEKFGSF()
return false;
}
// don't allow reset if there's just been a yaw reset
const bool yaw_alignment_changed = (_control_status_prev.flags.yaw_align != _control_status.flags.yaw_align);
const bool quat_reset = (_state_reset_status.reset_count.quat != _state_reset_count_prev.quat);
if (yaw_alignment_changed || quat_reset) {
return false;
}
ECL_INFO("yaw estimator reset heading %.3f -> %.3f rad",
(double)getEulerYaw(_R_to_earth), (double)_yawEstimator.getYaw());

View File

@ -593,8 +593,6 @@ void Ekf::resetMagHeading(const Vector3f &mag)
// update quaternion states and corresponding covarainces
resetQuatStateYaw(yaw_new, yaw_new_variance);
_time_last_heading_fuse = _time_delayed_us;
_mag_heading_innov_lpf.reset(0.f);
_control_status.flags.mag_heading_consistent = true;
}