Chapter 12. Location Awareness
In this chapter, we will address the topic of Location Awareness. First, we will talk in Section 12.1 about the Core Location framework and how to use it to build location-aware applications. After that, Section 12.2 discusses a simple location-aware application. Next, Section 12.3 covers the topic of geocoding. In that section, you will learn how to translate postal addresses into geographical locations. In Section 12.4, you will learn how to sample movement of the device and display that information on maps. Finally, Section 12.5 discusses how to relate zip codes to geographical information. In that section, you will also learn the actual formula that implements the distance between two locations.
The Core Location Framework
The second generation of the iPhone (iPhone 3G) is equipped with a Global Positioning System (GPS) chip. GPS utilizes three or four satellites to triangulate the position of a point on earth. The accuracy of the point's position using this technique ranges from 5 to 40 meters.
The first generation of the iPhone uses non-GPS techniques for identifying the location of the device. Non-GPS techniques such as Cell-Identification, Time-of-Arrival (TOA) and Enhanced Observed Time Difference (E-TOD) can be used in conjunction with Wi-Fi and Bluetooth to provide a reasonable substitute for the lack of a GPS chip [3]. Of course, the location accuracy of these methods is much lower than GPS and ranges from 100 to 500 meters.
Regardless of the ...
Get iPhone SDK Programming: Developing Mobile Applications for Apple iPhone and iPod touch 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.