iPhone XR compass sensor
What type of sensor (or special algorithm) does the iPhone XR use for the compass? Surprisingly I can move a very strong magnet very near the phone (in compass app mode) without affection the compass app reading. If I place a mechanical compass (old fashioned type with moving needle) next to the iPhone and move a magnet near, the mechanical compass is greatly affected while the iPhone compass app display is not altered any. Note, the iPhone compass always reads correctly when the magnet is near or not near.
iPhone XR