Chapter  4

iOS Sensors

Augmented-reality programming requires the use of multiple hardware components to build an effective application. Most of these components are commonly referred to as sensors. Sensors, such as the gyroscope and accelerometer, help us figure out the device's orientation and change in position while the application is running. Since we'll be programming in AR, we'll be overlaying our application on the real-life view of the device's camera. This makes it so much more important that we track orientation so we can keep the application oriented in a realistic way.

Orientation Sensors

The accelerometer and gyroscope are used for similar purposes, but there is a subtle difference between the two, and most applications rely on ...

Get Pro iOS 5 Augmented Reality now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.