Function navtk::navutils::quat_mult

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 p is the quaternion that describes the rotation from frame C to frame B

p = \(\textbf{q}_\text{C}^\text{B}\)

and if q is the quaternion that describes the rotation from frame B to frame A

q = \(\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}\)

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