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

Function Documentation

template<typename S = Vector, IfTensorOfDim<S, 1>* = nullptr>
Vector4 navtk::navutils::rpy_to_quat(const S &rpy)

Converts from Euler angles to a quaternion.

This function calculates a quat that rotates a vector from frame B to frame A ( \(\textbf{q}_\text{B}^\text{A}\)), when provided the yaw, pitch, and roll that correspond to a 3-2-1 frame rotation from frame A to frame B as described in rpy_to_dcm.

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

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

Parameters

rpy – Euler angles [roll pitch yaw] (radians) that describe a frame rotation from frame A to frame B

Returns

Quaternion ( \(\textbf{q}_\text{B}^\text{A}\))