The Global Positioning System (GPS) is a system of orbiting satellites, ground control stations and a set of standards that allow users on the Earth (and flying over it) to accurately determine their position, and in extremes even their course, speed and attitude. How does it work?

Glad you asked. :-) Welcome to GPS 101. (Note: This writeup describes 'original GPS.' GPS III, authorized in the year 2000 and projected to begin launching in 2014, changes the capabilities of the satellites significantly but the system should remain backward-compatible with older receivers.)

What exactly is GPS?

From http://www.fas.org:

The GPS consists of the space, control, and user equipment segments..

The GPS space segment consists of 24 satellites operating at semi-synchronous altitude in six orbital planes. The satellites contain atomic clocks and processors to minimize the extent of ground contact necessary to maintain accuracy. This feature minimizes military vulnerability but increases the relative cost of the satellites over simple transponder systems. GPS satellites also host sensors and communications packages for a Nuclear Detonation Detection System. Operational satellite subsystems are designed to last for 7.5 years leading to a statistically estimated satellite life of 6 years. These factors are important in determining the cost of GPS satellites and the frequency with which they must be replaced to maintain minimum basic system availability requirements.

All GPS satellites are operated from a control segment with a Master Control Station (MCS) at Falcon Air Force Base, Colorado, and a worldwide network of five signal monitor stations and three uplink ground antennas. A fourth antenna is available but generally used only for ground checkout of satellites prior to launch. The monitor stations collect and send GPS navigation signal data to the MCS for evaluation and determination of any corrections required to the navigation packages onboard each satellite. Corrections to individual satellite atomic clocks or orbital parameters are relayed from the MCS to the satellites via the ground antennas. The MCS also monitors normal satellite telemetry via separate downlinks to assess state of health of other satellite subsystems such as power, thermal balance, and attitude. The control segment is sized to accommodate up to three contacts per satellite per day to maintain system accuracy requirements. At present, two contacts per satellite per day are the norm. However, older satellites or satellites with control problems require more contacts to maintain optimum performance.

To meet minimum operational requirements, the DOD will operate a 24-satellite constellation to ensure 21 satellites are available 98 percent of the time. The cost of sustaining minimum GPS services, once the complete constellation is established, is approximately $400 million per year (FY1993 dollars). This cost is driven by the acquisition costs of satellites ($30-$40 million each) and boosters ($30-$40 million each), and by the launch costs ($15-$20 million per launch). At current estimates of satellite life on-orbit, somewhere between three and four launches per year will be required to sustain minimum GPS availability. The present satellite design fully uses the capabilities of an enlarged Delta II booster for launch into semi-synchronous orbit. Higher altitudes or heavier satellites would require more expensive boosters and launches. The cost of control segment manning and worldwide maintenance (software and hardware), as well as provision for future MCS upgrades or changes to satellite data interfaces, is approximately $30 million per year.

Where did it come from?

In the early 1970s, the DOD began developing the GPS as a space-based pos/nav system to provide precise, three-dimensional position, velocity, and time; to reduce vulnerability to attack over existing land-based navigation systems; and to provide users with increased freedom from detection. GPS signals are continuously available on a worldwide basis, at any altitude, and in any weather. The satellites which supply the navigation message and precise time, the basis of the GPS concept, are located 11,000 nautical miles above the earth in a widely dispersed constellation. To access the system, users have only to turn on a GPS receiver, like a normal radio, with the antenna exposed to the sky.

Though GPS was developed as a military system and, therefore, did not include specific civil requirements in its contractual design specifications, civil use of GPS has been an implicit consideration since its inception. Civil use has played a significant role in the development of policies under which GPS is operated and made available by the DOD, driven largely by GPS support to civil aviation and maritime navigation.

In 1978,DOD and DOT began formal joint planning to reduce the need for many land-based radionavigation systems used for military and civil applications. In 1983, following the downing of Korean Airline Flight 007, President Reagan directed that the DOD-operated GPS be made available by the DOT for international civil use. Subsequently, the DOD formally requested that the DOT assume responsibility for interfacing with the civil community and work closely with the DOD to ensure proper implementation of GPS for civil use. Several DOD/DOT agreements have been established for this purpose.

Based upon recommendations of the International Civil Aviation Organization (ICAO) Special Committee on the Future Air Navigation System and to further the development of the ICAO Communications, Navigation, and Surveillance/Air Traffic Management system concept, the U.S. decided to make available the Standard Positioning Service (SPS) of the GPS at the Tenth Air Navigation Conference in September 1991. The U.S. offer at the Tenth Air Navigation Conference was: "SPS is planned to be available beginning in 1993 on a continuous, worldwide basis with no direct user charges for a minimum of ten years. The service will provide horizontal accuracies of 100 meters (2 drms - 95% probability) and 300 meters (99.99% probability)." In September 1992, at the 29th ICAO Assembly, the U.S. extended the 1991 offer and offered SPS to the world for the foreseeable future and, subject to the availability of funds, to provide a minimum of six-year advance notice of termination of GPS operations or elimination of the SPS.

Okay, but how does it work?

That's the fun part. At its simplest level, GPS works through the application of all those trigonometry functions that you desperately tried to cram into your head for that secondary school exam, only to lose gleefully an hour after it was done. Okay, here we go.

The satellites (the space segment) each continuously broadcast a set of signals. They have funny names. They are transmitted on two frequencies:

  • L1 = 1575.42 MHz (C/A code, HOW, SA + P(Y) code)
  • L2 = 1227.60 MHz (P(Y) code)

More on these signals in a moment. Let's stick to abstracts. Each satellite knows precisely where it is. Earlier model satellites (Through Block-IIA) are told where they are by ground control; later models (Block-IIR,IIF etc) can figure it out for themselves. Where it is means it knows where it is in relation to the earth in three dimensions. In addition, each satellite has an atomic clock inside of it.

Each satellite continuously broadcasts a navigation message containing its own known position, the current atomic time, system status, etc. and also sends a pseudorandom navigation stream. GPS receivers use these to determine their location. Your GPS receiver will get this information (on a constantly updating basis) from as many satellites as it can 'hear' from its current position. The constellation's positioning means that at any moment anywhere in the world enough satellites should be above the horizon to navigate with. To determine its location, it needs to determine its distance (precisely) from each of the satellites, and then triangulate several signals.

To determine its distance from the satellites, it needs to determine how long it takes the radio signal to get from each satellite to the receiver's antenna. Here's how this works. Each satellite is sending its own current time, status and position in a nav message as well as a pseudorandom-based pseudo-range navigation (PRN) signal. A pseudorandom stream is a stream of numbers which is random from moment to moment, but which is based on a random seed so that if the function that generates it is given the same seed it will always produce the same stream of numbers. (It works, really. Think about it for a few minutes if you need to. Until you buy this, nothing will make sense). The signal is called 'pseudo-range' because it remains uncorrected for clock bias.

Now, your receiver gets a nav message and a PRN signal from the satellite. It uses the precise time to produce an identical random seed to the one the satellite is using. It then begins to generate the same stream of numbers inside the receiver as the satellite is generating and sending. But wait! Speed of light delay means that the stream of numbers inside the receiver will be slightly ahead of the stream of numbers coming from the satellite, because the latter are based on an atomic time that's slightly old - as old as the time it took the signal to get from the satellite to the receiver.

Now, the receiver begins to try to match the PRN stream in its innards to the one coming in from the satellite, essentially by 'sliding' it up and down in time and looking for a pattern match. Once it find the match (i.e. both streams are exactly synchronized) it can tell by measuring the offset time from its original stream exactly how long the delay between satellite and receiver is. Thus, it now knows precisely how *far* it is from that satellite (but not in what direction). this gives the receiver an imaginary spherical surface of possible location points, any one of which could be its current location.

It then repeats this process with a second satellite. It now has two overlapping spheres of possible points. The intersection of two spheres is a circle; so the receiver must be located somewhere on that circle. When it does this with a third satellite, it reduces the potential locations to the intersection of three spheres, which is a set of two possible location points. One of the locations is logically impossible (because it's above the satellite constellation, off in space) and the system is smart enough to discard that - which leaves it with one possible location, which is where you are!

Wait! I can hear you cry. Just a minute! How can the receiver know the time delay from the satellite clock signals if it receives the atomic time message and the PRN at the same time? They're both delayed by an unknown amount! Absolutely right, you caught me. In fact, you need four satellites to determine your position in three-space, since you need four terms to solve an equation with three unknowns. In this case, even though there?s a clock in the receiver, it's not nearly accurate enough to use for navigation purposes; therefore, the receiver must update the clock from the satellites frequently. So the unknowns here are: Positions in X, Y and Z axes and current time, expressed as the offset between the receiver clock and the current system 'GPS time'.

note: dmd asked me for a clarification of this bit, charitably failing to mention that it was most likely my writing that caused confoozlement. Here's my reply, for completeness' sake.

Okay, so we have each satellite sending out a navigation signal. This signal contains:
  • The satellite ID
  • The satellite orbital ephemeris data (orbit description)
  • The satellite's current position
  • The satellite's atomic clock time at the moment the message was generated (the above in 'weeks etc. since GPS Time start, which is sometime in 1980 I believe)
  • A pseudorandom 'frame' of one millisecond length. This is essentially the L1 microwave carrier, modulated by a 1023-bit PRN code, called the C/A code for Coarse Acquisition, that is unique to the satellite. This results in a one MHz modulated signal.
  • A pseudorandom frame of around seven days in length. Both the L1 and L2 carrier freqs are modulated by a seven-day PRN code called the P-Code (Precise).
  • A Navigation message, which is a 50-Hz signal modulating the L1-C/A signal. It contains data bits which make up system messages.

The receiver has a clock in it. It's going to have a bias attached. So what the receiver does is it takes one satellite and uses its time signal to set the clock. This assumes that it doesn't have a recently-calculated position and time bias; this is what it's doing when it's initializing the receiver at power-on. Then it figures out the delay from each satellite by taking an internally generated PRN frame or 'chip' for that satellite and sliding that frame and the incoming signal together until they phase lock. From this, it can determine the delay between the time the signal was sent and the time it was received with fairly good precision. this is called a 'pseudo-range' because that acknowledges the clock slew in the receiver.

Then it does this for two other satellites. It then has a pseudo-range to each of those three satellites, and the timestamps at which that range was measured. It knows where the satellites were at that time by calculating their positions based on their orbital data send in the nav messages.

All of these three pseudo-ranges are off by the same amount - the clock bias of the receiver away from the universal time, or 'GPS time.' This delay is, in this case, the the time delay taken for the signal from that first sat to reach the receiver. Once it has that 'pseudo' three-d location where the range from the three position sats intersect, it can figure out that there is only one possible range for the fourth satellite; ergo, it knows the time bias and applies it. Et Voilà, it now has a corrected 3d position - and, as a bonus, the correct 'GPS Time' for the system. GPS Time is a "paper clock" ensemble of the Master Control Clock and the satellite clocks. GPS Time is "....measured in weeks and seconds from 24:00:00, January 5, 1980 and is steered to within one microsecond of UTC. GPS Time has no leap seconds and is ahead of UTC by several seconds."

If we could put an atomic clock in the receiver, then all we'd need would be three satellite signals. Using our local atomic time reading, we could determine our distance to each satellite. Since we can't do that, we use an extra satellite signal to figure out what time it is. Think of it as triangulating yourself in three dimensions - plus in time. Thus, with four satellite signals, all is well - you have your location and (as a bonus) the correct atomic time. This works because the satellites are sending their orbital data as well; therefore, the receiver can determine its position in x,y,z and time using these methods. Once it has a three-signal XYZ position estimate, it matches that position with a fourth satellite's time signal. Physics tells us that the XYZ position we have measured can only match up with the fourth time signal at one precise time moment; thus, we know what time it is.

Now, it's possible to cheat, which is why most GPS receivers will tell you that only three satellites are needed to determine position. The 'cheat' is to simply assume a sea-level altitude, which limits your position to a sphere of possible points around a 'perfect' Earth's surface. For some applications (boating, especially) this is a perfectly valid assumption, and for many others, the loss of precision isn't terribly important (hiking, for example). Typically, higher precisions are required for airborne applications, such as aircraft navigation, and aircraft have much less trouble getting clear line of sight to four or more satellites. If an aircraft has an accurate altimeter, then that value can be 'assumed' in this case also.

Whew. Hyper cool, no? Realize that the system has to be able to determine the timing difference in a signal if you move the system's minimum resolution distance. In other words, it has to deal with intervals of time as small as the time it takes radio waves to travel, say, a meter. Cheaper receivers have larger 'error' because they can't time things as finely.

How accurate is this thing?

To quote from the above FAS report: "The U.S. offer at the Tenth Air Navigation Conference was: "SPS is planned to be available beginning in 1993 on a continuous, worldwide basis... The service will provide horizontal accuracies of 100 meters (2 drms - 95% probability) and 300 meters (99.99% probability)."

There are means of making GPS more accurate. There are many potential sources of error, ranging from deliberate error introduced by those dastardly military folk (although that's no longer done in peacetime as a matter of policy, as of around May 2000) to atmospheric scattering/bending of the radio signals, to position error on the part of the satellites. The most popular means of reducing error is to use Differential GPS (DGPS). See that node for details.

According to the U.S. Air Force: "...time can be figured to within 100 nanoseconds, velocity can be figured to within a fraction of a mile per hour and location can be figured to within meters."

There are two different levels of accuracy that are generally referred to when describing GPS receivers - code-phase accuracy and carrier-phase accuracy. The former means that the receiver syncs the PRN nav code as best it can - and the limits of electronics tech means that that is within 2% or so of true. Since the PRN signal has an effective frequency of 1 MHz, as described earlier, this means that the receiver can get to within 2% of a microsecond's accuracy on each signal. Working out the math, that means a signal error of the full microsecond cycle is approximately 300 meters; 5% of that is around 15 meters. So code-phase accurate receivers can generally produce a result within 6 meters (some more expensive units can do better, and DGPS and the like will shrink this as well).

Carrier-phase accuracy is generally used in surveying instruments or more expensive navigation instruments since it requires additional circuitry and greater precision. A carrier-phase receiver will first sync to code-phase accuracy like all other receivers, which gets it to within approximately 2% of a microsecond, or 1/50,000,000 seconds. Then it stops looking at the modulated PRN nav signal, and begins to look at the carrier frequency which it is being sent on. GPS sends over a frequency of 1.575 GHz, which means the carrier cycles 1.575 billion times per second. The carrier-phase receiver then starts attempting to match the carrier phase of the nav signal. If it can do that, it can increase its accuracy by a factor of 1,575 over the 1MHz nav signal! If it can get to within 2% of phase lock with the carrier, a carrier-phase GPS receiver could theoretically reduce its positional error to single-digit millimeters. Some do do this, and manage the trick by requiring inordinately long integration times to settle on a position - which is why they're mostly used for surveying.

Who pays for this?

The U.S. taxpayer, via the U.S. DOD and DOT. Costs to maintain the system run around $400 million US/year, as described above. Receivers cost money to purchase, but just like popular AM and FM radio, the signals are free to receive to anyone on the planet. One of the more extreme examples of provision of a common good.

But won't bad people use it to build cruise missiles? What's it for?

New uses are dreamed up every day. The obvious is navigation - where am I? It's used when hiking, driving and flying to find one's way around. It can be used in devices to report their location to a listener; trucks can now mount GPS-enabled transponders to send their current position to the home office via satellite (although, to be clear, the communication back does not involve the GPS system but other, dedicated satellite systems - GPS just tells the device its current location). Surveyors use it. In one extreme, a demonstration project showed a model aircraft flying itself purely by GPS - not just for position, but for attitude! The difference in the GPS readings at the end of each wing, the nose and the tail told the airplane how it was 'tilted' relative to the ground at any point. It can take off, fly a set course and land itself.

The benefits of GPS (better aircraft navigation and autopiloting, safer boating, never being so lost you're forced to eat at Bob's Big Boy restaurant on the highway) are many and varied. And to be safe, the U.S. government can always (in time of crisis or war or bad hair day) not only re-introduce random or pseudo-random error into the system, but can also selectively deny it to regions of the earth by having the satellites go silent over those parts of the globe.

GPS is one of those technologies which is changing the world around us. Our children may never be able to understand the term 'lost' when every watch, phone, etc. has a GPS receiver in it. Entire receivers are routinely made for research (the model plane above) and military use that are the size of a U.S. dime.

So what're each of those signals, anyway?

These are the three PRN signals (PseudoRandom Navigation):

  • The coarse/acquisition (C/A) code has a 1.023 MHz chip rate, a period of 1 millisecond (ms) and is used primarily to acquire the P-code. This is the code used by civilian receivers, which was typically degraded by the DOD; military users have receivers which can 'see through' the degradation to get the P-code.
  • The precision (P) code has a 10.23 MHz rate, a period of 7 days and is the principal navigation ranging code.
  • The Y-code is used in place of the P-code whenever the anti-spoofing (A-S) mode of operation is activated. It is created by applying encryption to the P-code.
In addition, each satellite transmits a navigation message containing its orbital elements, clock behavior, system time and status messages.

Things to know when you buy a GPS:

GPS devices have become inexpensive consumer electronics devices. One can be bought for under US$200, making them quite available. While it is somewhat exhilarating to think I can never be lost again!, there are a few things a future GPS owner should be aware of:
  • GPS tells you where you are. That's totally different from being a master outdoorsman. Unfortunately, the former capability may lead you to overestimate your abilities in the latter department. When planning trips, always be prepared for the possibility that your GPS could malfunction (e.g. get wet or run out of batteries). Are you prepared?
  • Once you buy a GPS you do not "pay extra" to receive the signal. There is no monthly fee. The United States Military budget pays for GPS.
  • GPS devices are signal receivers. They are not transmitters per se. However, they do contain electronics, which emit RF signals as "noise" when they operate. Some airlines do not permit use of GPS devices.
  • Mapping software is really neat. But be aware that outside major metropolitan areas, the maps can be years out of date or have large errors in geography.
  • Maps are expensive. Some maps (e.g. Mapsource) cost as much as a cheap handheld (e.g. eTrex).
  • GPS signals used to be corrupted via something called Selective Availability. This is a US Military thing, intended to reduce precision. Bill Clinton got rid of SA in May 2000, but it's always possible that it might return.
  • With a handheld or boating GPS you will probably never see accuracy better than 15 feet or so. If SA were enabled, the error would be much greater.
  • Accuracy depends on the number of satellites visible to the GPS. In a major metropolitan area, buildings can obscure a clear view of the sky. In a wooded area, trees can obstruct clear reception of satellite.
A list of features to look out for on a GPS
  • PC connectivity is a great feature. You can plug your GPS into a laptop and get real time map plotting. Or you can download a route after travelling.
  • Differential GPS or WAAS connectivity to improve accuracy
  • Mapping ability is very nice, particularly if the map memory can be upgraded/changed.

Mathematics of Global Positioning System

The basic mathematical idea described in terms of simple English goes something like this. First of think in two dimensions. We have three satellites represented as circles with known center coordinates and unknown radius. The point where the circles intercept will be our position. The radius is unknown since GPS receiver clocks are inaccurate. We thus want to solve the coordinate where the circles intercept as well as a time correction factor. To appreciate the importance of correcting for time one only need to remember that light travels around Earth several times in one second. Newtons method for solving systems of variables is one way of finding a solution to our position. This method has the advantage of quadratic convergence. For the real thing we need to think in three dimensions. Each satellite is represented by a sphere, we need four spheres to reduce the intercept to a point.

The actual mathematics go as follows. For each satellite we have an equation of the form:

(x1 - sxn)2 + (x2 - syn)2 + (x3 - szn)2 + c2(sdn - x4)2 = 0

sx, sy, sz and sd differs for each satellite, they represent the thee coordinates and measured time delay respectively. c is the speed of light. We need to solve our position; (x1, x2, x3) as well as the error in the receiver clock x4. That can be done with the following algorithm:

  1. Arrange the satellite equations into a system Sn,j(x) with (n,j) = 1 ... 4. If we have five equations we can contruct a Coefficient Matrix by subtracting one of the equations from the rest.
  2. Make an initial guess for position (x1, x2, x3) and time correction factor x4. Choosing position at the origin and correction so as not to cause any negative delays is appropriate.
  3. Calculate the Jacobian Matrix Jn,j for Sn with (n,j) = 1 ... 4, more equations result in an overdetermined system. There are 24 satellites in both the GPS and GLONASS systems.
  4. Solve the n by n Linear System J y = -S for vector y, where we have substituted into S(x) our initial guess for x.
  5. Update the variables: x = x + y.
  6. Check for convergence, xnew2 - xold2 < tolerance, otherwise return to step two.

On completion you know not only your position, you may update your clock as well.

Log in or register to write something here or to contact authors.