Low-pass filtered sensors not propagated in sensor_combined?


Why are the low-pass filtered members of sensor_accel and sensor_gyro not propagated to sensor_combined?

It seems to me that the IMU_ACCEL_CUTOFF and IMU_GYRO_CUTOFF have no effect because the integral_x,y,z members are propagated into sensor_combined instead of the filtered x,y,z members.


1 Like

I am actually looking into this and, from what I see in the comments, it seems that the integral values are preferred:

if (accel_report.integral_dt != 0) {
* Using data that has been integrated in the driver before downsampling is preferred
* becasue it reduces aliasing errors. Correct the raw sensor data for scale factor errors
* and offsets due to temperature variation. It is assumed that any filtering of input
* data required is performed in the sensor driver, preferably before downsampling.
} else {
// using the value instead of the integral (the integral is the prefered choice)
// Correct each sensor for temperature effects
// Filtering and/or downsampling of temperature should be performed in the driver layer

Filtering might have happened anyway in the driver layer tho?

  • sensor_combined is not filtered (only an IMU on-chip DLPF, if enabled), and used for estimation (ekf)
  • sensor_gyro is the filtered gyro topic (IMU_GYRO_CUTOFF and a notch, IMU_GYRO_NF_FREQ) used by the rate controller