Ctun.alt is not stable

I am testing a quadcopter drone and during flight, I found that the altitude is unstable, the altitude jump is very large, and the altitude measured by the ctun.alt does not match the altitude measured by the barometer. Can someone help me see what the problem is?

here is the log
log2023-08-24 14-02-52.zip (599.7 KB)

Other than inexplicably dropping the Rate Pitch/Roll P&I values it appears to be on default parameters w/o even the Initial Tune Parameters set. And you are on old firmware. You also have a large mechanical Yaw bias (twisted motor mounts or arms perhaps). I would suggest:
Reset PID’s to default.
Update to latest Stable firmware.
Fix the mechanical yaw bias
Configure the Initial Tune Parameters from Mission Planners Mandatory Hardware screen.
Set these parameters:
INS_ACCEL_FILTER,10
INS_LOG_BAT_MASK,1
INS_LOG_BAT_OPT,4
PSC_ACCZ_I,0.4
PSC_ACCZ_P,0.2

Make a hover flight and check the motor outputs for oscillation. If present drop the Rate PID’s in half and try again. Then configure the Notch Filter.
Auto Tune.
If after getting to this point you have instability post a question.

thanks for help.in your way ,my problem is solved.

@dkemxr The problem is still not solved.I recently did another flight test.The difference between the calculated ctun.alt and the actual altitude of the flight is very large, and the calculated altitude will even become negative, but through observation, it is found that the real altitude is similar to the height reflected by ctun.balt, and the GPS altitude is similar.


I thought it was a shock that caused the problem, but after adding shock absorption, the problem still exists, can you help me see what is willing to cause it? here is the log.