Hi. I have Pixhawk4 from Holybro and made quadcopter.
It seems serious problem in Accelerometer.
I did a Accelerometer calibration and can pass Prearm check.
Can fly with this but if I change mode like Althold or Loiter, my quad start to move up and down.
Flight log around Altitude and Acc are like this photo.
You are flying on default parameters. Read this: Initial Tuning
And use Mission Planners Alt>A tuning Plug-in before flying again.
There is a problem with the barometer.
I disagree, I fly on default prams for the 9" to 10" size props for 7" props jus turn down the PID’s using basic tuning as seen below. Loiter should work just fine in stock tuning in Fact stabilize and loiter should have the same exact feel once you adjust the PIDs. At times the barometer just need to be flown for a battery or two.
I just looked at the vibrations in the log and don’t see a lot of difference between the two mode so give Dave’s idea a shot. BTW sometimes if your lucky you just need to fly the bird and let the barometer settle down.