Hi @Jai.GAY,
Yes, this is strange and a quick analysis by Claude seems to indicate that it is a bug. I’ve added this to the 4.7 issues list although I suspect that PR 33568 from @andyp1per attempts to resolve the problem.
I’ll try and reproduce it in SITL as well, txs for the report!
Claude’s analysis
The optical-flow height limit is 0.7 × RNGFND1_MAX − 1m, which is 3.2m for your sensor. In your first climb the rangefinder shows you held at about 3.3m with the throttle at full, so that was the limit working as designed (your 6m estimate was actually about 3.3m).
On the second attempt you had switched to GPS (source 1) and then back to optical flow (source 2) in flight. The EKF only applies the limit when it is in “relative” aiding mode. When you switch from GPS to flow in flight, it stays in “absolute” mode and keeps using the flow sensor, so the limit is never applied. That’s why you could climb to about 4.5m. You would see the limit again after a reboot with source 2 selected. I think this is a hole in the safety check.
