A magnetometer is a device that measures magnetism: the direction, strength, or relative change of a magnetic field at a given location.
Modern smartphones are packed with a wide range of sensors, and their magnetometer can successfully identify certain kinds of ...