#15583·betaflight

Limit implausible downward barometer innovations in the vertical estimator

Author: coderabbitai[bot]Created Aug 18, 2026Updated Sep 18, 2026
LabelsInactive

Summary

The vertical position estimator accepts an unbounded downward barometer correction in src/main/flight/position_estimator.c.

A rapid pressure transient from prop wash or ground effect can then cause a large negative altitude innovation. The estimator can move its altitude and vertical-velocity states by an implausible amount. Downstream altitude control can respond with excessive thrust or unsafe landing behavior.

This is outside the file scope of pull request #15563.

Affected area

  • src/main/flight/position_estimator.c
  • The barometer measurement update path, including feedBaroMeasurements() and the vertical Kalman update.

Requested analysis and validation

Do not accept this report without independent validation.

The issue owner must:

  1. Trace the current barometer innovation and Kalman update calculations.
  2. Confirm the coordinate convention, units, estimator update interval, and acceleration source.
  3. Reproduce or simulate a physically implausible negative barometer transient.
  4. Determine a safe innovation bound from elapsed time, estimated vertical velocity, and a conservative vertical-acceleration limit.
  5. Check whether upward corrections need different treatment.
  6. Validate that the change does not block normal altitude convergence or introduce bias after real vertical motion.
  7. Add focused regression coverage. The test must show that a large downward barometer transient cannot cause an implausible altitude or vertical-velocity change.
  8. Validate the result with the relevant unit tests and, where available, replay, SITL, or controlled flight-log analysis.

Acceptance criteria

  • The estimator rejects or limits downward barometer movement that cannot be explained by physically reachable vertical travel.
  • The bound uses documented units and timing assumptions.
  • Normal barometer corrections remain effective.
  • Regression tests cover the unsafe downward transient and normal descent behavior.
  • The implementation and validation results document assumptions and limitations.

Context