Chapter 6. Using Core Motion

The iPhone 4, latest generation iPod touch, and the iPad have a vibrational gyroscope in addition to an accelerometer and a magnetometer. The MicroElectroMechanical (MEMs) gyroscope inside the iPhone 4 and the 4th generation iPod touch is the AGD8 2032, nearly identical to an off-the-shelf STMicroelectronics L3G4200D device The iPad 2 uses an AGD8 2103 sensor, also from STMicroelectronics. These models operate by making use of a plate called a “proof mass” that oscillates when a drive signal is applied to capacitor plates. When the user rotates the phone, the proof mass is displaced in the X, Y and Z directions and an ASIC processor measures the capacitance change of the plates. The capacitance variation is used to detect the angular rate applied to the package.

An accelerometer provides measurement of forces in the X, Y and Z-axes but it cannot measure rotation. On the other hand, since a gyroscope is a rate of change device, you are able to measure the change in rotations around an axis. By using both sensors in combination you can measure the movement of the device in a six degrees-of-freedom inertial system, allowing you to use dead reckoning to find the physical location (and orientation of the device) relative to an initial starting position.

Warning

All inertial systems have an inherent drift, so dead reckoning should not be regarded as being stable over the long term.

Core Motion

The arrival of iOS 4 brought with it the new Core Motion framework; ...

Get Basic Sensors in iOS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.