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:
Daniel Agar
2020-01-27 10:05:33 -05:00
committed by GitHub
parent 0d2e5f1c50
commit 24f0c2d72a
22 changed files with 355 additions and 258 deletions

View File

@@ -50,13 +50,13 @@ namespace wq_configurations
{
static constexpr wq_config_t rate_ctrl{"wq:rate_ctrl", 1600, 0}; // PX4 inner loop highest priority
static constexpr wq_config_t SPI0{"wq:SPI0", 1600, -1};
static constexpr wq_config_t SPI1{"wq:SPI1", 1600, -2};
static constexpr wq_config_t SPI2{"wq:SPI2", 1616, -3};
static constexpr wq_config_t SPI3{"wq:SPI3", 1600, -4};
static constexpr wq_config_t SPI4{"wq:SPI4", 1600, -5};
static constexpr wq_config_t SPI5{"wq:SPI5", 1600, -6};
static constexpr wq_config_t SPI6{"wq:SPI6", 1600, -7};
static constexpr wq_config_t SPI0{"wq:SPI0", 1900, -1};
static constexpr wq_config_t SPI1{"wq:SPI1", 1900, -2};
static constexpr wq_config_t SPI2{"wq:SPI2", 1900, -3};
static constexpr wq_config_t SPI3{"wq:SPI3", 1900, -4};
static constexpr wq_config_t SPI4{"wq:SPI4", 1900, -5};
static constexpr wq_config_t SPI5{"wq:SPI5", 1900, -6};
static constexpr wq_config_t SPI6{"wq:SPI6", 1900, -7};
static constexpr wq_config_t I2C0{"wq:I2C0", 1400, -8};
static constexpr wq_config_t I2C1{"wq:I2C1", 1400, -9};