log#

DCM.log#

Logarithm of DCM.

The logarithmic map is defined as the inverse of the exponential map. It corresponds to the logarithm given by the Rodrigues rotation formula:

\[\log(\mathbf{R}) = \frac{\theta(\mathbf{R}-\mathbf{R}^T)}{2\sin\theta}\]

with \(\theta=\arccos\Big(\frac{\mathrm{tr}(\mathbf{R}-1)}{2}\Big)\).

Returns:

log – Logarithm of DCM

Return type:

numpy.ndarray

Examples

>>> R = DCM(rpy=[10.0, -20.0, 30.0])
>>> R.view()
DCM([[ 0.92541658, -0.31879578, -0.20487413],
     [ 0.16317591,  0.82317294, -0.54383814],
     [ 0.34202014,  0.46984631,  0.81379768]])
>>> R.log
array([[ 0.        , -0.26026043, -0.29531805],
       [ 0.26026043,  0.        , -0.5473806 ],
       [ 0.29531805,  0.5473806 ,  0.        ]])