Drifting problem of DJI f450 + Pixhawk MINI

I am using DJI f450 ARF kit mounted with pixhawkMINI, and using the PX4 flight stack code. I calibrated the sensors pretty well (any idea how could I check how well the sensors are calibrated?) and checked that the weight is well balanced by hanging the drone with cables. When I fly the drone indoor in stabilized mode, it always drift in one direction. Is this because stabilized mode does not have GPS data so that it cannot stay in a fixed point?

But anyway I thought when the drone is drifting, the accelerometer should be able to sense this drifting and compensate for it, is this correct? If so, does this mean I am having some issue with the flight controller?

Slow drifting is normal in stabilized. In this mode the attitude is stabilized but no position measurements are used to correct for position drift.

Attitude estimation/control is not infinitely accurate and the flight controller is never perfectly level with the rotor plane. So it is possible that the flight controller thinks it’s perfectly level while it’s actually a degree or so off. This results in the drift you are seeing.

If you can let go of the sticks for a few seconds without the drone aggressively flying off I’s day it’s no cause for alarm.

Thank you. I agree. That being said, what if I having GPS data available and fly the drone in POSITION or HOLD mode, I think in that case, the drone should be able to better maintain a fixed position?

The other thing I found is, I took off the drone in stabilized mode, and then switch to altitude mode, then the drone would suddenly go up and it crashed something before it stopped. So I am not sure how high it would go to. Is this normal for altitude mode? What default height is the drone trying to hover at?

Correct, in position control the described drift will be counteracted.

In altitude mode your throttle stick is used to set altitude setpoints. With the throttle stick centered the current altitude will be kept. Lowering the sick will reduce the setpoint until you center the stick again.

Have you calibrated your RC correctly?
Try flying in manual and hovering at a given altitude for a while. Then check the logs (or the live plot in QGC>Analyze) of local_position.z to make sure your altitude estimate is good.