Sudden jump in altitude mode

Hi @zhefanxu
Sorry to hear about the crash. The issue is the same as in Abnormal mission following - #2 by bresch, so simply set the default hover thrust value (MPC_THR_HOVER) to 0.2 or 20% and you won’t have that issue anymore.You can also reduce a bit the minimum thrust as I mentioned in the linked issue above.

On the plots below, you can see that the thrust jumps when the hover thrust estimate gets valid. This is normally because the integrator that should absorb the step is saturated. However, since you’re not the first one having this issue, I will add some extra logic to apply the hover thrust estimate slowly to avoid this issue.

Good luck!

@mwbb Thrust jumps are often due to the accel clipping as you said, but the reason why this happens is that the velocity estimate starts to freefall (due to clipping) and the controller tries to counteract. In the current issue, the velocity estimate is fine (vz goes negative (UP) after the thrust spike), so the accel isn’t clipping.