IMU Fusion#
IMU fusion driver.
Modules#
Functions#
Set the accelerometer sample rate in the sl_imu_sensor_fusion_t structure.
Add the current accelerometer data to the accumulator.
Set the gyro sample rate and related values in the sl_imu_sensor_fusion_t structure.
Update the fusion calculation with a new gyro data.
Clear the gyro correction vector.
Calculate the gyro correction vector.
Initialize a new sl_imu_sensor_fusion_t structure.
Clear the values of the sensor fusion object.
Update the fusion calculation.
Function Documentation#
sl_imu_fuse_accelerometer_set_sample_rate#
void sl_imu_fuse_accelerometer_set_sample_rate (sl_imu_sensor_fusion_t * f, float rate)
Set the accelerometer sample rate in the sl_imu_sensor_fusion_t structure.
[inout] | f | Pointer to the sl_imu_sensor_fusion_t object |
[in] | rate | Sample rate of the accelerometer |
469
of file hardware/driver/imu/inc/sl_imu.h
sl_imu_fuse_accelerometer_update_filter#
void sl_imu_fuse_accelerometer_update_filter (sl_imu_sensor_fusion_t * f, float avec)
Add the current accelerometer data to the accumulator.
[inout] | f | Pointer to the sl_imu_sensor_fusion_t object |
[in] | avec | Accelerometer vector |
481
of file hardware/driver/imu/inc/sl_imu.h
sl_imu_fuse_gyro_set_sample_rate#
void sl_imu_fuse_gyro_set_sample_rate (sl_imu_sensor_fusion_t * f, float rate)
Set the gyro sample rate and related values in the sl_imu_sensor_fusion_t structure.
[inout] | f | Pointer to the sl_imu_sensor_fusion_t object |
[in] | rate | Sample rate of the gyroscope |
494
of file hardware/driver/imu/inc/sl_imu.h
sl_imu_fuse_gyro_update#
void sl_imu_fuse_gyro_update (sl_imu_sensor_fusion_t * f, float gvec)
Update the fusion calculation with a new gyro data.
[inout] | f | Pointer to the sl_imu_sensor_fusion_t object |
[in] | gvec | Gyroscope vector |
506
of file hardware/driver/imu/inc/sl_imu.h
sl_imu_fuse_gyro_clear_correction_vector#
void sl_imu_fuse_gyro_clear_correction_vector (sl_imu_sensor_fusion_t * f)
Clear the gyro correction vector.
[inout] | f | Pointer to the sl_imu_sensor_fusion_t object |
515
of file hardware/driver/imu/inc/sl_imu.h
sl_imu_fuse_gyro_calculate_correction_vector#
void sl_imu_fuse_gyro_calculate_correction_vector (sl_imu_sensor_fusion_t * f, bool accValid, bool dirValid, float dirZ)
Calculate the gyro correction vector.
[inout] | f | Pointer to the sl_imu_sensor_fusion_t object |
[in] | accValid | True if the acceleration value is within limits |
[in] | dirValid | True if the direction value is valid |
[in] | dirZ | The direction of the Z axis |
533
of file hardware/driver/imu/inc/sl_imu.h
sl_imu_fuse_new#
void sl_imu_fuse_new (sl_imu_sensor_fusion_t * f)
Initialize a new sl_imu_sensor_fusion_t structure.
[inout] | f | Pointer to the sl_imu_sensor_fusion_t object to be initialized |
542
of file hardware/driver/imu/inc/sl_imu.h
sl_imu_fuse_reset#
void sl_imu_fuse_reset (sl_imu_sensor_fusion_t * f)
Clear the values of the sensor fusion object.
[inout] | f | Pointer to the sl_imu_sensor_fusion_t object |
551
of file hardware/driver/imu/inc/sl_imu.h
sl_imu_fuse_update#
void sl_imu_fuse_update (sl_imu_sensor_fusion_t * f)
Update the fusion calculation.
[inout] | f | Pointer to the sl_imu_sensor_fusion_t object |
560
of file hardware/driver/imu/inc/sl_imu.h