Measuring magnetic field using iPhone's build in  magnetometer.