refactor(sensors): move baro/mag rate limiting from publishers to EKF2

Remove SENS_BARO_RATE and SENS_MAG_RATE parameters from the sensor
publisher modules (VehicleAirData, VehicleMagnetometer). Sensors now
publish at full sensor rate.

Add EKF2_BARO_RATE and EKF2_MAG_RATE parameters in the EKF2 module
to gate fusion rate on the consumer side. This fixes a rate-aliasing
bug where the publish-side rate limiter created irregular sample
intervals when the sensor rate was close to the configured limit
(e.g. 23Hz baro with 20Hz SENS_BARO_RATE). It also provides full-rate
data to the logger and other consumers.

Parameter migration translates SENS_BARO_RATE -> EKF2_BARO_RATE and
SENS_MAG_RATE -> EKF2_MAG_RATE on import.
This commit is contained in:
Jacob Dahl
2026-03-31 18:07:55 -08:00
parent 5568c66959
commit dc4cf031f9
12 changed files with 148 additions and 121 deletions
-2
View File
@@ -110,8 +110,6 @@ then
mag_bias_estimator start
fi
param set-default SENS_MAG_RATE 100
sensors start
uavcannode start