The magnetic sensor in your phone is actually pretty weak and requires regular calibration to pick out the true magnetic field lines from all the noise.
Your phone has many magnets inside, and structures that can be passively magnetized. Your local magnetic environment changes constantly.
It's a fundamental limitation of the technology, unfortunately. Generally we use GPS location as you move to infer direction and feed that back into the compass routines. It's not great but it does mostly work sometimes
Your phone has many magnets inside, and structures that can be passively magnetized. Your local magnetic environment changes constantly.
It's a fundamental limitation of the technology, unfortunately. Generally we use GPS location as you move to infer direction and feed that back into the compass routines. It's not great but it does mostly work sometimes