Recurring altitude problem/understanding logs

I’m working on getting my first drone set up with a pixracer and I’ve run into a recurring problem where the drone will suddenly go full throttle and start racing straight upward. Whenever this happens I quickly hit the kill switch and so far I’ve been able to regain control before it slams into the ground. I’ve been going through the logs and I’ve noticed two things:
1: This always appears to happen after a change in flight mode (though I know I didn’t intentionally change the mode)
2: it also shows that the z position estimate shows a steep decline. I guess this explains why it’s climbing, it thinks that it’s just trying to stay level. Can anyone suggest why this might be happening? Here is the log

As a side note: The log contains a dataset showing which mode the drone is in but the data is just numbers. How can I know which flight mode is referred to by each number. From looking at the log I can see that 15 corresponds to stabilized mode, but other than that I don’t know.

One last thing I notice is that the flight path from the position estimator is totally wrong. The drone never left the back yard.

I see two main issues in the log.
First part why it happens, you loose GPS signal, this is why mode changed and why log show trajectory far from your background. Lose of signal can by handled by PX4 IF …
Secont and bigger problem is vibrations on your frame are very high, you have to check and balance your propellers and motors, and if is not enough, create some vibration isolation for Pixracer. I dont remember what recomandation are for PX4 but for APM is -+3m/s2 in X and Y axis and from -5 to -15 m/s2 in Z axis.

Thanks! I’m assuming that you’re using the raw accelerometer data to get the vibration. Do you know what the units of the accelerometer data are. Is it m/s?

When I look to the graph, I see Z acceleration around -10 when copter is not flying, so it shut be in m/s^2 :slight_smile:

Ahh, that makes sense. Thanks.

I did some work to reduce the vibration. And the exact thing happened again.

It hovered around under my control for about 10 seconds. Then it suddenly went full throttle and slammed into something above it.

It’s worth noting that I was seeing this problem even before I had installed a GPS, so it can’t be just a GPS problem, right?

I would try unplugging the GPS and fly in stabilize and alt hold modes and see how it does. Eliminate one possible problem at a time.