ekf2: make filter update period configurable

- introduces new parameter EKF2_PREDICT_US to configure the filter
update period in microseconds
 - actual filter update period will be an integer multiple of IMU
This commit is contained in:
Daniel Agar
2022-01-26 10:57:09 -05:00
parent 3f25349eb9
commit ae3070bbf1
20 changed files with 856 additions and 821 deletions
@@ -145,9 +145,9 @@ bool VehicleIMU::ParametersUpdate(bool force)
}
}
// constrain IMU integration time 1-10 milliseconds (100-1000 Hz)
// constrain IMU integration time 1-20 milliseconds (50-1000 Hz)
int32_t imu_integration_rate_hz = constrain(_param_imu_integ_rate.get(),
(int32_t)100, math::max(_param_imu_gyro_ratemax.get(), (int32_t) 1000));
(int32_t)50, math::max(_param_imu_gyro_ratemax.get(), (int32_t) 1000));
if (imu_integration_rate_hz != _param_imu_integ_rate.get()) {
PX4_WARN("IMU_INTEG_RATE updated %" PRId32 " -> %" PRIu32, _param_imu_integ_rate.get(), imu_integration_rate_hz);