mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-11-09 16:41:21 +08:00
AP_NavEKF2: Fix bug in published yaw reset value found during code review
This commit is contained in:
1 parent
77fad065d1
commit
175faf1e41
1 file changed
+3
-2
@@ -1173,8 +1173,9 @@ uint32_t NavEKF2::getLastYawResetAngle(float &yawAngDelta)
|
||||
core[primary].getEulerAngles(eulers_primary);
|
||||
if (primary != yaw_step_data.prev_instance) {
|
||||
// the delta is the difference between the current and previous yaw
|
||||
// This overwrites any yaw reset value recorded from an internal eff reset
|
||||
yaw_step_data.yaw_delta += wrap_PI(eulers_primary.z - yaw_step_data.prev_yaw);
|
||||
// This overwrites any yaw reset value recorded from an internal ekf reset
|
||||
// that has occured on the same time-step
|
||||
yaw_step_data.yaw_delta = wrap_PI(eulers_primary.z - yaw_step_data.prev_yaw);
|
||||
|
||||
// record the time of the yaw reset event
|
||||
yaw_step_data.yaw_reset_time_ms = imuSampleTime_us/1000;
|
||||
|
||||
Reference in new issue
Block a user