How The IPhone Knows Where You Are

how iphone works
Calculating a phone’s location using just GPS satellite data can take up to several minutes. Phone can reduce this time to just a few seconds by using Wi-Fi hotspot and cell tower data to quickly find GPS satellites. Doesn't my iPhone take just seconds to figure out where I am, Well, yes… but only when it engages in a set of tricks to avoid a lengthy process that was de rigueur when GPS receivers first appeared.

In simplifying matters, Apple’s not being entirely accurate about how this all works and what it's doing. So let me explain where Wi-Fi and cell phone towers fit into the equation. Early GPS receivers took 12.5 minutes from a cold start to obtain a lock; later locks in the same region could still take minutes. If you turned a GPS receiver off for a few weeks or moved it more than a few hundred miles, a cold start might be required again.

GPS relies on two factors to create a set of accurate coordinates for where you’re standing: time and space. GPS satellites broadcast precise time signals using a built-in atomic clock along with their current location. They also broadcast the location of all other satellites in the sky, called the almanac.

Every 30 seconds, a GPS satellite broadcasts a time stamp, its current location and some less precise location information for other GPS satellites. It takes 25 of these broadcasts (thus, 12.5 minutes) to obtain the full list of satellite locations. This information has to be decoded for a receiver to then properly interpret signals from the satellites that are within range.

But, heck, I don’t have 12.5 minutes. I’m a busy man! Give me that location faster! So GPS chip and gear makers came up with a host of ways to shorten the wait, called Assisted GPS (AGPS). Instead of relying on live downloads of position data from satellites, future locations can be estimated accurately enough to figure out rough satellite positions, and get a fix at which point even more up-to-date information is retrieved. These estimates can be downloaded via a network connection in seconds or even calculated right on a device.

The current time can also be used as a clue. With a precise current time, fragmentary satellite data can be decoded to gain a faster lock or figure out the appropriate information to use. In CDMA networks, such as that used by Verizon, GPS-synchronized atomic time is required for the network’s basic operations, making it a simple matter to have such information available. This is where Apple’s statement on Wednesday deviates from full accuracy.

Apple uses AGPS for native GPS-lock improvements, and Wi-Fi network and cell tower locations are additional factors in providing a fast initial connection along with improving GPS accuracy. Cellular carriers have extremely precise GPS measurements of the locations of all their towers. With a database of such towers, you can take measurements of the signal strength of those within range—which may be dozens—and trilaterate to find an area that overlaps among them.

But cell towers are too far away from one another to provide GPS-like precision, and they don’t work well in less-populated areas, even suburbs, where less coverage is necessary than in an urban environment. Apple, Google, and others turn to Wi-Fi positioning for that. It’s trivial for a networked device like a smartphone to take a snapshot of nearby Wi-Fi and cellular sources and pass it to a server that replies with an approximate set of coordinates.

According to Apple’s Q&A, the company takes it a step further by caching subsets of data about nearby networks and towers to reduce network activity and speed up such lookups. This also shifts some computation to the phone or tablet and away from location services. And it means if there’s no cell or Wi-Fi connection available, such location information can still be useful. You can see either or both of these in action whenever you bring up the Maps app.

Typically, you see a large blue circle appear nearly instantly, a result of what must be a consultation of the local database. The circle becomes smaller as more information is used, still from cellular and Wi-Fi sources, to create a better trilateration. This data is also used to provide more clues into decoding the best GPS satellite information, allowing the use of quite small fragments of data or even raw signals to get a better lock.

Post a Comment

0 Comments