RTL flyaway, Bad POS (among others)

I tried flying my Drone for the first time the other day. I haven’t tuned anything yet, and a couple things still need to be ironed out (the yaw is inverted, and it flies backwards). Towards the end of my flight I activated RTL mode. Whereupon the drone shot off in a seemingly random direction. I somehow managed to crash the drone into the field before it took a trip overseas.
After attempting to analyze the log data from the flight, it was immediately obvious that something was off about the POS data recorded by the drone immediately after RTL was activated. I should note that I activated the RTL sequence through mission planner, not through my controller. The GPS position seems to be correct, and the POS reading for LAT and LNG are the pretty much the same right up until RTL. I did an auto analysis and immediately got lots of errors. Some of them make sense, however, as I noticed a break in the bottom of one of the propellers after landing. The drone is also partially made of Lego so that may be a contributing factor. As I said, I have done literally no tuning (who knew lego could fly) so in the future some increase in performance should be expected. However, I am worried that the wildly inaccurate POS reading is an issue with my flight controller (I flew nowhere near the house beside the field). There is no appreciable difference between the path that the GPS recorded and the path I remember flying. Logs are attached: RTLLog.BIN (988 KB)

There is a mechanical issue with the build.

Have a look at the RRCout, especially for M1 and M2.


There is a big disparity between CCW and CW.

As soon as you apply power the Actual v Desired deviates greatly especially for yaw.


So this would cause the deviation from flight you encountered.

Note: For a first flight using RTL or any other guided mode is most inadvisable.

Edit: Mike Boland beat me to it

There’s a large weight imbalance, heavy towards the rear. This is causing motors 1 and 3 to be doing almost nothing, while motors 2 and 4 work close to their maximum. This leaves no headroom for attitude control.

image

Attitude wasnt great to begin with, but it gets worse as the flight goes on, the motor outputs go all over the place

image

Z axis vibration looks a bit bad, and is usually the number 1 cause of incidents like this. There’s also a GPS Glitch which wont help.
https://ardupilot.org/copter/docs/gps-failsafe-glitch-protection.html

Check for loose items, prop balance, wiring transfering vibrations to the FC…
Let us know more about the craft, particularly prop size and battery - voltage monitoring seems to be strange to me.

I suggest set the Geofence, which means you wont be able to arm and take off until there’s a good enough position fix to be able to RTL.
FENCE_ACTION,3
FENCE_ALT_MAX,100
FENCE_ENABLE,1
FENCE_MARGIN,2
FENCE_RADIUS,300
FENCE_TYPE,3

It’s a Hex. As Mike noted you have a huge Yaw bias. Let me guess, the frame has round arms… This needs to be fixed before doing anything else. CW in Red, CCW in Blue for effect.

Agreed, I assumed quad and forgot to look for the other RC outs, or the true frame type.

Thank you for your replies. The problems you identified were all correct thank you and I am glad that it was the framework that caused the problems and not any faults in the electronics. Thanks again, I’ll see about buying a frame next time.