Post · 1 min read· p. 84

DCM.from_axisangle

DCM.from_axisangle(axis: ndarray, angle: float) → ndarray : DCM from axis-angle representation

code
Use Rodrigue’s formula to obtain the DCM from the axis-angle
representation.

R=I3−(sin⁡θ)K+(1−cos⁡θ)K2\mathbf{R} = \mathbf{I}_3 - (\sin\theta)\mathbf{K} + (1-\cos\theta)\mathbf{K}^2
where R\mathbf{R} is the DCM, which rotates through an **angle** θ\theta counterclockwise about the **axis** k\mathbf{k}, I3\mathbf{I}_3 is the 3×33\times 3 identity matrix, and K\mathbf{K} is the [skew-symmetric](https://en.wikipedia.org/wiki/Skew-symmetric_matrix) matrix of k\mathbf{k}. Parameters: : - **axis** (*numpy.ndarray*) – Axis of rotation. - **angle** (*float*) – Angle of rotation, in radians. Returns: : **R** – 3-by-3 direction cosine matrix Return type: : numpy.ndarray Examples ```default

R = DCM() R.view() DCM([[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]])

R.from_axisangle([0.81187135, -0.43801381, 0.38601658], 0.6742208510527136) array([[ 0.92541658, -0.31879578, -0.20487413], [ 0.16317591, 0.82317294, -0.54383814], [ 0.34202014, 0.46984631, 0.81379768]]) ```