Yeah, it looks like you’re right. From what I can tell, Auto mode is using the unfiltered rangefinder reading instead of the filtered one for maintaining altitude while following terrain:
Every time your rangefinder spikes, the desired climb rate goes down, even though the EKF rangefinder value ignores the spike. You can see that this doesn’t happen in Loiter mode.
So I think there’s bad news and good news.
Bad news: This is a firmware-level feature/bug. We can’t change the behavior with parameters.
Good news: Looks like we can use parameters to force the flight controller to ignore the spikes.
This problem was still happening when you were flying at 20 meters, but the rangefinder was spiking to >50 meters instead of ~40 meters. >50 meters is above your configured max rangefinder range, so the spikes were ignored. So, if you want to try flying at 5 meters again, set
RNGFND_MAX_CM to something lower, like 2000. That way, any spikes above 20 meters are ignored, and the spikes were consistently 40+ meters, so I think it will work.
Here’s you flying at 20 meters, showing that there is no change in desired climb rate when the rangefinder spikes: