How Your Phone Compass Knows Which Way You Are Facing
A map can show your position correctly while the direction arrow points the wrong way. You turn the phone, but the arrow hesitates, swings around, or seems several degrees off. Then a compass app asks you to move the device through the air to improve its accuracy. These behaviours make more sense once you separate two questions: Where is the phone? and Which way is it facing? Location systems can help answer the first question, but a phone usually needs additional sensors to estimate the second when it is standing still.