mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
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:
parent
361d66bb44
commit
eba0b99950
@ -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());
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user