Drone Continue to rise and fall during flight.?

When the gas takes off, it goes up and down about 1 to 3 meters. The calibration and compass are turned normally, and it looks like there’s no problem, why can’t I hover properly? Which one should I check for movement up and down?

need to see a .bin log file to tell anything meaningful

I have a question. I wonder if there is any software used to analyze the log file. If you have any programs, I would appreciate it if you let me know. I will check the log file on Monday and upload it.

Check through the Ardupilot documentation, everything is covered there

You may have a look at the Ardupilot wiki for how to review the logs
https://ardupilot.org/copter/docs/common-downloading-and-analyzing-data-logs-in-mission-planner.html
https://ardupilot.org/copter/docs/common-diagnosing-problems-using-logs.html