quaternion to angles transform works only from -90 to +90 degrees
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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?
0 Kommentare
Antworten (0)
Siehe auch
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!