Function navtk::navutils::quat_mult
Defined in File quaternions.hpp
Function Documentation
-
Vector4 navtk::navutils::quat_mult(const Vector4 &q, const Vector4 &p)
Multiplies 2 quaternions together by quaternion multiplication.
See Titterton and Weston, 2nd ed. eq 3.56.
For this function, if
pis the quaternion that describes the rotation from frame C to frame Bp= \(\textbf{q}_\text{C}^\text{B}\)and if
qis the quaternion that describes the rotation from frame B to frame Aq= \(\textbf{q}_\text{B}^\text{A}\)then this function will return the quaternion that describes the rotation from frame C to frame A
\(\textbf{q}_\text{C}^\text{A} = \textbf{q}_\text{B}^\text{A}\textbf{q}_\text{C}^\text{B}\)
See also
Coordinate Frames for more details about quaternions and how they are multiplied.
- Parameters
p – Quaternion that rotates a vector from frame C to frame B
q – Quaternion that rotates a vector from frame B to frame A
- Returns
Composite quaternion that rotates a vector from frame C to frame A