Skip to content

Commit c515027

Browse files
authored
ekf2: revent yaw spikes on reset (#25972)
1 parent 339a0b4 commit c515027

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/modules/ekf2/EKF2.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,6 @@ void EKF2::Run()
748748

749749
// push imu data into estimator
750750
_ekf.setIMUData(imu_sample_new);
751-
PublishAttitude(now); // publish attitude immediately (uses quaternion from output predictor)
752751

753752
// integrate time to monitor time slippage
754753
if (_start_time_us > 0) {
@@ -855,6 +854,9 @@ void EKF2::Run()
855854
#endif // CONFIG_EKF2_MAGNETOMETER
856855
}
857856

857+
PublishAttitude(now); // publish attitude immediately (uses quaternion from output predictor)
858+
859+
858860
// publish ekf2_timestamps
859861
_ekf2_timestamps_pub.publish(ekf2_timestamps);
860862
}

0 commit comments

Comments
 (0)