Heading off up to 20 degrees after a spin

Hello, guys!
I have a RPi3 with Navio2 + an external compass HMC5843, Copter V3.4.3-rc1 with APM Planner 2.
When I rotate my quad by hand on 360 degrees, I see that heading is shifted on ~20° in HUD as well as in a logs. The same problem occurs if I use an internal compasses.


If I turn off compasses then I get normal value.
The same problem: https://community.emlid.com/t/heading-off-by-up-to-40-after-two-spins-on-yaw-axis-with-my-quadcopter/4357/1
log: 14.BIN (736 KB)
What could be a problem?

Guys, it’d be nice to hear your ideas about the issue.

There is a note there about installing the magnetometer IC without a 3.3Volt regulator. Could that be the problem?

The problem persists no matter what magnetometer is in use (there’s three of them on Navio 2). So I’d rule out this. Thanks for the input, though. And sorry it’s taken me so long to reply.

@rmackay9 I’d very grateful if you could take a look at the logs and see if there’s anything wrong there that could be fixed.