a magnetometer measures the earth's magnetic field