A magnetometer is a sensor that measures the strength and direction of magnetic fields. In a mobile phone, the magnetometer is used to determine the phone's orientation and location. It is a crucial component of the phone's navigation system,precated by the GPS (Global Positioning System) and GLONASS (Global Navigation Satellite System). How Does a Magnetometer Work? A magnetometer works by detecting the changes in the Earth's magnetic field. The Earth's magnetic field is generated by the movement of molten iron in the Earth's core. The magnetic field is strongest near the Earth's magnetic poles and weakest near the equator. The magnetometer in a mobile phone uses a small magnetoresistive sensor to detect the changes in the Earth's magnetic field. The sensor is made up of a small piece of ferromagnetic material that is sensitive to changes in the magnetic field. When the phone is moved, the sensor detects the changes in the magnetic field and sends t...