Many of us use GPS virtually every day-getting directions with mapping apps on our phones, tracking our meal deliveries, recording our running routes-but have you ever wondered: how does GPS work?
Almost all smartphones use GPS technology, so let's take a look at what that actually means and why having a GPS receiver and a clear view of the sky means you'll never get lost again.
What is GPS?
When people talk about "a GPS," they usually mean a GPS receiver, but the Global Positioning System (GPS) is actually a constellation of many satellites orbiting the Earth (gps.gov/systems/gps/space/">31 in operational orbit and four that are classified as "in reserve" or "unhealthy").
The US military originally developed and deployed this satellite network as a military navigation system and then opened it up to anyone.
Each of these 3,000- to 4,000-pound (1,361 to 1,814 kg) solar-powered satellites orbits Earth at an altitude of about 12,427 miles (20,000 km), making two full rotations every day. The orbits are arranged so that at least four satellites are "visible" in the sky at any time and anywhere on Earth.
A GPS receiver uses these satellites to calculate the exact location of the person operating the device.
How does GPS work?
GPS receivers work by locating four or more of these satellites, determining the distance to each of these satellites, and using this information to infer their own location.
This operation is based on a simple mathematical principle called trilateration. Trilateration in three-dimensional space can be a bit tricky, so we'll start with an explanation of simple two-dimensional trilateration.
2D trilateration
Imagine you are somewhere in the United States and completely lost; for whatever reason, you have absolutely no idea where you are. You find a friendly local and ask, "Where am I?" He says, "You're 600 miles from Boise, Idaho."
The story continues
This is a nice and hard fact, but not particularly useful in itself. You can be anywhere on a circle around Boise with a radius of 600 miles, like this:
You ask someone else where you are, and she says, "You are 690 miles away from Minneapolis, Minnesota." Now you're getting somewhere.
If you combine this information with the Boise information, you have two circles that intersect. You now know that you should be at one of these two intersections if you are 625 miles from Boise and 690 miles from Minneapolis:
If a third person tells you that you are 615 miles away from Tucson, Arizona, you can eliminate one of the possibilities, because the third circle will only intersect one of these points. You now know exactly where you are: Denver, Colorado.
This process is called 2D trilateration because the intersection points are all on a two-dimensional plane. When we bring height/altitude into the equation - hello, third dimension - 3D trilateration comes into play.
3D trilateration
In essence, three-dimensional trilateration is not much different from two-dimensional trilateration, but it is a little trickier to visualize. Imagine that the rays from the previous examples go in all directions. So instead of a series of circles you get a series of spheres.
If you know that you are 10 miles away from satellite A in the sky, you could be anywhere on the surface of a huge imaginary sphere with a radius of 10 miles. If you also know that you are 15 miles away from satellite B, you can overlap the first sphere with another, larger sphere.
The spheres intersect each other in a perfect circle. If you know the distance to a third satellite, you get a third sphere, which intersects this circle at two points.
The Earth itself can act as a fourth 'satellite' or sphere; only one of the two possible points is actually on the planet's surface, so you can eliminate the point in space. However, receivers typically look at four or more satellites to improve accuracy and provide accurate altitude information.
How GPS devices calculate your location
To function properly, a GPS device needs to know two things:
-
The location of at least three satellites above you
-
The distance between you and each of those satellites
GPS receivers find out both of these things by analyzing low-power, high-frequency radio signals from the satellites orbiting the Earth. Better units have multiple receivers, so they can pick up signals from multiple satellites at the same time.
Radio waves are electromagnetic energy, meaning they travel at the speed of light (about 186,000 miles per second, or 300,000 km per second in a vacuum). The receiver can determine how far the GPS signal has traveled by timing how long it took for the signal to arrive.
GPS Math: Using Timing to Calculate Distance
At this point you can confidently tell someone you want to impress that GPS works via trilateration. But you need to be prepared for the follow-up question: how does the GPS device know the distance to those GPS satellites? It turns out to be a matter of timing.
At some point (say midnight) the satellite starts transmitting a long, digital pattern called a pseudo-random code. The receiver also starts executing the same digital pattern exactly at midnight. When the signal from the satellite reaches the receiver, the transmission of the pattern will lag slightly behind the receiver's playback of the pattern.
The length of the delay is equal to the travel time of the signal. The receiver multiplies this time by the speed of light to determine how far the signal has traveled. Assuming the signal travels in a straight line, this is the distance from the receiver to the satellite.
Maintain synchronicity
An important caveat is that the measurement only works if both the GPS device and the satellite have clocks that can be synchronized to the nanosecond. This level of precision is only achievable with atomic clocks, but they cost between $50,000 and $100,000 each.
GPS satellites are already paid for with our tax money, but what about the GPS receivers? Even Apple would have a hard time selling iPhones at that price.
The Global Positioning System has a smart, effective solution to this problem: each satellite contains an expensive atomic clock, but the receiver itself uses a regular quartz clock, which it continually resets.
Basically, the receiver looks at incoming signals from four or more satellites and measures its own inaccuracy. By constantly resetting and rechecking the time against the GPS signals from the satellites, a simple smartphone gets the accuracy of the atomic clock 'for free'.
Differential GPS
GPS works reasonably well, but inaccuracies may occur. To begin with, this method assumes that the radio signals will travel through the atmosphere at a constant speed (the speed of light).
But satellite signals are constantly subject to interference. Earth's atmosphere slows down the signals, and large objects such as skyscrapers can also affect their path.
Differential GPS (DGPS) helps correct these errors. The basic idea is to measure GPS inaccuracy at a stationary receiving station with a known location. Because the DGPS hardware on the station already knows its own position, it can easily calculate the receiver's inaccuracy.
The station then broadcasts a radio signal to all DGPS-equipped receivers in the area, containing signal correction information for that area. In general, access to this correction information makes DGPS receivers much more accurate than regular receivers.
Original article: How does GPS work?
Copyright © 2024 HowStuffWorks, a division of InfoSpace Holdings, LLC, a System1 company