Chapter 13. Location-aware apps
In this chapter, we’ll be looking at the fascinating subject of how your phone knows where it is, what you might want to do with that information, and how you would use this in an app.

Perhaps you already know that a global positioning system (GPS) has something to do with satellites and location. In fact, GPS is a system of 24 satellites that orbit at a speed of 3.9 km per second, sending out a signal of their position. You can “see” at least four of these satellites from anywhere on Earth. Your phone uses their signals alongside a lot of math to work out your precise location. In this chapter, we’ll explain how you can use GPS data to show latitude, longitude, and even street addresses.
The GPS system was first used by the US Navy and went on to be used by other members of the international armed forces as well as emergency services and then civil engineers to enable them to measure geographical areas more precisely. Of course, now every new mobile phone has the ability to access GPS, which (among other things) can be used for fun stuff like getting to know a new city using suggested information and images from the internet (such as apps like Layar and Around Me), or using a GPS-enabled exercise app to track your cycle rides or runs and see if you’re getting fitter and faster (apps like MapMyRide and Nike+).