Here’s where I asked a similar question:
And some more discussion of compasses:
And of course this vey interesting blog post about flying at the North Pole, one of the places where some commercial autopilots specifically prohibit: