mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-07 00:13:59 -04:00
AP_Mount: In Siyi, fix calculation of attitude quaternion
Order of rotation for Siyi gimbals is (yaw, roll, pitch), which is 312 order. Quaternion::from_euler() function assumes a 321 order of rotation (yaw, pitch, roll).
This commit is contained in:
parent
f2f7f7de3b
commit
cc25f2915a
@ -181,7 +181,8 @@ bool AP_Mount_Siyi::healthy() const
|
||||
// get attitude as a quaternion. returns true on success
|
||||
bool AP_Mount_Siyi::get_attitude_quaternion(Quaternion& att_quat)
|
||||
{
|
||||
att_quat.from_euler(_current_angle_rad.x, _current_angle_rad.y, _current_angle_rad.z);
|
||||
// Order of rotation for Siyi gimbals is (yaw, roll, pitch), which is 312 order
|
||||
att_quat.from_vector312(_current_angle_rad.x, _current_angle_rad.y, _current_angle_rad.z);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user