フィルターのクリア

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

3 ビュー (過去 30 日間)
Hutin Puy
Hutin Puy 2020 年 2 月 21 日
編集済み: Hutin Puy 2020 年 2 月 21 日
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 件)

カテゴリ

Help Center および File ExchangeSensor Models についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by