Chapter 10. Positioning: accelerometers, location, and the compass

This chapter covers

  • Sensing gravity
  • Gauging movement
  • Determining location and orientation
  • Using Core Location

When we first introduced the iPhone and iPad, we highlighted a number of its unique features. Among them were three components that allow the device to figure out precisely where it is in space: a trio of accelerometers, which give it the ability to sense motion in three dimensions; a locational device (using either GPS or faux GPS), which lets it figure out where in the world it is; and a compass to figure out which direction it’s facing.

Other than accessing some basic orientation information, we haven’t done much with these features. We’ll now dive into these ...

Get iPhone and iPad in Action 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.