Function navtk::navutils::d_dcm_to_rpy(const Matrix3&, const Matrix3&, const Matrix3&, const Matrix3&)

Function Documentation

Matrix3 navtk::navutils::d_dcm_to_rpy(const Matrix3 &ab, const Matrix3 &dx, const Matrix3 &dy, const Matrix3 &dz)

Derivative of the dcm_to_rpy() function wrt 3 variables (usually RPY), where the DCM is composed of the product of 2 other DCMs.

The derivative does not exist at pitch = PI/2 (derived from the composite DCM) and this function is unreliable in that region; user beware.

Say there is a function such that:

\( f = \text{dcm_to_rpy}(C) \)

where

\( C = C_1C_2 \)

then

\( \dot{f(C)} = \dot{f}(C)\dot{C} = \dot{f}(C_1C_2)(\dot{C_1}C_2 + C_1\dot{C_2}) \)

Now, consider the case where either \( \dot{C_1} \) or \( \dot{C_2} \) is zero. In this case, calculations can be simplified significantly. This function allows for intermediary values, calculated more simply with the above assumptions, to be passed in. See below for how each parameter is defined.

  • Let dadx be the derivative of C_1 wrt variable 1 (x Euler angle).

  • Let dady be the derivative of C_1 wrt variable 2 (y Euler angle).

  • Let dadz be the derivative of C_1 wrt variable 3 (z Euler angle).

  • Let dbdx be the derivative of C_2 wrt variable 1 (x Euler angle).

  • Let dbdy be the derivative of C_2 wrt variable 2 (y Euler angle).

  • Let dbdz be the derivative of C_2 wrt variable 3 (z Euler angle).

Parameters
  • ab – Should be equal to dot(C_1, C_2).

  • dx – Should be equal to dot(dadx, C_2) + dot(C_1, dbdx).

  • dy – Should be equal to dot(dady, C_2) + dot(C_1, dbdy).

  • dz – Should be equal to dot(dadz, C_2) + dot(C_1, dbdz).

Returns

Derivative of RPY representation of C wrt some 3-variable input.