quaternion to angles transform works only from -90 to +90 degrees

4 Ansichten (letzte 30 Tage)
Hutin Puy
Hutin Puy am 21 Feb. 2020
Bearbeitet: Hutin Puy am 21 Feb. 2020
I get data from accelerometer and gyroscop.
Then I process these data with Mahony filter and get q0, q1, q2, q3.
Then I calculate roll, pitch, yaw angles:
roll = math.atan2(2.0 * (q1*q2 + q0*q3), 1 - 2.0 * (q3*q3 + q2*q2))
pitch = math.asin(2.0 * (q0*q2 - q1*q3))
yaw = math.atan2(2.0 * (q2*q3 + q0*q1), 1 - 2.0 * (q2*q2 + q1*q1))
.
The problem is that I get angles only from -90...+90 degrees.
Does anybody know any other expressions where the angles are in range -180....+180 degrees?

Antworten (0)

Kategorien

Mehr zu Coordinate Transformations finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by