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:
- Trace the current barometer innovation and Kalman update calculations.
- Confirm the coordinate convention, units, estimator update interval, and acceleration source.
- Reproduce or simulate a physically implausible negative barometer transient.
- Determine a safe innovation bound from elapsed time, estimated vertical velocity, and a conservative vertical-acceleration limit.
- Check whether upward corrections need different treatment.
- Validate that the change does not block normal altitude convergence or introduce bias after real vertical motion.
- Add focused regression coverage. The test must show that a large downward barometer transient cannot cause an implausible altitude or vertical-velocity change.
- 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
- Pull request: https://github.com/betaflight/betaflight/pull/15563
- Review finding: https://github.com/betaflight/betaflight/pull/15563#issuecomment-5332841246
- Requested by: @nerdCopter
Source: betaflight/betaflight