mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 11:43:34 +08:00
ekf2: initialiseFilter() simplify mag heading init and resetQuatStateYaw
- most of resetQuatStateYaw doesn't apply to initial heading init, so removing the special case keeps it simple
This commit is contained in:
@@ -216,7 +216,7 @@ bool Ekf::resetYawToGps()
|
||||
const float measured_yaw = _gps_sample_delayed.yaw;
|
||||
|
||||
const float yaw_variance = sq(fmaxf(_params.gps_heading_noise, 1.e-2f));
|
||||
resetQuatStateYaw(measured_yaw, yaw_variance, true);
|
||||
resetQuatStateYaw(measured_yaw, yaw_variance);
|
||||
|
||||
_aid_src_gnss_yaw.time_last_fuse = _imu_sample_delayed.time_us;
|
||||
_gnss_yaw_signed_test_ratio_lpf.reset(0.f);
|
||||
|
||||
Reference in New Issue
Block a user