How Does Your Phone Know Where You Are?
Our last article, Can Time Really Slow Down?, described the clocks on GPS satellites: “GPS satellites are far from Earth, where gravity is weaker, so their clocks gain about 45 microseconds a day; minus the 7 lost to speed, a net gain of about 38 microseconds a day.” What does a clock in space running a few dozen microseconds fast have to do with the blue dot on your phone? This time we look at how your phone actually knows where you are.
Take a guess
Two things are often said: “Your phone sends a signal to the satellites, and they find you,” and “The satellites can see you from up there.”
Neither is right. Your phone never sends anything to a GPS satellite, and the satellites can’t see you; they don’t even know how many people are using them. Your phone only listens: to the satellites telling the time. Indoors, phones also use Wi-Fi and cell towers to find their place; this article is only about the satellites.
Thunder: count, and you know how far
After a flash of lightning, count the seconds until the thunder: sound travels about 340 meters a second, so if you count to 3, the lightning was about 1 kilometer away.
GPS works the same way, with radio instead of sound, traveling at the speed of light, about 300,000 kilometers a second. Every satellite keeps broadcasting: “I’m satellite number such-and-such, I’m here, and the time is now this.” Your phone notes when the message arrives, subtracts the time it was sent, and knows how long the signal was on the way; multiply by the speed of light, and that’s how far away the satellite is. The satellites are about 20,000 kilometers up, and the signal takes 67 to 86 milliseconds to arrive (a millisecond is a thousandth of a second).
The 32 GPS satellites
GPS is the United States’ satellite navigation system. The first satellite was launched in 1978 and the system became fully operational in 1995; today it is run by the U.S. Space Force, with 32 satellites in service. They are about 20,000 kilometers up, in 6 orbital planes tilted at 55°, and go around Earth once every 11 hours 58 minutes. As Does Earth Really Take 24 Hours to Turn Once? explained, Earth turns once against the stars in just 23 hours 56 minutes, exactly two orbits of a satellite. So after 23 hours 56 minutes, each satellite is back in the same patch of your sky, about 4 minutes earlier than the day before.
The arrangement makes sure that anywhere on Earth, at any time, several satellites are overhead. In the simulation above, Beijing always sees 7 to 10 more than 10° above the horizon. Each satellite carries three atomic clocks (rubidium, and on some a cesium clock), one in use and the others as spares; the civilian signal goes out with only a few tens of watts, about as much as an old-style light bulb.
One distance, one circle
All the satellites’ clocks keep to one standard time, checked by ground stations every day. The satellites tell the time together, but they are at different distances from you, so their signals reach your phone at different moments: the nearest arrives first, the farthest a few milliseconds later. Your phone notes when each signal arrives and works out how far it is from each satellite.
One distance alone doesn’t pin you down: all the points that far from a satellite form a huge sphere around it. To draw it, think on a flat sheet first: once the distance to one satellite is known, you are on a circle around it; add a second satellite, and the two circles meet at two points; add a third, and the three circles share just one point, which is where you are.
But there’s a big problem: the arrival times are taken with the phone’s own clock. The positioning chip in your phone has an ordinary quartz clock, nowhere near as good as an atomic clock. It isn’t the time on your screen, either: that comes from the cellular network, and being off by a few tenths of a second goes unnoticed in daily life, but not in positioning. A clock error of 1 microsecond (a millionth of a second, 10−6 s) means a distance error of 300 meters; an error of 1 millisecond, 300 kilometers.
The trick is neat: make “how far off is the phone’s clock” one more unknown. If the phone’s clock is fast, every signal seems to arrive late by the same amount, every distance comes out too long by the same stretch, and the three circles don’t meet at one point (right side of the figure above); turn the clock error back bit by bit until the three circles meet at one point, and you have both the position and the clock error. On a flat sheet the unknowns are two directions plus the clock error, three in all, so the figure uses three satellites; in real three-dimensional space they are east–west, north–south, up–down and the clock error, four in all, so a phone needs at least 4 satellites.
As a bonus, your phone gets the time, lined up with the atomic clocks to better than a microsecond. Cell towers, power grids and bank trading often rely on GPS to keep time.
A signal hidden in noise
By the time a GPS signal has traveled 20,000 kilometers, it is very weak: about 10−16 watts at the ground, several dozen times weaker than the receiver’s own noise. So how does your phone hear it?
By matching a password. Each satellite has its own: a fixed string of 1023 “plus” and “minus” chips, called the C/A code, repeated every millisecond. Your phone already knows each satellite’s code. It slides its copy along the noise it receives and compares: when they’re out of line, pluses and minuses cancel and nothing shows up; once they line up, all 1023 chips agree and a tall spike appears.
Where the spike appears is the signal’s delay. One chip lasts only 977.5 nanoseconds (a nanosecond is 10−9 s), in which light travels 293 meters; the receiver can then pin down the spike’s position much more finely, to about a hundredth of a chip, a few meters.
The satellites’ positions and times are carried in the signal too, but at only 50 bits a second: sending the full orbit takes about 30 seconds. So phones usually download this data over the internet first (“assisted GPS”), which is why the map finds you within seconds.
From Earth’s center, a few steps to the answer
With distances to 4 or more satellites, the phone still has to solve for its position. The equations can’t easily be solved directly, so it guesses and corrects: guess a position and a clock error, work out how far each satellite should be if the guess were right, compare with what was measured, shift the guess in the direction that closes the gap, and repeat.
That is how the figure above was calculated: starting from Earth’s center, 6,369 kilometers from Beijing; one step leaves 1,362 kilometers; then 52 kilometers, 76 meters, and at the fourth step 4 meters, which further steps don’t change. The remaining 4 meters come from the errors in the distances themselves. At the same time, the phone’s clock error comes out: 0.999997 milliseconds fast, a few nanoseconds from the 1 millisecond we put in.
Why does the dot wander?
In the open, a phone usually gets within about 5 meters. Between tall buildings, the blue dot often jumps around. There are several reasons.
First, where the satellites are. With equally good distances, the more spread out the satellites, the better the fix; if they’re bunched in a small patch of sky, the circles are nearly parallel, and the crossing point gets smeared out along one direction.
With the same 3-meter error in each distance, 95% of fixes in the open fall within 6 meters; on the street with only 4 satellites, they stretch into a long north–south streak, and 95% fall within 109 meters. Fortunately, phones today don’t listen only to GPS: at the same moment, more than 10° above Beijing’s horizon, there are 8 GPS satellites, 26 of China’s BeiDou, 8 of Europe’s Galileo and 10 of Russia’s GLONASS, 52 in all. BeiDou has offered global service since 2020 and has especially many satellites over Asia and the Pacific.
Second, reflections. A signal that bounces off a glass wall takes a longer path, so the distance comes out too long.
Third, the ionosphere. Tens to hundreds of kilometers up, sunlight splits air into charged particles, and signals passing through are slowed, as if they had traveled a few meters to a few tens of meters farther. Better phones (since 2018) receive two frequencies; the two are slowed by different amounts, so comparing them removes most of the ionosphere’s effect.
The Sun can also stir up the ionosphere. What Else Does the Sun Send Us Besides Light? said: “In May 2024 that wind gusted hard, and many people in Chicago, New York and all the way to the American South saw aurorae from their own backyards.” The same storm churned up the ionosphere, and in North Dakota, self-steering tractors that are normally accurate to a few centimeters were off by about 3 meters; some farmers had to stop planting.
There’s some history, too: until May 2, 2000, GPS deliberately added error to the civilian signal, so positions were good to only 40 or 50 meters. That day the United States switched the error off, and overnight civilian positioning became good to about 6 meters.
Clocks on the satellites: relativity, two accounts
Now back to the clock that gains 38 microseconds a day.
The first account is settled before launch: the satellite clock’s frequency is set a tiny bit low, from the standard 10.23 megahertz to 10.229 999 995 43 megahertz, lower by 4.4647 × 10−10. Once in orbit, gravity and speed “make up” exactly that difference, so seen from the ground it keeps pace with clocks down here.
The second account differs from satellite to satellite. The orbits aren’t perfect circles: when a satellite is closer to Earth it moves faster and gravity is stronger, so its clock runs a bit slower; when it’s farther out, a bit faster. The wobble is at most a few tens of nanoseconds, a dozen meters or so, and your phone removes it with a formula when it works out each satellite’s time.
The last article said: “In 38 microseconds light travels more than 11 kilometers: if relativity were left out, satellite positions would drift by about 10 kilometers a day.” That estimate simply multiplies 38 microseconds by the speed of light, as many books do. The real system is a little subtler: the part that all satellites gain together, your phone would absorb into its own clock error; and the ground stations measure every satellite’s clock each day and upload corrections. So even without the tuning, positions wouldn’t necessarily drift 10 kilometers a day. But without it, the satellite clocks would run further and further from standard time on the ground, 14 milliseconds a year, and the cell towers and power grids that take their time from GPS would go wrong with them; and the part that differs from satellite to satellite, because their orbits differ, your phone couldn’t remove. So neither account can be skipped.
In one sentence: your phone only listens; it hears each satellite tell the time, works out how far away it is, and finds where the circles meet; its clock isn’t good enough, so it listens to one more satellite and solves for the clock error too. Behind a few meters of accuracy are atomic clocks, passwords hidden in noise, and Einstein’s relativity.
How do we know?
- See the satellites for yourself. On an Android phone, a free app called GPSTest shows a “sky map” like the right side of figure 1: where each satellite is, how high, how strong its signal, and whether it belongs to GPS, BeiDou or another system. Compare standing in an open space with standing by a window, and see how many you get. iPhones don’t give apps this data; a free app such as GNSS View shows where the satellites are in the sky, calculated from their orbits, but not which ones your phone actually receives or how strong they are.
- Raw data from phones. Since 2016, Android phones can hand the raw distances and times they measure to apps, and researchers use them to test new ways of positioning. iPhones don’t make this data available.
- Centimeter positioning. Surveyors’ equipment doesn’t only count code chips; it counts the crests of the radio wave itself: the GPS L1 signal has a wavelength of only 19 centimeters, and counting them precisely gives a position good to a centimeter or two.
What we still don’t know
When the Sun will churn up the ionosphere, and how badly, still can’t be forecast accurately days ahead, much like the hardest thunderstorms in weather forecasting. Another problem is how weak the signal is: in recent years, near some conflict zones, planes have often found GPS jammed or even met fake signals. How to make positioning hard to jam, or to know where you are without satellites at all, is something many countries are still working on.
For the curious: the equations, the signal and the data
The pseudorange equation. Satellite is at when it transmits; the phone is at , and its clock error is (seconds). The measured “pseudorange” is
where includes the ionosphere, the troposphere, multipath and noise. The unknowns are the three components of and , so at least 4 satellites are needed. Linearize around a guess : , where each row of is and is the unit vector toward the satellite; iterate with least squares, . Figure 4: starting from , the errors are about 6,369 km, 1,362 km, 52 km, 76 m and 4.0 m.
Dilution of precision (DOP). With ranging error , the position error is about , where DOP comes from . Figure 5: in the open, 8 satellites, horizontal DOP about 1.2; on the street, 4 satellites, horizontal DOP about 18.
The C/A code. As IS-GPS-200 specifies, made by two 10-bit shift registers: G1 with feedback polynomial , G2 with ; satellite 1 adds G2’s taps 2 and 6. Chip rate 1.023 million chips a second, 1023 chips long, repeating every millisecond; one chip is 977.5 ns, or 293 m. The L1 carrier is 1575.42 MHz, wavelength 19.0 cm. The navigation message is 50 bits a second.
Signal strength. The specification’s minimum received power for L1 C/A is −128.5 dBm (about W); thermal noise at room temperature in a 2 MHz band is about −111 dBm, so the signal is about 17.5 dB (about 1/56) weaker. Figure 3: carrier-to-noise density dB-Hz, one sample per chip, so the signal-to-noise power ratio is divided by the chip rate, about 1/32; correlating 10 ms of data gives a spike about 16 times the background fluctuation.
Relativity. Orbital radius about 26,560 km, speed about 3.87 km/s. Speed: μs a day; gravity: μs a day. Including the ground clock’s motion with Earth’s rotation and Earth’s flattened shape, the specification’s frequency offset is , or 38.58 μs a day, about 14.1 ms a year. The eccentricity term: , with s/m, eccentricity , semi-major axis and eccentric anomaly ; PRN 07 has , an amplitude of about 49 ns. There is also the Sagnac effect: during the 70-odd milliseconds the signal is on its way, Earth turns the phone a little (Beijing’s ground speed is about 356 m/s, so about 27 m), which is removed when working in Earth-fixed coordinates.
Orbits and simulations. Satellite orbits: CelesTrak GP elements (GPS, BeiDou, Galileo, GLONASS; epochs November 4–6, 2026), propagated as Kepler orbits without perturbations (BeiDou without the experimental BeiDou-3S satellites, which offer no open service); within half a day the error is a few tens of km, enough for the pictures and for counting visible satellites. Beijing: 39.90° N, 116.41° E, 50 m; times from 00:00 UTC on November 7, 2026. The “measurements” in figures 4 and 5 are true distances from the satellite positions, plus a 1 ms clock error and 3 m Gaussian random errors.
Other data. Phone accuracy in the open: about 4.9 m, from the U.S. government’s GPS website (gps.gov), citing the Institute of Navigation. Selective Availability switched off on May 2, 2000: a before-and-after comparison published on gps.gov, 24 hours each on May 1 and May 3 from a continuously operating reference station in Kentucky, 95% horizontal error from 45.0 m to 6.3 m. The tractors in May 2024: news reports citing NOAA’s Space Weather Prediction Center, off by about 10 feet. Since April 2026, 32 GPS satellites in service (U.S. Space Force).