How GPS Works
There are Global Navigation Satellite Systems (GNSS) springing up everywhere, for use in a very wide range of applications. The only working systems to date are the NAVSTAR GPS here in the US and the Russian GLONASS. Under construction are the Chinese Beidou and European Galileo, and systems for Japan and India. These systems all use a set of satellites, from which GPS receivers on land, air, and sea, can be used to determine their position from timed signals from their satellites (shown here in a picture by AOPA). But how does that work?
Basically, you need to determine your exact distance from 4 satellites, and their exact location when they send a scheduled signal. Your receiver can identify individual satellites, knows the schedule for sending these signals, and can determine the time delay of that signal when it is received. Since the signals travel at the speed of light, that time delay can be converted to distance.
Clearly, this requires precise information on satellite orbits and clocks with fantastic accuracy. For example, if we want to determine your position to an accuracy of order 3 meters, you need to know satellite positions to that accuracy. And since light travels at 300 million meters per second, or 0.3 meters in 1 nanosecond (one billionth of a second), clocks must be sufficiently accurate to measure delays with a precision of the order of 9 nanoseconds (ns). The GPS time kept by the system is accurate to about 20 ns, for a maximum accuracy (without WAAS) of about 6 m, but other system errors increase that to about 15 meters (horizontal).
It is possible to find your position from 3 satellites. If you make spheres from each satellite with a radius equal to the distance between you and the satellite, then two intersecting spheres create a circle and you are on it. If you add a 3rd satellite it intersects that circle in two places. One may be way out in space and the other is you. So if you are within a few miles of the surface, not 3,000 miles in space, you know which one is you.
However, there is an advantage in using 4 satellites to determine your three dimensional position with no ambiguity. Then, you have 4 pieces of information and can determine one more variable; that variable is the time the satellite sent the signal. Also, from Doppler measurements of the satellite carrier frequencies, you can determine your velocity, hence the solution is known as the PVT determination; position, velocity, and time.
The Satellite System
Our GPS system initially used a set of 24 satellites (3 spares) in 6 orbital planes, each inclined 55° to the equator. These planes are equally spaced 60° around the equator. There are now 31 satellites in these orbits. The orbital radius is about 26,560 km, compared to an average earth radius of 6366 km. This puts them at about 4 earth radii from the center of the earth, or 20,194 km above earth. Each satellite completes 2 full orbits in 24 hours, while the earth spins around once in the same direction. So from the ground, the satellite completes one sweep of the earth in 24 hours.
The red, blue, and green orbits in the picture below are at right angles to each other, as are the cyan, magenta, and yellow. On each plane there are 4 satellites orbiting with uneven spacing, judiciously chosen. They are not evenly spaced 90° apart, but are 30°, 105°, 120°, and 105°. Cross your eyes until you see a 3-D picture of these orbits between the two pictures. This complex arrangement is designed to ensure that a large number of satellites (varying between 8 and 12) are in view anywhere in the US at any time.
The current Block II satellites broadcast on 2 frequencies, L1 (1575.42 MHz) and L2 (1227.60 MHz). GPS modernization (GPS III) will have a second L2 civilian frequency (L2C) and the L5 (1176.45 MHz) "Safety of Life" frequency. Each frequency is an integer multiple of 10.23 MHz (integers 115, 120, and 154), since that is the basic clock frequency on the satellites.
These carrier signals are modulated to send navigation messages and course acquisition (ranging) codes. On L1, both the civilian course acquisition (C/A) and military precise P codes are sent, while only the P code is sent on L2. (With anti-spoofing turned on, the P code becomes a P(Y) code). The C/A code for ranging is 1,023 bits long, sent at an average rate of 1.023 Mbits/sec and repeated every millisecond. It is called a Pseudo Random Noise (PRN) code, which modulates the satellite signal at apparently random intervals, and is unique to each satellite. Despite that random appearance each satellite PRN is in fact very carefully chosen so that none of them correlates with any of the others, or with a delayed version of itself. Later, we will describe the techniques used by the receiver to identify a satellite and determine the time delay of its signal from these special PRN codes.
The Navigation message is modulated on top of both the C/A and P codes, and sent at the rate of 50 bits per second. The navigation message is sent in 30 sec frames repeated continuously, exactly on the minute and half minute. There are 5 sub-frames of 6 sec each; the first has clock information, subs 2-3 contain the satellite orbit information (ephemeris data), and subs 4-5 have coarse orbit and status data on all the satellites (almanac). It takes 25 frames (12.5 min) to send a complete navigation message. The ephemeris data is updated every 2 hours, and the almanac every 24 hours. These messages allow a GPS receiver to determine the exact location of each satellite when the code is sent.
Satellites now carry 4 atomic clocks (cesium or rubidium) to control the timing of its signals and these are highly accurate. But over time there is a drift in these clocks, and they must be kept in sync. So, a ground monitor and control system is required to determine these changes in timing and orbits and broadcast them to each satellite so that their navigation messages are updated. Satellite GPS times are kept in sync within 2 ns. Part of the clock message is the difference between GPS and UTC times, which are not synchronized. They currently differ by about 20 sec, and the UTC time on your receiver is the satellite GPS time corrected by this amount to UTC. The PVT determination is based on GPS time.
The Ground System
The NAVSTAR system is operated by the Air Force Space Command from facilities around the world. It has a master control station at Falcon AFB in Colorado Springs, and dedicated monitoring stations at Hawaii, Colorado Springs, Cape Canaveral, Ascension Island, Diego Garcia, and Kwajalein. Signals from the satellites are monitored to determine if all clocks are in sync and how the satellite orbits are changing.
There are a number of influences on the satellite orbits. If the earth were a sphere and its mass density uniform, a satellite in a perfect circular orbit would have a constant gravitational pull and stay there if there were no other influences. But, the shape of earth’s MSL surface (a surface of constant gravitational potential) is ellipsoidal so the earth’s gravity force is changing over the orbit. A satellite in circular orbit over the pole (none of the GPS satellites do that) would be 21 km closer to the earth than it is over the equator. So there is an oscillatory component to the gravitational force on the satellite. And there are other forces on the satellite. Along with the varying gravitational forces from the sun and moon, and from solar radiation pressure, these forces cause continual changes in the orbit. If the orbit becomes slightly elliptical some of these forces are exacerbated. So, it is important to observe the orbits and update the navigation messages sent to users.
Satellite orbits are best described in a fixed Inertial reference system with one axis perpendicular to the plane of the orbit around the sun. In this system the earth spins on its axis and orbits the sun. Perturbations to satellite orbits in this reference frame can be calculated and observed. But your position on earth is referenced to an Earth Centered coordinate system, assuming a fixed polar axis, so changes in orbits in the Inertial system must be translated to the Earth system by a coordinate transformation. This transformation changes in time because, among other things, the earth wobbles (about 9 m motion of the pole), and over a much slower time the polar axis itself changes its location (within about a 5 m circle).In summary, a major role of the ground stations is to continuously correct the navigation messages to account for all of these changes and translate between the coordinate systems, so that our GPS receivers know where the satellites are and can compute the PVT solution.
All the magic in locating yourself by receiving signals from the satellites seems to be wrapped up in the C/A ranging codes, or PRN codes. The picture below shows the time variation of the PRN signal for 3 different satellites that modulate the L1 carrier signal. (Each satellite has a unique PRN code).
As mentioned, the bit rate averages about 1 MHz, and the timing of each bit appears random. But their correlation properties are what distinguish them from randomly timed sequences. Take any pair of these signals and determine the product of the two signals (each signal is either a plus or minus 1) at an instant of time. Add up all these answers for every instant of time over the 1,023 bits (mathematically, determine their cross correlation) and the answer should be close to zero (uncorrelated). But do this for two identical codes that are in sync and the answer should be 1 (correlated). Also, if you take two codes that are the same and time shift one of them, the cross correlation is again zero.
These properties allow you to determine what satellite you’re looking at. Specifically, determine the cross correlation of a received signal against all 24 codes stored in the receiver, time shift yours by slewing back and forth in time until you find a peak in correlation with one of them (the other 23 will remain uncorrelated for all time shifts). This identifies the satellite in each of the channels (a typical modern aircraft receiver has 12 channels). It also identifies the time shift required to find the peak value of the correlation of the two identical codes. This time shift is the transit time if your clock is correct.
Converting this delay to a distance using the speed of light gives the so-called pseudorange. It will be in error until your clock error is estimated (as below) and corrections made for the extra delay for the ionosphere and troposphere. When those corrections are made the new estimate is your range to that satellite.
Having identified each satellite in view, you can determine your unique position with multiple groups of 4 satellites (there should nominally be around 9 or 10 in view). One method uses trilateration, using 3 satellites to find your likely position, then comparing the distance from the 4th satellite to one calculated from your 3-satellite solution. There will be a discrepancy in these distances likely due to the receiver clock error (your quartz clock can’t stay in sync with the atomic clocks). So convert that distance to time for an estimate of that error. Apply that clock correction to all received signals and then iterate the PVT calculation with different groups of 4 satellites, time slewing back and forth in time to find a further time correction that minimizes the position differences from among all these different solutions. This gives you your best position estimate (and probable position error) and clock error to be used as a starting point for the next PVT determination. GPS receivers (without WAAS) must compute positions once a second.
So there you have it. Using PRN codes you can find your PVT solution, update your clock, and estimate your position error. You can also identify an unreliable satellite based on the range to that satellite compared to the range based on your position solution. If the difference is too large it is considered unreliable. Fault Detection (FD) requires 5 satellites to determine if one of them is unreliable based on the pseudorange measurements from all of them. With 6 satellites in view you can exclude the unreliable one, known as Fault Detection and Exclusion (FDE).
System Errors and Corrections
Before using the satellite clocks, general relativity must be taken into account. The physics of general relativity states that space-time is warped in the presence of massive bodies (the earth) with the result that clocks run slower as they are brought closer to that body. Satellite clocks at 4 earth radii are influenced less than the same (atomic) clock running on the surface of the earth. So the atomic clocks on the satellites must be slowed down to stay in sync with clocks in your GPS receiver. The frequency is reduced from 10.23 MHz by 4.547 milli-Hertz (a half a part in one billion) to stay in sync with earth clocks. While small, the error if not corrected would accumulate to a 38 ms advance per day, or a distance error of 10 km.
Special relativity dictates a further slowing of the clock since the satellite speed is high (clocks slow down when they speed up). That correction is only about 15% of that from general relativity.
To minimize the PVT calculations a number of issues need to be addressed. The biggest source of error in the PVT calculation is the extra time delay when signals pass through the ionosphere of charged particles, and through the troposphere with moisture. Water slows the speed of light by a factor of about 9, so moisture in the troposphere can add time delay to the signal arrival. More important is the ionosphere with electrons produced by solar activity. At night the electron density is significantly lower than during the day, so a day/night model of the ionosphere is used to determine the typical delay for that layer. The actual extra delay is determined by the total electron content along the path of the signal from the satellite to you, so is greater for a satellite lower in the sky than one overhead. Without such a model the PVT errors would be quite large.
One big advantage of using two frequencies for a PVT solution (as the military does using L1 and L2 for its P(Y) code) is that the added ionosphere delay is frequency dependent. Using two frequencies sufficiently far apart allows you to calculate the actual ionoshpheric delay for the signal path of any satellite and eliminate that error. When the new L2C frequency comes into civilian use that will be done.
Other errors include multipath interference near the ground, and errors in the orbit and time information sent from the satellites despite the updates from the ground stations. Many of the system errors can be reduced significantly by WAAS, which is the subject of another article.
Typical errors from the various sources are: ionosphere ± 5 m, troposphere ± 0.5 m, orbit data ± 2.5 m, satellite clock ± 2 m, and multipath ±1 m. These are not additive, and the actual error probability is less that the total of 11 m.