Why a Magnetometer Can Point North but Often Gets It Wrong
Phones, drones, robots, and handheld devices often contain an electronic compass. It looks as if the device knows where north is.
A magnetometer is not a tiny device that directly knows direction.
It measures the magnetic field vector in the sensor coordinate system. North, heading, and compass direction are computed later.
The first model is: a magnetometer measures local magnetic field. An electronic compass extracts the geomagnetic component, combines it with attitude and calibration, and interprets it as horizontal heading.
Read More