Unwanted yaw drift, want to understand Desyaw

Hello Ardufolks… I’ve recently completed my first 450 size APM quad build and finished a couple of hover tests in Stabilize and for the most part it is great. The only issue from the test so far is a slight yaw drift which seems to be uncommanded, from looking at the logs.

One thing that was bothering me is that while roll and pitch stabilization seems to be good, the controller doesn’t seem to care about slow yaws (maybe caused by wind) and doesn’t correct it, infact when Yaw drifts, DesYaw seems to be catching up to it! I expect it to be other way round?

I’m new to debugging logs, but the auto analysis shows “Large compass offset params”. My external GPS+compass module is on a 15cm mast. I did try different kinds of compass live calibration methods, but all seem to be giving the same big offset -
Large compass offset in MAG data (X:66.00, Y:-355.00, Z:-22.00) mag_field interference within limits (24.15%).

Is there anything from a hardware perspective I can do to reduce the offsets?

Log- 2017-01-29 19-19-10.bin

Pic of my setup-

The log shows that mag heading started drifting without RC input, and then yaw (DesYaw) started catching up to it…
How can we confirm whether the copter actually rotated vs. compass drifting and why wouldn’t FC compensate for yaw change?

I decided to try several things on my own, since I didn’t have any ideas from this forum or others-

Tried placing the GPS/compass module in different places, including right at the top of the center PCB/frame part. The compass offsets seemed to decrease but the flight was pretty much the same with random 40 degree drifts in yaw that seemed to “latch up” and not recover.

Played with the PI values, increased I till I was happy that it was not an I term issue.

Re-tightened the frame screws and tried different props. Of the above, this change seemed to create the most positive impact on the performance.

Rest assured your post was not ignored as a lot of us have similar issues.
Generally, unless we have some positive input, a lot just fence sit and check for solutions.

Are you still having these random yaw drifts?
How rigid is the frame, as I know those arms flex quite a bit?