Multiple Flyaways in loiter and Auto

I’m having persistent problems with flyaways. I have my GPS mounted above my very small copter.
I’m able to loiter for a few minutes without problem before the small quad drifts and then makes a break for it.
I’m flying 3.4.6 on a 250 quad with the GPS antenna mounted above the system.
I’ll attach log files and photos.
Can anyone offer some ideas on why I can’t get reliable GPS guided flight?
The bin file is an auto flight that flew away on the way to the first waypoint. It crashed in a tree.
The log file show some issues with the previous flight but lost contact (another issue) before the crash.

2017-05-20 16-03-12.bin (524 KB)
2017-05-20 15-36-38.tlog (1.9 MB)

Are you sure you need Yaw270 for the primary compass orientation?

Absolutely. The GPS module has a -90 rotation on it.
It worked on auto (until the final RTL) on the previous flight. That causes me to think that the setup is good.

Somethings not right. A plot of the flight shows the GPS as one direction but the estimated position shows a different position. Is it possible the compass is twisted a little say 20 degrees from the flight controller.

Mike

Thanks for looking. No, both the pixhawk and the GPS are mounted in a way that makes twisting impossible.
However, the main power cables are 2 inches away. It may cause the magnetometer to have an error.
Don’t know if this is consistent with the behavior.

If that was a problem it would show up as high compass offsets. Your primary compass offsets are fine.