I recently had a decent crash and my compass would not calibrate. I took a magnet swirled it around the compass board on all three axis. It's the tiny board underneath the power button board. It's been working fine since. Make sure the connectors are well seated too.