matlab四元数转欧拉角

Q_idle=[0.9449, 0.1091, 0.2182, 0.2182];
t_idle=[10 20 30];
[a_idle(1),a_idle(2),a_idle(3)]=quat2angle(Q_idle);
a_idle=a_idle/pi*180;

Q_svd=[0.944924 0.109078 0.2182 0.218198];
t_svd=[10.0068 20.0083 30.0157];
[a_svd(1),a_svd(2),a_svd(3)]=quat2angle(Q_svd);
a_svd=a_svd/pi*180;

Q_op=[0.94747 0.092521 0.21291 0.22001];
t_op=[9.2068 20.808 29.216];
[a_op(1),a_op(2),a_op(3)]=quat2angle(Q_op);
a_op=a_op/pi*180;

%夹角:acos(dot(A,B)/(norm(A)*norm(B)))

你可能感兴趣的:(matlab)