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
dcmDCM matrix

◆ sl_imu_dcm_reset_z()

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

DCM reset, Z direction.

Parameters
dcmDCM matrix

◆ sl_imu_dcm_normalize()

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

Normalize the DCM matrix.

Parameters
dcmDCM 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]dcmDCM matrix
[in]angRotation 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]dcmDCM matrix
[out]angAn array containing the Euler angles