姿态矩阵推导简记

(大部分属于个人理解)

  1. 欧拉角法

首先明确的是三个欧拉角,对于任意右手三维空间笛卡尔坐标系定义:

  • 绕 轴 正方向 旋转,为 航向/摇头角 \psi /psi
  • 绕 轴 正方向 旋转,为 俯仰/点头角 \theta /theta
  • 轴 正方向 旋转,为 横滚/侧滚角 \phi /phi

并且,必须按上述顺序进行旋转!

对于一个二维平面,一个点在旋转前后坐标系下的投影变换推导如下:

 \begin{cases} x_0=rcos\alpha\\ y_0=rsin\alpha \end{cases}   

\begin{cases} x_1=rcos(\alpha-\theta)=r(cos\alpha cos\theta + sin\alpha sin\theta) =x_0cos\theta + y_0sin\theta\\ y_1=rsin(\alpha - \theta) = r (sin\alpha cos\theta - cos\alpha sin\theta) =-x_0sin\theta+y_0cos\theta \end{}

写成矩阵形式有

\begin{bmatrix} x_1\\ y_1 \end{bmatrix} = \begin{bmatrix} cos\theta&sin\theta \\ -sin\theta& cos\theta \end{bmatrix} \begin{bmatrix} x_0\\ y_0 \end{bmatrix}

 

接下来推广到三维空间坐标系旋转中有,

 \begin{bmatrix} x_1\\ y_1\\ z_1 \end{bmatrix} =\begin{bmatrix} cos\psi & sin\psi & 0 \\ -sin\psi & cos\psi & 0\\ 0&0 &1 \end{bmatrix} \begin{bmatrix} x_0\\ y_0\\ z_0 \end{bmatrix}

 

 \begin{bmatrix} x_2\\ y_2\\ z_2 \end{bmatrix} = \begin{bmatrix} cos\theta & 0 & -sin\theta\\ 0 & 1 & 0\\ sin\theta & 0 & cos\theta \end{bmatrix} \begin{bmatrix} x_1\\ y_1\\ z_1 \end{bmatrix}

 注意沿y轴正方向旋转时,\theta的方向

 \begin{bmatrix} x_3\\ y_3\\ z_3 \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0\\ 0 & cos\phi & sin\phi\\ 0& -sin\phi & cos\phi \end{bmatrix} \begin{bmatrix} x_2\\ y_2\\ z_2 \end{bmatrix}

 将上述三次旋转连起来有

\begin{bmatrix} x_3\\ y_3\\ z_3 \end{bmatrix} = \begin{bmatrix} 1 &0 &0 \\ 0& cos\phi &sin\phi \\ 0 &-sin\phi & cos\phi \end{bmatrix} \begin{bmatrix} cos\theta &0 &-sin\theta \\ 0 &1 &0 \\ sin\theta & 0 & cos\theta \end{bmatrix} \begin{bmatrix} cos\psi &sin\psi &0 \\ -sin\psi & cos\psi & 0\\ 0&0 &1 \end{bmatrix} \begin{bmatrix} x_0\\ y_0\\ z_0 \end{bmatrix}

 合并有

\begin{bmatrix} x_3\\ y_3\\ z_3 \end{bmatrix} = \begin{bmatrix} cos\theta &0 &-sin\theta \\ sin\phi sin\theta & cos\phi & sin\phi cos\theta\\ cos\phi sin\theta & -sin\phi & cos\phi cos\theta \end{bmatrix} \begin{bmatrix} cos\psi &sin\psi&0\\ -sin\psi &cos\psi&0\\ 0&0&1 \end{bmatrix} \begin{bmatrix} x_0\\ y_0\\ z_0 \end{bmatrix}

=\begin{bmatrix} cos\theta cos\psi & cos\theta sin\psi& -sin\theta\\ sin\phi sin\theta cos\psi -cos\phi sin\psi& sin\phi sin\theta sin\psi +cos\phi cos\psi& sin\phi cos\theta\\ cos\phi sin\theta cos\psi + sin\phi sin\psi& cos\phi sin\theta sin\psi - sin\phi cos\psi & cos\phi cos\theta \end{bmatrix} \begin{bmatrix} x_0\\ y_0\\ z_0 \end{bmatrix}

  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值