quaternion to angles transform works only from -90 to +90 degrees
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Coordinate Transformations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!