Template Function navtk::navutils::dcm_to_quat(const S&)

Function Documentation

template<typename S = Initializer<2, Scalar>, IfTensorOfDim<S, 2>* = nullptr>
Vector4 navtk::navutils::dcm_to_quat(const S &dcm)

Converts a DCM into the equivalent quaternion.

If dcm is a direction cosine matrix which rotates a vector from frame B to frame A ( \(\textbf{C}_\text{B}^\text{A}\)), then this function calculates the equivalent quaternion \(\textbf{q}_\text{B}^\text{A}\).

References: “Strapdown Inertial Technology”, Titterton & Weston; Strapdown Analytics, Vol 1 eq. 3.2.4.3-9.

See also

dcm_to_rpy()

Template Parameters
  • S – Type of input, initializer list by default.

  • std::enable_if_t<> – Constrains S to be 2 dimensional.

Parameters

dcm – Direction cosine matrix. Can accept initializer lists.

Returns

The equivalent quaternion.