mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-09-25 20:28:26 +08:00
* fix(drivers/imu): clip FIFO samples against the declared range, not the int16 rail updateFIFO() counted a sample as clipped only within 1 LSB of INT16_MIN or INT16_MAX, while update() compares against _clip_limit (range/scale). The two agree only for sensors whose sensitivity is exactly range/32768. ST parts leave headroom in the word: the LSM6DSV80X high-g channel at +/-80 g and 3.904 mg/LSB saturates at 20492 counts, its gyro at +/-4000 dps and 140 mdps/LSB at 28571, the LSM9DS1 and ADIS16607 are similar, and the BMI055's 12-bit accel word never reaches the rail at all. None of them could report a clip on the FIFO path, so the EKF's delta-velocity clipping handling never engaged on those sensors. Compare against _clip_limit on the FIFO path as well. For rail-scaled sensors the threshold moves from 32766 to 32735 counts (the existing 0.999 margin), which is what the non-FIFO path already used. * docs(msg): SensorGyroFifo/SensorAccelFifo counts are raw, not SI x/y/z are int16 counts; SI is count * scale. The comments called them rad/s and m/s^2, which is what sensor_gyro/sensor_accel carry. Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com> --------- Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
609 B
609 B