Direction Cosine Matrix

Description

Unit DCM matrix related routines.

Functions

void sl_imu_dcm_reset (float dcm[3][3])
Set the elements of the DCM matrix to the corresponding elements of the identity matrix.
void sl_imu_dcm_reset_z (float dcm[3][3])
DCM reset, Z direction.
void sl_imu_dcm_normalize (float dcm[3][3])
Normalize the DCM matrix.
void sl_imu_dcm_rotate (float dcm[3][3], float ang[3])
Rotate the DCM matrix by a given angle.
void sl_imu_dcm_get_angles (float dcm[3][3], float ang[3])
Calculate the Euler angles (roll, pitch, yaw) from the DCM matrix.

Function Documentation

sl_imu_dcm_reset()

void sl_imu_dcm_reset ( float dcm[3][3] )

Set the elements of the DCM matrix to the corresponding elements of the identity matrix.

Parameters
dcm DCM matrix

sl_imu_dcm_reset_z()

void sl_imu_dcm_reset_z ( float dcm[3][3] )

DCM reset, Z direction.

Parameters
dcm DCM matrix

sl_imu_dcm_normalize()

void sl_imu_dcm_normalize ( float dcm[3][3] )

Normalize the DCM matrix.

Parameters
dcm DCM matrix

sl_imu_dcm_rotate()

void sl_imu_dcm_rotate ( float dcm[3][3],
float ang[3]
)

Rotate the DCM matrix by a given angle.

Parameters
[in,out] dcm DCM matrix
[in] ang Rotation angle

sl_imu_dcm_get_angles()

void sl_imu_dcm_get_angles ( float dcm[3][3],
float ang[3]
)

Calculate the Euler angles (roll, pitch, yaw) from the DCM matrix.

Parameters
[in] dcm DCM matrix
[out] ang An array containing the Euler angles