フィルターのクリア

how to calculate quaternion difference

4 ビュー (過去 30 日間)
manikya valli
manikya valli 2016 年 2 月 15 日
編集済み: Matt J 2016 年 2 月 15 日
I have two sets of euler angles ([30,40,50] and [10,10,10]) and I want to compute difference using quaternion representation. Here is my code:
q1=angle2quat(deg2rad(30),deg2rad(40),deg2rad(50));
q2=angle2quat(deg2rad(10),deg2rad(10),deg2rad(10));
q3=quatmultiply(q1,quatconj(q2));
[r,p,y]=quat2angle(q3);
rad2deg(r)
rad2deg(p)
rad2deg(y)
The above code giving:
12.1717
37.4853
29.6621
But actually I have to get 20,30,40.What is the wrong in mycode

回答 (0 件)

カテゴリ

Help Center および File ExchangeQuaternion Math についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by