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 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.