3D旋转矩阵与变换矩阵

2017-07-27

本博客所有文章采用的授权方式为 自由转载-非商用-非衍生-保持署名 ,转载请务必注明出处,谢谢。

声明:
本博客欢迎转发,但请保留原作者信息!
博客地址:焦海林的博客;
内容系本人学习、研究和总结,如有雷同,实属荣幸!

有必要搞清楚3D旋转矩阵与坐标变换矩阵的定义和两者之间的关系。

机体坐标系(b)中的矢量和位置坐标转换到导航坐标系(n)中,必须依赖姿态转换矩阵(也称方向余弦矩阵),反之亦然。 矢量$\bf{A}$在导航坐标系中表示为$\bf{A}^n$,转换到机体坐标系中表示为形式$\bf{A}^b$,利用方向余弦矩阵$\bf{C}^b_n$可完成此转换,表示为 其中,

计算得到,

Matlab Code: euler2rotMat(phi, theta, psi)

function R = euler2rotMat(phi, theta, psi)
%EULER2ROTMAT Converts a ZYX Euler angle orientation to a rotation matrix

%

%   q = euler2rotMat(axis, angle)

%

%   Converts ZYX Euler angle orientation to a rotation matrix where phi is

%   a rotation around X, theta around Y and psi around Z.

%

%   For more information see:

%   http://www.x-io.co.uk/node/8#quaternions

%

%	Date          Author          Notes

%	27/09/2011    SOH Madgwick    Initial release


R(1,1,:) = cos(psi).*cos(theta);
R(1,2,:) = -sin(psi).*cos(phi) + cos(psi).*sin(theta).*sin(phi);
R(1,3,:) = sin(psi).*sin(phi) + cos(psi).*sin(theta).*cos(phi);

R(2,1,:) = sin(psi).*cos(theta);
R(2,2,:) = cos(psi).*cos(phi) + sin(psi).*sin(theta).*sin(phi);
R(2,3,:) = -cos(psi).*sin(phi) + sin(psi).*sin(theta).*cos(phi);

R(3,1,:) = -sin(theta);
R(3,2,:) = cos(theta).*sin(phi);
R(3,3,:) = cos(theta).*cos(phi);

end

文章赞赏

赞赏码

文章评论

comments powered by Disqus


章节列表