(window.webpackJsonp=window.webpackJsonp||[]).push([[439],{759:function(t,_,a){"use strict";a.r(_);var o=a(10),s=Object(o.a)({},(function(){var t=this,_=t._self._c;return _("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[_("h1",{attrs:{id:"姿态与旋转表示"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#姿态与旋转表示"}},[t._v("#")]),t._v(" 姿态与旋转表示")]),t._v(" "),_("h2",{attrs:{id:"正旋转方向"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#正旋转方向"}},[t._v("#")]),t._v(" 正旋转方向")]),t._v(" "),_("p",[t._v("按右手定则,绕某一轴的正旋转方向为:拇指指向该轴正方向时,其余四指弯曲所示的旋转方向。")]),t._v(" "),_("fdi-img",{attrs:{width:"52.5%",alt:"MEMS",src:"/knowledge-base/04/040301.png"}}),t._v(" "),_("h2",{attrs:{id:"欧拉角"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#欧拉角"}},[t._v("#")]),t._v(" 欧拉角")]),t._v(" "),_("p",[t._v("欧拉角是空间姿态的常用表示形式,本质上是相对于局部大地坐标系的一组旋转组合。该姿态由绕局部坐标系 "),_("strong",[t._v("X")]),t._v("、"),_("strong",[t._v("Y")]),t._v("、"),_("strong",[t._v("Z")]),t._v(" 轴的三次旋转序列定义。")]),t._v(" "),_("p",[t._v("欧拉角被广泛使用,因其直观易懂。三个参数——横滚、俯仰与偏航——分别定义绕固定坐标系各轴的旋转:")]),t._v(" "),_("ul",[_("li",[t._v("横滚(φ):绕 "),_("strong",[t._v("X")]),t._v(" 轴旋转,取值范围 [-π ; π];")]),t._v(" "),_("li",[t._v("俯仰(θ):绕 "),_("strong",[t._v("Y")]),t._v(" 轴旋转,取值范围 [-π/2 ; π/2];")]),t._v(" "),_("li",[t._v("偏航(ψ):绕 "),_("strong",[t._v("Z")]),t._v(" 轴旋转,取值范围 [-π ; π]。")])]),t._v(" "),_("cite-panel",{attrs:{title:"万向节锁效应"}},[_("p",[t._v("欧拉角存在称为“万向节锁”的奇异点:当俯仰接近 ±π/2 时会出现。若设备需在大姿态范围内使用,不建议采用欧拉角。四元数与旋转矩阵均不存在此类奇异点。")])]),t._v(" "),_("h2",{attrs:{id:"四元数"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#四元数"}},[t._v("#")]),t._v(" 四元数")]),t._v(" "),_("p",[t._v("四元数是复数的推广,定义如下:\n"),_("fdi-math",{attrs:{content:"Q=q_0+i\\cdot q_1+j\\cdot q_2+k\\cdot q_3"}})],1),t._v(" "),_("p",[t._v("其中 "),_("em",[t._v("i")]),t._v("、"),_("em",[t._v("j")]),t._v("、"),_("em",[t._v("k")]),t._v(" 为虚数单位。还可定义 "),_("strong",[t._v("Q")]),t._v(" 的复共轭:\n"),_("fdi-math",{attrs:{content:"\\overline Q=q_0-i\\cdot q_1-j\\cdot q_2-k\\cdot q_3"}})],1),t._v(" "),_("p",[t._v("以及 "),_("strong",[t._v("Q")]),t._v(" 的模:\n"),_("fdi-math",{attrs:{content:"\\|Q\\|=\\sqrt\\{Q\\cdot\\overline\\{Q\\}\\}"}})],1),t._v(" "),_("fdi-math",{attrs:{content:"\\|Q\\|=\\sqrt\\{Q\\cdot\\overline\\{Q\\}\\}"}}),t._v(" "),_("p",[t._v("满足 |Q| = 1 的单位四元数可完整表示三维姿态,且不存在奇异点。")]),t._v(" "),_("p",[t._v("四元数运算所需计算量较小,因此非常适合用于姿态表示。")]),t._v(" "),_("p",[_("strong",[t._v("Q")]),t._v(" 的逆旋转由其复共轭给出。")]),t._v(" "),_("h2",{attrs:{id:"旋转矩阵"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#旋转矩阵"}},[t._v("#")]),t._v(" 旋转矩阵")]),t._v(" "),_("p",[t._v("方向余弦矩阵(DCM,Direction Cosine Matrix)是将一个坐标参考系变换到另一个坐标参考系的旋转矩阵。旋转矩阵可完整表示三维姿态,该模型中不存在奇异点。")]),t._v(" "),_("p",[t._v("DCM 由定义坐标系的三个单位向量构成。此处 DCM 将本体坐标系变换到局部 NED 坐标系。DCM 由分别绕局部大地测量(NED)"),_("strong",[t._v("X")]),t._v("、"),_("strong",[t._v("Y")]),t._v("、"),_("strong",[t._v("Z")]),t._v(" 轴的三个旋转矩阵 RM(φ)、RM(θ)、RM(ψ)组合而成:")]),t._v(" "),_("fdi-math",{attrs:{content:"DCM=RM_\\psi\\cdot RM_\\theta\\cdot RM_\\varphi"}}),t._v(" "),_("br"),t._v(" "),_("fdi-math",{attrs:{content:"DCM=\\begin\\{pmatrix\\}\\cos\\psi&-\\sin\\psi&0\\\\\\sin\\psi&\\cos\\psi&0\\\\0&0&1\\end\\{pmatrix\\}\\cdot\\begin\\{pmatrix\\}\\cos\\theta&0&\\sin\\theta\\\\0&1&0\\\\-\\sin\\theta&1&\\cos\\theta\\end\\{pmatrix\\}\\cdot\\begin\\{pmatrix\\}1&0&0\\\\0&\\cos\\varphi&-\\sin\\varphi\\\\0&\\sin\\varphi&\\cos\\varphi\\end\\{pmatrix\\}"}}),t._v(" "),_("br"),t._v(" "),_("fdi-math",{attrs:{content:"DCM=\\begin\\{pmatrix\\}\\cos\\theta\\cdot\\cos\\psi&\\sin\\varphi\\cdot\\sin\\theta\\cdot\\cos\\psi-\\cos\\varphi\\cdot\\sin\\psi&\\cos\\varphi\\cdot\\sin\\theta\\cdot\\cos\\psi+\\sin\\varphi\\cdot\\sin\\psi\\\\\\cos\\theta\\cdot\\sin\\psi&\\sin\\varphi\\cdot\\sin\\theta\\cdot\\sin\\psi+\\cos\\varphi\\cdot\\cos\\psi&\\cos\\varphi\\cdot\\sin\\theta\\cdot\\sin\\psi-\\sin\\varphi\\cdot\\cos\\psi\\\\-\\sin\\theta&\\sin\\varphi\\cdot\\cos\\theta&\\cos\\varphi\\cdot\\cos\\theta\\end\\{pmatrix\\}"}}),t._v(" "),_("p",[t._v("对于任意旋转矩阵,逆旋转等于其转置:\n"),_("fdi-math",{attrs:{content:"DCM^\\{-1\\}=DCM^T"}})],1),t._v(" "),_("p",[t._v("要将本体坐标系中的矢量变换到 NED 坐标系,可使用 DCM,如下所示:\n"),_("fdi-math",{attrs:{content:"V_\\{NED\\}=DCM\\cdot V_\\{body\\}"}})],1),t._v(" "),_("p",[t._v("反之:\n"),_("fdi-math",{attrs:{content:"V_\\{body\\}=DCM^\\{T\\}\\cdot V_\\{NED\\}"}})],1),t._v(" "),_("h2",{attrs:{id:"其他常用转换公式"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#其他常用转换公式"}},[t._v("#")]),t._v(" 其他常用转换公式")]),t._v(" "),_("p",[t._v("下列转换公式对许多用户可能有用:")]),t._v(" "),_("h3",{attrs:{id:"dcm-到四元数"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#dcm-到四元数"}},[t._v("#")]),t._v(" DCM 到四元数")]),t._v(" "),_("p",[t._v("由四元数参数计算 DCM:")]),t._v(" "),_("fdi-math",{attrs:{content:"DCM=\\begin\\{pmatrix\\}2\\cdot q_0^2+2\\cdot q_1^2-1&2\\cdot q_1\\cdot q_2-2\\cdot q_0\\cdot q_3&2\\cdot q_0\\cdot q_2+2\\cdot q_1\\cdot q_3\\\\2\\cdot q_1\\cdot q_2+2\\cdot q_0\\cdot q_3&2\\cdot q_0^2+2\\cdot q_2^2-1&2\\cdot q_2\\cdot q_3-2\\cdot q_0\\cdot q_1\\\\2\\cdot q_1\\cdot q_3-2\\cdot q_0\\cdot q_2&2\\cdot q_2\\cdot q_3+2\\cdot q_0\\cdot q_1&2\\cdot q_0^2+2\\cdot q_3^2-1\\end\\{pmatrix\\}"}}),t._v(" "),_("h3",{attrs:{id:"欧拉角到四元数"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#欧拉角到四元数"}},[t._v("#")]),t._v(" 欧拉角到四元数")]),t._v(" "),_("p",[t._v("由四元数转换为欧拉角:")]),t._v(" "),_("fdi-math",{attrs:{content:"\\begin\\{gathered\\} \\varphi=\\tan^\\{-1\\}\\left(\\{\\frac\\{2\\cdot q_\\{2\\}\\cdot q_\\{3\\}+2\\cdot q_\\{0\\}\\cdot q_\\{1\\}\\}\\{2\\cdot q_\\{0\\}^\\{2\\}+2\\cdot q_\\{3\\}^\\{2\\}-1\\}\\}\\right) \\\\ \\theta=-\\sin^\\{-1\\}\\left(2\\cdot q_1\\cdot q_3-2\\cdot q_0\\cdot q_2\\right) \\\\ \\psi=\\tan^\\{-1\\}\\left(\\{\\frac\\{2\\cdot q_\\{1\\}\\cdot q_\\{2\\}+2\\cdot q_\\{0\\}\\cdot q_\\{3\\}\\}\\{2\\cdot q_\\{0\\}^\\{2\\}+2\\cdot q_\\{1\\}^\\{2\\}-1\\}\\}\\right) \\end\\{gathered\\}"}}),t._v(" "),_("h3",{attrs:{id:"dcm-到欧拉角"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#dcm-到欧拉角"}},[t._v("#")]),t._v(" DCM 到欧拉角")]),t._v(" "),_("p",[t._v("将 DCM 转换为欧拉角:")]),t._v(" "),_("fdi-math",{attrs:{content:"\\begin\\{gathered\\} \\varphi=\\tan^\\{-1\\}\\left(\\{\\frac\\{DCM_\\{32\\}\\}\\{DCM_\\{33\\}\\}\\}\\right) \\\\ \\theta=-\\sin^\\{-1\\}(DCM_\\{31\\}) \\\\ \\psi=\\tan^\\{-1\\}\\left(\\{\\frac\\{DCM_\\{21\\}\\}\\{DCM_\\{11\\}\\}\\}\\right) \\end\\{gathered\\}"}})],1)}),[],!1,null,null,null);_.default=s.exports}}]);