mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 03:33:33 +08:00
sensors: move gyro filtering to sensors/vehicle_angular_velocity
- gyro filtering (low-pass and notch) only performed on primary gyro in `sensors/vehicle_angular_velocity` instead of every gyro in `PX4Gyroscope` - sample rate is calculated from actual updates (the fixed value was slightly wrong in many cases, and very wrong in a few) - In the FIFO case the array is now averaged and published in `sensor_gyro` for filtering downstream. I'll update this in the future to use the full FIFO array (if available), but right now it should be fine.
This commit is contained in:
@@ -213,70 +213,6 @@ PARAM_DEFINE_FLOAT(SENS_BOARD_Z_OFF, 0.0f);
|
||||
*/
|
||||
PARAM_DEFINE_INT32(SENS_EN_THERMAL, -1);
|
||||
|
||||
/**
|
||||
* Driver level notch frequency for gyro
|
||||
*
|
||||
* The center frequency for the 2nd order notch filter on the gyro driver.
|
||||
* This filter can be enabled to avoid feedback amplification of structural resonances at a specific frequency.
|
||||
* This only affects the signal sent to the controllers, not the estimators. 0 disables the filter.
|
||||
* See "IMU_GYRO_NF_BW" to set the bandwidth of the filter.
|
||||
*
|
||||
* @min 0
|
||||
* @max 1000
|
||||
* @unit Hz
|
||||
* @reboot_required true
|
||||
* @group Sensors
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(IMU_GYRO_NF_FREQ, 0.0f);
|
||||
|
||||
/**
|
||||
* Driver level notch bandwidth for gyro
|
||||
*
|
||||
* The frequency width of the stop band for the 2nd order notch filter on the gyro driver.
|
||||
* See "IMU_GYRO_NF_FREQ" to activate the filter and to set the notch frequency.
|
||||
*
|
||||
* @min 0
|
||||
* @max 100
|
||||
* @unit Hz
|
||||
* @reboot_required true
|
||||
* @group Sensors
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(IMU_GYRO_NF_BW, 20.0f);
|
||||
|
||||
/**
|
||||
* Driver level cutoff frequency for gyro
|
||||
*
|
||||
* The cutoff frequency for the 2nd order butterworth filter on the gyro driver.
|
||||
* This only affects the signal sent to the controllers, not the estimators. 0 disables the filter.
|
||||
*
|
||||
* @min 0
|
||||
* @max 1000
|
||||
* @unit Hz
|
||||
* @reboot_required true
|
||||
* @group Sensors
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(IMU_GYRO_CUTOFF, 30.0f);
|
||||
|
||||
/**
|
||||
* Gyro control data maximum publication rate
|
||||
*
|
||||
* This is the maximum rate the gyro control data (sensor_gyro) will be allowed to publish at.
|
||||
* Set to 0 to disable and publish at the native sensor sample rate.
|
||||
*
|
||||
* @min 0
|
||||
* @max 2000
|
||||
* @value 0 0 (no limit)
|
||||
* @value 50 50 Hz
|
||||
* @value 250 250 Hz
|
||||
* @value 400 400 Hz
|
||||
* @value 1000 1000 Hz
|
||||
* @value 2000 2000 Hz
|
||||
* @unit Hz
|
||||
* @reboot_required true
|
||||
* @group Sensors
|
||||
*/
|
||||
PARAM_DEFINE_INT32(IMU_GYRO_RATEMAX, 0);
|
||||
|
||||
/**
|
||||
* Driver level cutoff frequency for accel
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user