Function navtk::navutils::axis_angle_to_dcm
Defined in File navigation.hpp
Function Documentation
-
Matrix3 navtk::navutils::axis_angle_to_dcm(const Vector3 &axis, double angle)
Converts an axis-angle rotation to the equivalent DCM.
If coordinate frame A is rotated by
angleaboutaxisto form coordinate frame B, then the DCM that is returned is the DCM that rotates a vector from frame B to frame A.For example, if an NED frame (frame A) is rotated by 30 degrees about the down axis to form a platform frame (frame B) (i.e., yaw = 30 degrees, pitch = 0, roll = 0), then
axis = [0, 0, 1],angle = 30 * PI / 180, and the DCM that is output will rotate an arbitrary vector \(\textbf{w}\) from frame B (platform frame) to frame A (NED):\( \textbf{w}^\text{NED} = \textbf{C}_\text{P}^\text{NED} \textbf{w}^\text{P} \)
See also
Coordinate Frames for more details on axis-angle and DCM expressions of attitude.
- Parameters
axis – The axis about which to rotate (unit vector)
angle – The amount of right-hand rotation about the axis (radians)
- Returns
The equivalent direction cosine matrix (DCM).