Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL

About the Magnetometer > About the Magnetometer - Pg. 81

Feedback: 0 Comments on this Section

6 Using the Magnetometer In addition to the accelerometer the iPhone 3GS has a magnetometer, a magnetoresistive permalloy sensor, the AN-203 produced by Honeywell located towards the top right hand corner of the iPhone device. This model measures fields within a ±2 gauss (200 microtesla) range, and is sensitive to magnetic fields of less than 100 microgauss (0.01 microtesla). The Earth's magnetic field is roughly 0.6 gauss (60 microtesla or 48 A/m). The magnetometer is measuring the strength of the magnetic field surrounding the device. However in the absence of any strong local fields, these measurements will be of the ambient magnetic field of the Earth, allowing the device to determine its "heading" with respect to the geomagnetic North Pole and act as a digital compass. The geomagnetic heading and true heading, relative to the geographical North Pole, can vary widely (by several tens of degrees depending on your location). About the Magnetometer Combining the heading (yaw) information (see Figure 6-1) returned by this device with the roll and pitch information returned by the accelerometer will let you determine the true orientation of the iPhone in real time. Figure 6-1. Using the magnetometer (a.k.a. the digital compass) in the iPhone 3GS you can determine the heading (yaw) of the device.