quaternion to angles transform works only from -90 to +90 degrees
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Coordinate Transformations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!