Quadcopter keeps crashing in position mode

Hello everyone.
I’m building a quadcopter and using a Pixhawk 2.8.4
I’ve been struggling to control it, i can flight it normally in manual mode, but whenever I switch to position mode it instantly crashes. last time I switched to position mode it literally made a 180 rotation and went head-first into the ground (logs for this crash is attached).
I’ve been trying to understand the issue through the logs but I can’t seem to figure it out. on the first glance however, the gps readings we very uncertain when i switched
log file: https://logs.px4.io/plot_app?log=58423922-b787-4795-b45f-fd3a6060e06b
Thank you.


Hi there,
you have really bad vibration, which can be because of pid. But firstly check if sth may cause too much vibration. if you are using 2.4.8 pixhawk, use dampers.

But I think the real issue about the pid, even in manual mode, if you check the motor outputs they are crazy, when you switch to position, since much more control is tried to be done, you see the effect of bad pid more clearly.

I see that you have chosen generic quadcopter as your frame, firstly try to choose a specific airframe model more close to your frame. then bu sure that your drone flies somewhat better, then you can go for autotune I think . In the end your motor outputs shouldn’t oscillate much, it should be a thin line, you can check how it should be from log review page (check the actuator outputs):

also check the raw acceleration, yours is really bad, but most probably this is also caused by pids

Best luck

Thank you very much for your reply. will try again

How did you get the log data’s. Can you help me with this?

If you mean the autopilot log, default it is recorded for most hardware. Then connect your autopilot to your pc via usb cable. open qgroundcontrol, click the icon on the top left, analyze tools, click refresh on right top, then download the log.
If you want to review it, open https://review.px4.io/ then upload.

hoping you asked this :slight_smile: but this knowledge is really fundamental, you can find this over basic search.
try the forum if you search but cannot find a solution
best luck