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:
Daniel Agar
2022-09-02 08:46:10 -04:00
parent e467d11990
commit 7bbdc220f5
4 changed files with 29 additions and 32 deletions
+1 -1
View File
@@ -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);