IMU Fusion#

IMU fusion driver.

Modules#

sl_imu_sensor_fusion_t

Functions#

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.

void
sl_imu_fuse_accelerometer_update_filter(sl_imu_sensor_fusion_t *f, float avec[3])

Add the current accelerometer data to the accumulator.

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.

void
sl_imu_fuse_gyro_update(sl_imu_sensor_fusion_t *f, float gvec[3])

Update the fusion calculation with a new gyro data.

void
sl_imu_fuse_gyro_clear_correction_vector(sl_imu_sensor_fusion_t *f)

Clear the gyro 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.

void
sl_imu_fuse_new(sl_imu_sensor_fusion_t *f)

Initialize a new sl_imu_sensor_fusion_t structure.

void
sl_imu_fuse_reset(sl_imu_sensor_fusion_t *f)

Clear the values of the sensor fusion object.

void
sl_imu_fuse_update(sl_imu_sensor_fusion_t *f)

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.

Parameters
[inout]f

Pointer to the sl_imu_sensor_fusion_t object

[in]rate

Sample rate of the accelerometer


Definition at line 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.

Parameters
[inout]f

Pointer to the sl_imu_sensor_fusion_t object

[in]avec

Accelerometer vector


Definition at line 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.

Parameters
[inout]f

Pointer to the sl_imu_sensor_fusion_t object

[in]rate

Sample rate of the gyroscope


Definition at line 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.

Parameters
[inout]f

Pointer to the sl_imu_sensor_fusion_t object

[in]gvec

Gyroscope vector


Definition at line 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.

Parameters
[inout]f

Pointer to the sl_imu_sensor_fusion_t object


Definition at line 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.

Parameters
[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


Definition at line 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.

Parameters
[inout]f

Pointer to the sl_imu_sensor_fusion_t object to be initialized


Definition at line 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.

Parameters
[inout]f

Pointer to the sl_imu_sensor_fusion_t object


Definition at line 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.

Parameters
[inout]f

Pointer to the sl_imu_sensor_fusion_t object


Definition at line 560 of file hardware/driver/imu/inc/sl_imu.h