Mobile Phone Handheld Hardware Hardware Rick Rogers John Lombardo O'Reilly Media, Inc. O'Reilly Media Android Application Development, 1st Edition9.1. Location-Based ServicesMobile phones use several related methods, alone and in combination,
to determine where they are:
Cell ID Regardless of whether you're actually talking on the phone, as
long as it's powered up, your mobile phone carries on a constant
conversation with nearby cell towers. It has to do this in order to
be able to respond when someone calls you, so every few seconds it
"pings" the cell tower it was using last to tell it that it's still
in range and to note network parameters such as the current time,
the current signal strength (uplink and downlink), etc. If you happen to be moving, your phone may do a handover to
another cell tower, all in the background without a need for you to
intervene. Each cell tower worldwide has a unique identifier, called
(appropriately enough) its Cell ID, and each tower knows its
latitude and longitude, so it's easy enough for a mobile phone to
know "approximately" where you are located by taking note of the
current Cell ID's geographic location. Cell sizes vary depending on
the expected traffic in an area, but in the U.S., their radius
ranges from a half mile (cities) to five miles or more (wide-open
spaces).
Triangulation Most of the time your mobile phone is in range of more than one
cell tower. In 2G and later mobile technologies, the cell tower has
the ability to tell what direction your signal is coming from. If
there are two or three towers that can see your phone, together they
can triangulate on your phone's location. With some operators, your
phone then has the ability to query the network to find out where
it's been located. This sounds a little backward, but it can be very
accurate, and doesn't depend on any extra hardware on the mobile
phone.
GPS The satellite-based Global Positioning System (GPS) is
ubiquitous these days, found in car navigation units, handheld
navigators, and mobile phones. The good news is that, using GPS,
your mobile phone can determine its location very accurately,
including its altitude if that's important for some particular
application. There are several downsides to GPS, but it is gaining
popularity nonetheless. The downsides:
Increased cost GPS radios and processors are fairly inexpensive, but
still, an increase of even $10 in the bill-of-materials cost
of a mobile phone is considerable.
Reduced battery life There have been great strides in reducing the power required by
GPS radios and processors, but they still suck battery power.
Most phones that include GPS also have a feature that lets the
user turn it on and off. If your application depends on GPS
accuracy, it's good to remember that your application might
have to check whether the GPS device is turned on and notify
the user if it isn't.
Unreliable availability Nothing "always works," but GPS in particular depends on
your mobile device being able to see the satellites currently
overhead. If you're in the basement of a high-rise building,
surrounded by steel-reinforced concrete, you probably aren't
going to be able to use GPS.
It's reasonable to expect that all Android phones will include one
or all of these location-finding methods. The T-Mobile G1 in particular
can use them all. So now we'll proceed to techniques for using the
location capabilities.
 |
|
|
|
|