
The basic idea — trilateration, not triangulation
Each GPS satellite broadcasts a continuous signal that says, in effect, 'I am satellite #17, my position is X, my onboard atomic clock reads T.' Your receiver knows the speed of light. It compares the satellite's timestamp with its own clock, multiplies the difference by the speed of light, and gets a distance to that satellite.
One distance puts you on a sphere. Two distances narrow it to a circle. Three distances narrow it to two points (one of which is in space). A fourth satellite resolves the ambiguity and corrects your receiver's clock error, which is the trick that makes the whole system work on cheap consumer hardware.
Why your phone doesn't need an atomic clock
An atomic clock costs more than a car. Your phone has a $0.20 quartz oscillator. The clever part of GPS is that the receiver treats its own clock error as a fourth unknown and solves for it using the fourth satellite. The math falls out as four equations in four unknowns (x, y, z, t).
The relativity correction
GPS satellites orbit at 14,000 km/h. Special relativity slows their clocks by about 7 microseconds per day. They also sit 20,000 km above Earth in weaker gravity, which speeds them up by about 45 microseconds per day. Net: their clocks run 38 microseconds per day faster than ground clocks. Uncorrected, GPS would drift by 10 kilometres a day. The correction is baked into the satellite firmware.
Civilian vs military precision
Civilian GPS is accurate to about 3-5 metres horizontally with a clear sky view. Survey-grade GPS using differential techniques reaches centimetre accuracy. Military P(Y) code is encrypted and gives sub-metre precision. Modern phones combine GPS with GLONASS (Russia), Galileo (EU), BeiDou (China) and inertial sensors for indoor estimates.
The Almanac and the Ephemeris
To calculate its position, your receiver must know exactly where each satellite is at any given nanosecond. This process relies on two distinct sets of data: the almanac and the ephemeris. The almanac provides coarse orbital data for every satellite in the constellation and is valid for several weeks, allowing your phone to predict which satellites should be overhead. However, the ephemeris is much more precise, offering highly accurate orbital parameters specific to a single satellite. This data is transmitted in a 30-second loop and is only valid for a few hours. This explains why a 'cold start' takes longer; the receiver must wait to download the full ephemeris before it can achieve a high-precision lock.
The ground segment, managed by the U.S. Space Force, monitors these orbits using a network of globally distributed antennas. As solar radiation pressure and gravitational variations from the Moon and Sun pull the satellites out of their ideal paths, ground stations calculate the drift and upload 'navigation messages.' These updates ensure the ephemeris data remains accurate. Modern receivers utilize Assisted GPS (A-GPS) to skip this slow broadcast by downloading the ephemeris via cellular data, reducing the Time to First Fix (TTFF) from nearly a minute to just a few seconds.
Carrier Phase and Dual-Frequency Upgrades
Traditional GPS relies on the coarse/acquisition (C/A) code, which has a chipping rate that limits precision to about five or ten meters. This is because the receiver is essentially measuring the timing of the transition between 'bits' in the data stream. High-precision survey equipment and modern smartphones now use 'carrier phase' tracking. Instead of looking at the low-frequency data code, the receiver measures the individual peaks of the 1.5 GHz radio wave itself. Because the wavelength is only 19 centimeters, comparing the phase of the carrier wave allows for positioning accuracy measured in centimeters rather than meters.
Atmospheric interference remains the largest source of natural error, specifically the ionosphere's tendency to refract radio signals. Historically, only the military had access to two different frequencies (L1 and L2) to cancel out this refractive delay. Today, the new L5 frequency provides civilian devices with the same capability. By comparing how two different frequencies slow down through the ionosphere, a dual-frequency receiver can calculate the exact atmospheric delay and subtract it. This advancement is critical for autonomous vehicles and drone delivery systems that require decimeter-level reliability in dense urban environments.
The Ionospheric Delay — Why the atmosphere slows down light
While light travels at a constant 299,792,458 meters per second in a vacuum, the Earth’s ionosphere acts as a variable medium. Between 60 and 1,000 kilometers above the surface, solar radiation creates a layer of ionized gas that slows down GPS signals. This delay is not uniform; it changes based on solar activity, the time of day, and the angle of the satellite. To an unassisted GPS receiver, this slight lag appears as a distance error of several meters. Modern dual-frequency receivers solve this by comparing the L1 and L5 signals, as lower-frequency waves are delayed more significantly than higher ones by the same ionized particles.
To mitigate this for single-frequency devices, the GPS broadcast includes the Klobuchar model. This is a mathematical approximation of the ionospheric state sent within the navigation message. The receiver uses eight coefficients to estimate the delay based on its approximate coordinates and the time of day. While this model eliminates about 50% of the ionospheric error, professional surveying equipment often relies on Satellite-Based Augmentation Systems (SBAS) like WAAS or EGNOS. These systems use ground stations to measure the actual live delay and broadcast a real-time correction to receivers, bringing accuracy down from meters to centimeters.
The PRN Code — Finding a signal below the noise floor
GPS satellites broadcast at a relatively low power—roughly equivalent to a 50-watt lightbulb. By the time that signal reaches Earth from 20,000 kilometers away, it is significantly weaker than the background cosmic microwave radiation. To the human ear or a standard radio, it would sound like static. The secret to extracting data from this noise is the Pseudo-Random Noise (PRN) code. Each satellite is assigned a unique Gold code, a long sequence of ones and zeros that repeats every millisecond. Your receiver generates an identical internal copy of this code and slides it back and forth in time until it perfectly matches the incoming signal.
This process, known as correlation, provides the signal-to-noise gain necessary to lock onto the satellite. It essentially 'pulls' the signal out of the noise. This is also why GPS chips can be so power-hungry; the receiver must constantly perform millions of correlation checks to stay locked. Because each satellite has its own unique PRN code, multiple satellites can transmit on the exact same frequency without interfering with one another—a technique called Code Division Multiple Access (CDMA). This was a revolutionary departure from traditional radio, which required separate frequencies for every broadcaster to avoid overlapping static.