typedef struct { CTL_ACCELEROMETER_t *accel; CTL_GYROSCOPE_t *gyro; CTL_MAGNETOMETER_t *mag; } CTL_IMU_t;
CTL_IMU_t is an abstract IMU comprising accelerometer, gyroscope, and magnetometer which can be combined for sensor fusion applications in other parts of the CrossWorks Target Library.
For instance, an accelerometer, gyroscope, and magnetometer can be fused by the AHRS library to provide a 9DOF orientation estimation. If the magnetometer member is null, the AHRS will provide a 6DOF orientation estimation without long-term yaw correction. The tilt-compensated compass library will fuse magnetometer and accelerometer to provide a good heading estimation irrespective of device orientation.