How GPS Actually Works: Trilateration, Atomic Clocks, and Relativity

How GPS Actually Works: Trilateration, Atomic Clocks, and Relativity

How GPS Works: Trilateration, Atomic Clocks, and the 38-Microsecond Relativity Fix

Understanding how GPS works starts with a fact that sounds absurd: the little blue dot on your phone is the answer to a physics problem involving four atomic clocks orbiting 20,000 kilometres overhead, a correction for Einstein’s theory of relativity, and a stopwatch accurate to a few billionths of a second. Your phone does not “talk to” satellites the way it talks to a cell tower. It silently listens, measures how long four radio whispers took to arrive, and solves four equations to pin itself onto the surface of the Earth — usually to within three to five metres. No signal ever travels back up. The whole thing is one-way, passive, and unlimited in how many devices can use it at once.

That last point is why GPS is free and global. But the engineering hiding behind your blue dot is some of the most elegant applied physics ever deployed. To trust the dot, you have to understand the timing, the geometry, and the relativity.

What this covers: the satellite constellation; the core idea of one-way ranging and pseudoranges; why you need exactly four satellites; the trilateration math; the signal structure and atomic clocks; the full error budget; the relativity correction worked out in numbers; and how your phone gets a fast, accurate fix.

Context and Background

The Global Positioning System is a constellation of roughly 31 operational satellites run by the United States Space Force, designed so that at least four are visible from anywhere on Earth at any time. The first satellite launched in 1978; full operational capability arrived in 1995. For its first decade civilian access was deliberately degraded by a feature called Selective Availability, which dithered the signals to give civilian receivers about 100 metres of error. That degradation was switched off in May 2000, and accuracy improved tenfold overnight — which is why consumer car navigation suddenly became viable in the early 2000s.

GPS is no longer alone. It is now one of four global navigation satellite systems, collectively called GNSS. Russia operates GLONASS, the European Union operates Galileo, and China operates BeiDou. Each maintains its own constellation in similar medium Earth orbits, and modern receiver chips listen to all of them at once. A phone in 2026 might track 25 to 30 satellites across four systems simultaneously, which is a large part of why fixes are faster and more robust than they were a decade ago — more satellites in view means better geometry and resistance to obstructions. The underlying physics, however, is identical across all four systems, so understanding GPS means understanding GNSS in general.

The orbits matter. GPS satellites sit in medium Earth orbit (MEO) at an altitude of about 20,200 kilometres, completing two orbits per sidereal day — roughly one lap every 11 hours and 58 minutes. This is a deliberate compromise. Low Earth orbit satellites, like those in the Starlink constellation, are close and fast but would require thousands of units for global coverage and would whip across the sky too quickly. Geostationary satellites sit still relative to the ground but are so far out (about 35,800 km) that the geometry for positioning is poor and polar coverage is impossible. MEO is the sweet spot: high enough that six orbital planes of four-plus satellites blanket the planet, low enough that the signals are strong and the geometry is good. If you want a parallel example of physics-driven sensing systems, our explainer on how LiDAR actually works walks through a related time-of-flight idea at a completely different scale. For the authoritative technical reference, the U.S. government’s GPS.gov program site documents the constellation, signals, and accuracy specifications.

The Core Mechanism: Ranging and Trilateration

At its heart, GPS answers one question: how far away is each satellite? If your receiver knows the distance to several satellites whose exact positions in space are known, it can work backward to find the only point on Earth consistent with all those distances. That is trilateration, and the whole system is built to measure those distances using nothing but the travel time of radio waves moving at the speed of light.

One-way ranging and the speed-of-light stopwatch

Every GPS satellite continuously broadcasts a signal that effectively says, “This is satellite number N, and right now the time is exactly T.” Because radio waves travel at the speed of light — about 299,792,458 metres per second — the signal arrives at your receiver a tiny fraction of a second later. If your receiver knew the exact time the signal left and the exact time it arrived, the distance would be trivial: multiply the travel time by the speed of light. A signal from a satellite directly overhead takes roughly 67 milliseconds to reach the ground.

The brutal part is the precision required. Light travels about 30 centimetres in one nanosecond — one billionth of a second. So if your timing is off by a single microsecond (a millionth of a second), your distance estimate is off by 300 metres. To get a fix accurate to a few metres, the system has to keep time to within about ten nanoseconds. That is why every satellite carries atomic clocks, and it is the reason the entire architecture is a study in obsessive timekeeping.

Why you need four satellites, not three

In a perfect world with a perfect clock in your receiver, three satellites would be enough. Each satellite’s measured distance places you on the surface of a sphere centred on that satellite. Two spheres intersect in a circle; a third sphere cuts that circle down to two points, one of which is absurd (out in space or deep underground), leaving a single sensible location. Three distances, three unknowns — your X, Y, and Z coordinates — solved.

But your receiver does not have a perfect clock. Atomic clocks cost as much as a car and weigh several kilograms; your phone has a cheap quartz oscillator that drifts constantly. If the receiver’s clock is off by even a microsecond, every distance it computes is wrong by 300 metres in the same direction. This is why the measured distances are called pseudoranges — they are biased by the receiver’s unknown clock error.

The fix is beautifully economical. The receiver’s clock error is a single unknown number that affects every pseudorange identically. So instead of three unknowns, you have four: X, Y, Z, and the clock bias t. Four unknowns require four equations, which means four satellites. The receiver solves all four simultaneously, and in doing so it not only finds its position but also corrects its own cheap clock to atomic-clock accuracy as a free by-product. This is the single most elegant idea in GPS: it lets a two-dollar oscillator borrow the precision of a billion-dollar timing infrastructure.

How GPS trilateration works

Figure 1: Four satellites, each broadcasting its known position and the precise time, send signals one-way to your receiver. The receiver builds four pseudorange equations and solves them simultaneously for four unknowns — position (x, y, z) and its own clock bias. Three satellites would fix position alone, but the fourth is what lets a cheap receiver clock be solved out of the equations.

The geometry, intuitively

You can picture the math without algebra. Imagine each satellite as the centre of an expanding bubble, and the bubble’s radius is the distance the signal travelled. Where two bubbles touch, you could be anywhere on a ring. A third bubble pierces that ring at points. A fourth bubble both confirms the point and absorbs the timing error, because if your clock is wrong all four bubbles are mis-sized by the same amount — and there is only one position-plus-clock-correction that makes all four agree at once. The receiver tries candidate corrections until the four spheres meet cleanly. In practice it does this with linear algebra in a few milliseconds, repeating many times per second, but the geometric intuition is exact: GPS is the art of finding the one place where four spheres can be made to intersect by adjusting a single clock.

This is also why satellite geometry affects accuracy. If the four satellites are clustered together in one patch of sky, the spheres intersect at a shallow, smeared angle and small timing errors translate into large position errors. If the satellites are well spread across the sky, the spheres cross at steep, clean angles and the fix is sharp. Engineers quantify this with a number called dilution of precision, which we will return to in the error budget.

There is one more subtlety worth making explicit, because it trips up almost everyone who first learns the system. The satellites are not stationary while the signal is in flight. In the 67 milliseconds it takes a signal to reach the ground, the satellite has moved several hundred metres along its orbit, and the Earth itself has rotated underneath. The receiver therefore cannot simply use “where the satellite is now” — it has to reconstruct, using the ephemeris parameters from the navigation message, exactly where the satellite was at the precise instant the signal departed. This is where the navigation message earns its keep: it is not a static address book but a set of orbital equations the receiver evaluates for a specific transmission time. Solving the position problem and solving the timing problem are therefore inseparable. You cannot know where the satellite was without knowing when the signal left, and you cannot know when it left without solving for your own clock error. The four-equation solve handles all of this at once, dozens of times per second.

Signals, Atomic Clocks, and Error Sources

The signal that carries all this is a marvel of radio engineering, because it must be receivable by a fingernail-sized antenna using a transmitter 20,000 kilometres away that puts out less power than a household light bulb. By the time a GPS signal reaches the ground it is weaker than the background noise of the radio sky — and yet your phone extracts a clean timing measurement from it.

The signal: codes, carriers, and the navigation message

GPS broadcasts on several frequencies. The classic civilian signal is L1 at 1575.42 MHz; there is also L2 at 1227.60 MHz (historically military, now partly civilian) and the modern L5 at 1176.45 MHz, designed for safety-of-life applications like aviation. On L1, the satellite transmits the Coarse/Acquisition code, or C/A code — a pseudorandom sequence of 1,023 bits that repeats every millisecond, clocked at 1.023 million bits per second.

This pseudorandom code is the clever part. Every satellite uses a different, carefully chosen code that looks like noise but is mathematically distinct from all the others — a scheme called Code Division Multiple Access (CDMA). Your receiver generates its own copy of each satellite’s code and slides it back and forth in time until it lines up with the incoming signal. The amount of slide needed is the travel-time measurement. Because the codes are nearly orthogonal, all satellites can transmit on the exact same frequency simultaneously without interfering — the receiver separates them by code, not by frequency. This technique, called spread spectrum, also makes the signal robust against interference and lets the receiver pull a timing measurement out of a signal buried below the noise floor.

Riding on top of the codes is the navigation message, a slow 50-bit-per-second data stream that tells the receiver everything it needs to turn travel times into positions. It contains the ephemeris — extremely precise parameters describing that satellite’s own orbit, valid for a few hours — plus clock-correction terms, the satellite’s health status, and the almanac, a coarse description of where every other satellite in the constellation is. The ephemeris is what lets the receiver compute exactly where the satellite was at the instant it sent the signal; the almanac helps the receiver quickly figure out which satellites to look for. A full almanac takes about 12.5 minutes to download from scratch, which is why a cold-start GPS fix used to take minutes before assistance data became common.

GPS signal and navigation message structure

Figure 2: The L1 carrier at 1575.42 MHz is modulated by the C/A pseudorandom code (1.023 Mbps) and the 50-bps navigation message. The pseudorandom code gives each satellite a unique CDMA signature; the navigation message carries the ephemeris (precise orbit), the almanac (coarse constellation map), and clock-correction terms the receiver needs to convert travel time into position.

Atomic clocks: the heartbeat of the system

Every GPS satellite carries multiple atomic clocks — typically a mix of rubidium and cesium oscillators, with newer satellites carrying rubidium standards. These clocks keep time by counting the fantastically stable resonant frequency of atoms: a cesium atom’s defining transition oscillates 9,192,631,770 times per second, and that number is so reliable it literally defines the SI second. The clocks are stable to better than a few nanoseconds per day, but even that is not good enough on its own.

The clocks are continuously monitored and disciplined by the GPS ground control segment — a network of monitoring stations spread around the globe, feeding a master control station at Schriever Space Force Base in Colorado. The ground segment tracks each satellite, measures how its clock and orbit are drifting, and uploads fresh correction parameters that get folded into the navigation message. So the time stamped on the signal is not just whatever the satellite’s clock reads; it is that reading plus corrections computed on the ground, keeping the whole constellation synchronised to GPS System Time to within a handful of nanoseconds. This blend of onboard atomic clocks and ground-based correction is what gives the receiver a trustworthy “the time is now exactly T” to anchor its ranging.

The error budget

No measurement is perfect, and a GPS fix is the accumulation of several error sources, each contributing its own slice. Understanding the budget is the key to understanding both why a basic fix lands around three to five metres and how augmentation systems push it to centimetres.

Error source Typical magnitude What causes it
Ionospheric delay 0–5 m (up to 30 m worst case) Charged particles slow the signal in the upper atmosphere
Satellite clock & ephemeris 1–2 m Residual error in broadcast clock and orbit data
Tropospheric delay 0.2–0.5 m Water vapour and dry air refract the signal in the lower atmosphere
Multipath 0.5–2 m Signal reflects off buildings, water, or terrain before reaching the antenna
Receiver noise 0.1–0.5 m Thermal noise and resolution limits in the receiver electronics
Geometry (DOP) multiplier Poor satellite spread amplifies all other errors

The single largest error for a single-frequency receiver is the ionosphere. As the signal passes through the ionosphere — a layer of charged particles 50 to 1,000 km up — it slows down by an amount that depends on the electron content along the path, which varies with the time of day, the season, and the solar cycle. The delay is also dispersive, meaning it affects different frequencies by different amounts — and that property is precisely what dual-frequency receivers exploit to cancel it. A receiver listening on both L1 and L5 can compare how much each frequency was delayed and solve for the ionospheric contribution directly, removing the largest single error from the budget. Single-frequency receivers instead rely on the Klobuchar model, a set of broadcast parameters that corrects roughly half the ionospheric error on average.

Below that sits the troposphere, where water vapour and air density bend the signal slightly; unlike the ionosphere, this delay is not frequency-dependent and so cannot be removed by dual-frequency tricks, but it is small and well-modelled. Multipath is the urban-canyon curse: a signal bouncing off a glass tower arrives a little late and corrupts the measurement, which is why your blue dot jitters between skyscrapers. And geometry — dilution of precision, or DOP — acts as a multiplier on everything else, getting worse when the visible satellites are bunched together. A DOP near 1 means excellent geometry; a DOP above 6 means the visible satellites are poorly placed and even good range measurements will produce a fuzzy fix.

GPS error source chain from satellite to receiver

Figure 3: Errors accumulate along the signal’s path. Satellite clock and ephemeris residuals leave the spacecraft already imperfect; ionospheric delay is the largest single contributor for a single-frequency receiver; tropospheric delay, multipath reflections, and receiver noise add their own slices; and the satellite geometry (DOP) multiplies the whole budget. The result is a typical horizontal error of three to five metres for a basic consumer fix.

Why Precision Is Hard: The Relativity Correction

Here is where GPS stops being clever engineering and becomes a daily, operational proof that Einstein was right. The atomic clocks on the satellites do not tick at the same rate as identical clocks on the ground, and the discrepancy is large enough that, uncorrected, it would make GPS useless within hours.

Two relativistic effects pull in opposite directions. From special relativity, the satellites are moving fast — about 14,000 km/h relative to the ground — and moving clocks tick slower. This time dilation makes each satellite clock lose roughly 7 microseconds per day relative to a ground clock. But from general relativity, the satellites sit higher in Earth’s gravitational well, where gravity is weaker, and clocks higher in a gravitational field tick faster. This gravitational effect makes each satellite clock gain about 45 microseconds per day.

The two effects do not cancel. Adding the gravitational speed-up (+45 µs/day) to the velocity slow-down (−7 µs/day) leaves a net +38 microseconds per day by which each satellite clock runs fast relative to the ground. That sounds trivially small until you remember the speed-of-light arithmetic from earlier: 38 microseconds of timing error corresponds to 38 × 10⁻⁶ s × 3 × 10⁸ m/s ≈ 11.4 kilometres of ranging error. Per day. The system would accumulate roughly 10 kilometres of position error every single day if relativity were ignored — your blue dot would walk off the map before lunch on day two.

It is worth pausing on how counterintuitive this is. The velocity effect and the gravitational effect are not rounding errors that engineers grudgingly account for; they are first-order, dominant terms that the system’s designers had to bake into the hardware before the first satellite ever flew. During the early development of GPS in the 1970s, there was genuine debate about whether the gravitational frequency shift would actually appear at the predicted magnitude. The synthesizer that drives the satellite clock frequency was built with the relativistic offset switchable, so that if the effect turned out to be absent the correction could be disabled. When the satellites reached orbit and the effect appeared exactly as general relativity predicted, the correction was switched on and has stayed on ever since. Every navigation fix computed since is, in a very direct sense, a continuously running experiment that confirms Einstein’s theory to the precision your dashboard depends on.

GPS relativity correction logic

Figure 4: Special relativity slows the moving satellite clocks by about 7 µs/day; general relativity speeds them up by about 45 µs/day because gravity is weaker at altitude. The net effect is +38 µs/day. Engineers correct it by manufacturing the satellite clocks to tick at a slightly slow rate before launch — 10.22999999543 MHz instead of a nominal 10.23 MHz — so that once in orbit they run at exactly the right rate as seen from the ground.

The correction is wonderfully concrete. Before launch, engineers deliberately set each satellite’s clock to run slightly slow — at a frequency of 10.22999999543 MHz instead of the nominal 10.23 MHz — so that once relativity speeds it up in orbit, it ticks at exactly the right rate as observed from the ground. A residual periodic correction (from the slight eccentricity of each orbit) is also applied in the receiver. GPS is, in this sense, the most widely used confirmation of general relativity on the planet: a billion devices depend on the +38 µs/day fix being exactly right, and it is.

Practical Takeaways

The blue dot is the visible tip of a deep stack of physics. A few things follow directly from how the system works, and they explain a lot of everyday GPS behaviour.

  • A clear view of the sky matters more than signal strength. Because GPS needs four well-spread satellites, an open sky beats a strong signal in one direction. This is why fixes degrade indoors, in tunnels, and in urban canyons.
  • Dual-frequency receivers are dramatically more accurate. Comparing the same signal on L1 and L5 lets the receiver measure and cancel the ionospheric delay — the largest error source — directly. Many phones since 2018 support dual-frequency GNSS.
  • Augmentation gets you from metres to centimetres. Satellite-Based Augmentation Systems (SBAS) like WAAS in North America and EGNOS in Europe broadcast correction data that cuts error to roughly a metre. Differential GPS (DGPS) and Real-Time Kinematic (RTK) use a nearby reference station to reach centimetre accuracy. Precise Point Positioning (PPP) achieves similar precision globally without a local base, given convergence time.
  • Multi-constellation is why modern fixes feel instant. Tracking GPS, GLONASS, Galileo, and BeiDou together means more satellites in view, better geometry, and faster, more reliable fixes.
  • Your phone cheats to get a fast fix. Assisted GPS (A-GPS) downloads ephemeris and almanac data over the cellular or Wi-Fi network instead of waiting 12.5 minutes for the slow 50-bps stream, cutting a cold start from minutes to seconds.

If you remember one thing: GPS is a timing system that happens to produce positions. Everything hard about it — the atomic clocks, the relativity correction, the nanosecond stopwatch — exists because distance is measured as time, and time at the speed of light is unforgiving.

Frequently Asked Questions

Why does GPS need exactly four satellites?

Three satellites would be enough if your receiver had a perfect clock, because three distance measurements pin down three unknowns: latitude, longitude, and altitude. But consumer receivers use cheap quartz clocks that drift, adding a fourth unknown — the receiver’s clock bias. The fourth satellite supplies the fourth equation needed to solve for that bias along with position, which is why four is the minimum for a 3D fix. With only three satellites you can get a 2D fix if you assume a known altitude.

Does GPS work without an internet connection?

Yes. GPS positioning is entirely one-way and passive — your device only listens to satellite broadcasts and never transmits, so it needs no internet to compute a position. What the internet (or cellular) connection provides is Assisted GPS data and map tiles: A-GPS speeds up the initial fix by downloading orbit data, and map apps need data to draw the streets around your dot. The raw position itself comes purely from the satellites.

How accurate is GPS really?

A modern smartphone using a single frequency typically achieves three to five metres of horizontal accuracy under open sky. Dual-frequency receivers and augmentation systems like WAAS bring that to around a metre. Survey-grade RTK and PPP systems reach centimetre accuracy. Accuracy degrades in urban canyons and under tree cover because of multipath and blocked satellites, and vertical (altitude) accuracy is always roughly two to three times worse than horizontal because of geometry.

What is the relativity correction in GPS?

Satellite clocks run fast relative to ground clocks by about 38 microseconds per day — a combination of special relativity (velocity slows them by 7 µs/day) and general relativity (weaker gravity speeds them up by 45 µs/day). Uncorrected, this would cause roughly 10 km of position error per day. Engineers correct it by setting the clocks to tick slightly slow before launch and applying a residual orbital correction in the receiver.

Can GPS be jammed or spoofed?

Yes, and this is a real vulnerability. Because the signals are extremely weak by the time they reach the ground, a modest local transmitter can jam them, denying positioning over an area. Spoofing — broadcasting fake signals to trick a receiver into computing a false position — is harder but documented. Modern receivers and the encrypted military signals include anti-jam and anti-spoof measures, and multi-constellation receivers are harder to fool because an attacker must spoof several systems at once.

Why does my GPS take longer to lock on sometimes?

The delay depends on what data your receiver already has. A “hot start” — recent ephemeris and a known rough position — fixes in seconds. A “cold start” after the device has been off for days, or has travelled far, requires downloading fresh orbit data, which over the slow 50-bps satellite link can take 30 seconds to several minutes. Assisted GPS shortcuts this by fetching the data over the network, which is why your phone usually locks on almost instantly.

Further Reading

By Riju — about

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *