Most people now come to expect a GPS receiver as a given in their smartphones, and we trust that it will be accurate and be capable of getting a lock in just seconds. However, all this didn’t happen overnight and there are a lot of things going on in the phone that help its GPS receiver to do this.
The original GPS project was started in 1973 by the US military to be used for positioning troops and weapons during battle. Initially there were no “civilian” implementations available. Over time however, industry found uses for the concept and commercial GPS receivers became available. This was a concern to the military, who didn’t want the enemy using the GPS satellites to aid in their battle against the United States. Subsequently, pseudo-random errors were introduced into the signals causing offsets as great as 50 meters horizontally and 100 meters vertically.
These errors could be corrected by having a pseudo-random number generator fed with a super-secret KEY that changed daily. For a while there was a vast difference in the accuracy of a military GPS and its civilian counterpart. However, the system had a serious flaw, in that the error introduced, even though it changed frequently, was identical at all locations. This meant the enemy could use a base station antenna at a precisely-known position and easily see the introduced error. They could then transmit that to their mobile GPS receivers and overcome the problem. This was one of the arguments used to finally convince the US government to abandon the use of these pseudo-errors in the spring 2000. The system had also been turned off during the first Gulf War in 1991 when a lack of military GPS devices forced them to use civilian devices that couldn’t adjust for the random errors.
Advances in micro-electronics made unexpected improvements in consumer GPS devices, while reducing the size of the basic chipsets to the point that they could easily be added to cell phones without using up very much room. GPS has been included in many high-end cell phones since the early part of the 2000’s, but it wasn’t until the iPhone in 2007 that the use of GPS in phones really took off. The inclusion of GPS is now a defacto requirement in any modern smartphone, no matter how inexpensive it is.
GPS is a passive receive-only system that does not require a device to transmit anything back to the network, so contrary to some misconceptions, the government DOES NOT KNOW where each GPS receiver is located. Because it doesn’t transmit anything, a GPS receiver uses fairly little battery power and can run for hours without reducing the runtime of your phone by all that much.
By knowing the exact location of the satellites, a GPS receiver determines the distance between itself and those satellites. Ideally this describes a series spheres that all overlap at a single point, which is the location of the GPS receiver in three dimensions. It takes at least three of these spheres to pinpoint a location, but the...
more you have, the more accurate the estimate.
Unfortunately things are never perfect, and errors in measuring the distance to the satellites will inevitably occur. For most us, the biggest source of interference will be manmade structures, though in some parts of the country natural structures such as hills and mountains play a role too. Buildings can reflect signals, creating a false sense of distance. Fortunately, largely-erroneous distances describe spheres that don’t intersect with any of the others and they can be discarded. However, when travelling in the canyons of a downtown area, the narrow strip of sky that is visible from a car leaves very few satellites with an unobstructed signal.
Many (though not all) of the newest smartphones now also use the Russian GLONASS satellites, which essentially doubles the number of signals it can rely on. This greatly increases the odds that there will always be at least the necessary three satellites in view. Europe and China are both in the process of setting up their own geo-positioning networks, and so future phones might have even more satellites to calculate a fix from.
Over the last few years the sensitivity of GPS receivers has increased greatly and they are now able to provide location locks in places that old devices simply could not. I had a Garmin GPS a few years ago that had trouble keeping a lock when I brought it in the house, and it would lose it for sure if I headed down to the basement. My Samsung Galaxy S4 on the other hand has no problem maintaining a fix on 18 or more satellites inside the house, and can easily get 14 or more while in my basement. I routinely get strong GPS locks inside single-storey buildings that don’t have steel roofs.
Getting a lock in the first place is problematic. Stand-alone GPS receivers that have been turned off for extended periods of time, or have been moved a substantial distance since they were last turned on, no longer know the position of the satellites. They are forced to download the journal information (which contains the precise locations of the satellites). Unfortunately this data is sent from the satellites at mind-bogglingly slow rate of just 50 bits per second. It can therefore take up to 12 minutes to load all of this information, and should this stream be interrupted long enough to corrupt the data, the GPS device must wait for the next transmission.
Smartphones on the other hand generally use what is known as A-GPS, which stands for Assisted GPS. Instead of relying on the low-rate data feed from the satellites themselves, a smartphone uses its substantially-faster data network to contact a server that provides all the information it needs to locate the satellites quickly. This is why many smartphones are capable of yielding a time-to-first-lock of just a scant few seconds.
Next time you use your smartphone to provide turn-by-turn directions to a destination, or to pinpoint your location to include in social media posts, think of how amazing the system actually is.