mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-17 00:27:34 +08:00
ekf: correct quaternion multiplication order
This commit is contained in:
committed by
Paul Riseborough
parent
d6351bd7a5
commit
ad7f7af03b
+2
-2
@@ -516,7 +516,7 @@ bool Ekf::realignYawGPS()
|
|||||||
|
|
||||||
// apply the change in attitude quaternion to our newest quaternion estimate
|
// apply the change in attitude quaternion to our newest quaternion estimate
|
||||||
// which was already taken out from the output buffer
|
// which was already taken out from the output buffer
|
||||||
_output_new.quat_nominal = _state_reset_status.quat_change * _output_new.quat_nominal;
|
_output_new.quat_nominal = _output_new.quat_nominal * _state_reset_status.quat_change;
|
||||||
|
|
||||||
// capture the reset event
|
// capture the reset event
|
||||||
_state_reset_status.quat_counter++;
|
_state_reset_status.quat_counter++;
|
||||||
@@ -756,7 +756,7 @@ bool Ekf::resetMagHeading(Vector3f &mag_init, bool increase_yaw_var, bool update
|
|||||||
|
|
||||||
// apply the change in attitude quaternion to our newest quaternion estimate
|
// apply the change in attitude quaternion to our newest quaternion estimate
|
||||||
// which was already taken out from the output buffer
|
// which was already taken out from the output buffer
|
||||||
_output_new.quat_nominal = _state_reset_status.quat_change * _output_new.quat_nominal;
|
_output_new.quat_nominal = _output_new.quat_nominal * _state_reset_status.quat_change;
|
||||||
}
|
}
|
||||||
|
|
||||||
// capture the reset event
|
// capture the reset event
|
||||||
|
|||||||
Reference in New Issue
Block a user