PHYSICS UPDATE

The global positioning system

Alan J Walton and Richard J Black University of Cambridge,† Department of Physics,‡ Cavendish Laboratory, †Madingley Road, Cambridge CB3 0HE, UK University of , Computing Science Department, 17‡ Lilybank Gardens, Glasgow G12 8RZ, UK

A hand-held global positioning system receiver displays the operator’s latitude, longitude and velocity. Knowledge of GCSE-level physics will allow the basic principles of the system to be understood; knowledge of A-level physics will allow many important aspects of their implementation to be comprehended. A discussion of the system provides many simple numerical calculations relevant to school and first-year undergraduate syllabuses.

For a little over 100 it is now possible to buy a hand-held global positioning system (GPS) receiver which displays the user’s current latitude, longitude, altitude and velocity (speed and compass bearing). Figure 1 shows one such receiver; its operation relies on receiving information from a set of satellites deployed by the US Department of Defense. Typically, the displayed horizontal position is accurate to 100 m and the altitude to 140 m; the system is inherently capable of greater precision, but the current US policy is to impose ‘selective availability’ (SA) which degrades its performance to these limits. Most hand-held receivers will have Figure 1. A typical hand-held GPS receiver (Garmin model 12). many additional features such as automatically displaying the route being taken and allowing waypoints to be entered. Particular models may be optimized for different applications such as hiking, On being shown a GPS receiver, students boating or flying. A GPS receiver and a mobile commonly ask ‘how does it work?’ The phone should perhaps be made compulsory safety purpose of this article is to show that the basic equipment for every school expedition. principles can be understood using only GCSE

Phys. Educ. 34(1) January 1999 37 PHYSICS UPDATE

Figure 2. A schematic (two-dimensional) diagram showing that a signal transmitted at t on the satellite is received at a later time t + 1t on the receiver’s clock. physics. To understand how these principles satellite transmits a signal at, say, 42.0000 s on are implemented calls for A-level physics (and its clock and this signal is received 80 ms later at beyond). time 42.0800 s on the set’s clock, it follows that the receiver is at a distance (a range)ofc1t from the satellite, where c is the speed of light, i.e. at a 8 1 3 7 The basics range of 3 10 ms− 80 10− s 2.4 10 m. To simplify× the discussion× × a little,= × we will To begin with, we will consider a single satellite consider the two-dimensional case shown in in orbit around the Earth. On board is a clock figure 2. If we draw a circle of radius c1t which (for now) we will suppose is identical to— about the satellite’s position when it transmitted and synchronized with—a clock in the receiver. the signal, then we know that the receiver must By this we mean that if the two are placed be somewhere on this circle. To find out where next to one another they will forever keep identical we must perform a similar timing measurement time. As the satellite orbits the Earth, it transmits using a second satellite as shown in figure 3. its current time and position. In practice the The receiver is clearly located where the two position is transmitted in the form of the current circles intercept (there are, of course, two such ‘ephemeris constants’; these specify the equation points, but the one ‘up in the sky’ can be readily of motion of the satellite and allow its current discounted). Rather than deducing the receiver position to be deduced from its current time. To position by means of a compass and scale diagram, put it simply, the satellite is a speaking clock we can (see figure 3) use Pythagoras’ theorem which says ‘My current time is t and my current to interrelate the signalling positions (x1,y1) and position is x,y,z’. This message is received by (x2,y2)of the two satellites, their measured ranges c1t and c1t and the receiver position (X, Y ). a (stationary) GPS set located at some unknown 1 2 This immediately gives position X, Y, Z not at time t—and this is the key 2 2 2 point—but at a later time t 1t. Thus if the (x1 X) (y1 Y) (c1t1) + − + − =

38 Phys. Educ. 34(1) January 1999 PHYSICS UPDATE

Figure 3. A schematic (two-dimensional) diagram showing that the transit 1t 1 and 1t 2 of the signals received from two satellites at known positions (x1, y1) and (x2, y2), respectively, will allow the set’s location to be determined from the intersection of the circles of radii c1t 1 and c1t 2, respectively.

2 2 2 (x2 X) (y2 Y) (c1t2) . on the receiver. In practice the satellites are − + − = These simultaneous equations with their two equipped with highly-stable rubidium and caesium unknowns X and Y can be solved numerically to (‘atomic’) clocks while the receiver makes do with find (X, Y ), the set’s position. a less expensive (and lighter!) quartz clock. This It is not difficult to show that three- means that the clock on the receiver may run fast dimensional navigation demands a minimum of or slow. If fast by δt (this is called the clock bias three satellites (again assuming perfect synchro- error), we must subtract δt from each of the so- nization between the satellite and receiver clocks). called pseudo transit times 1t1, 1t2 and 1t3 to If their signalling positions are (x1,y1,z1), obtain the true transit times required in equations (x2,y2,z2) and (x3,y3,z3) and the measured sig- (1), (2) and (3). This gives nal transit times are 1t1, 1t2 and 1t3, respec- 2 2 2 2 2 tively, then (x1 X) (y1 Y) (z1 Z) c (1t1 δt) − + − + − = − (4) 2 2 2 2 (x1 X) (y1 Y) (z1 Z) (c1t1) (1) 2 2 2 2 2 − + − + − = (x2 X) (y2 Y) (z2 Z) c (1t2 δt) 2 2 2 2 − + − + − = − (x2 X) (y2 Y) (z2 Z) (c1t2) (2) (5) − + − + − = 2 2 2 2 2 2 2 2 2 (x3 X) (y3 Y) (z3 Z) c (1t3 δt) . (x3 X) (y3 Y) (z3 Z) (c1t3) (3) − + − + − = − + − + − = − (6) which can be solved numerically to give the Since δt is unknown there are now four unknowns receiver’s position (X,Y,Z). and only three equations. The problem is resolved by utilizing a fourth satellite at (x4,y4,z4) with a Clock synchronization problems pseudo transit time 1t4, giving

2 2 2 2 2 So far the discussion has assumed that there are (x4 X) (y4 Y) (z4 Z) c (1t4 δt) . identical synchronized clocks on the satellites and − + − + − = − (7)

Phys. Educ. 34(1) January 1999 39 PHYSICS UPDATE

Solving equations (4) to (7) numerically gives run slow’) and for the (opposing) time dilation the receiver position (X,Y,Z). Likewise, it takes attributable to the change in gravitational potential at least three (rather than two) satellites to give between the Earth’s surface and the satellite’s orbit a two-dimensional fix. When the number of as described by general relativity. Their combined satellites in view drops from four to three it is effect, which yields a net increase in clock speed, the altitude which is sacrificed in a receiver (of is allowed for by offsetting the satellite’s clocks no consequence in marine receivers which usually prior to launch. The GPS provides a rare example suppress the ‘altitude’ anyway). It is implicit in of special and general relativity at work in the equations (4) to (7) that c is the same for the mechanical world. signals coming from all four satellites. This is not warranted, since the signals reaching the receiver The signal structure from satellites of different elevation will have to pass through different regions of the ionosphere As has been emphasized, the measurement of and troposphere. The resulting variation in c transit times lies at the heart of GPS. To is allowed for in the receiver in a mathematical measure a range to an accuracy of, say, 30 m model of the ionosphere and troposphere. therefore demands a timing accuracy of 30 m/(3 It is perhaps worth mentioning that the 8 1 7 × 10 ms−) 10− s, or better. The way principles behind GPS—but applied in reverse— that this is accomplished= is explained in figure 4. were in operation in the First World War. By All satellites transmit at the same frequency, but timing the arrival of the shock wave produced as a each has its own unique binary code known as shell left a gun barrel at three microphones located the coarse/acquisition (or C/A) code, consisting at known coordinates, it was possible to deduce the of a pseudo-random sequence of 0s and 1s. gun position (Bragg 1921). The three unknowns The C/A code is 1023 bits long and repeats here—which demand three microphones—are, of every millisecond. Thus each bit (or ‘chip’) has course, the gun two-dimensional coordinates and 3 7 a duration of 10− s/1023 9.77 10− s, its firing time. Using this technique, it was which is some ten times greater= than× the timing possible to locate a gun position to about 45 m. accuracy we would require for 30 m resolution. The receiver generates the same C/A code as that The satellites transmitted by the satellite, but because of the clock bias δt it will not be synchronized with that The American Navstar (Navigational Satellite being produced in the satellite (see figure 4). The Timing and Ranging) GPS system contains 24 received signal will be time-shifted with respect satellites. There are four satellites on each of six to the receiver-generated code by 1t and it is this orbital planes. These planes are inclined at 55◦ which is required in each of equations (4) to (7). with respect to the equator and are equally spaced (The actual signal transit time is 1t δt; see in right ascension. The satellite orbits are close figure 4.) To find the value of 1t the− receiver to circular (to within 2%) with an orbital period time-shifts (‘slews’) the receiver-generated code chosen so that a satellite completes exactly two along the time axis until there is a perfect match orbits while the Earth rotates 360◦ (one sidereal between the two codes. The matching process is day). This ensures that the satellite trajectory on known as cross-correlating. In this process the two the Earth exactly repeats itself twice daily. Given ‘curves’ are multiplied together and the area under that one sidereal day is 23 h, 36 min and 4.0954 s their product is calculated. This area will have a of mean solar time (or told to calculate it) an A- maximum value (shown normalized to unity in the level student should be able to prove that the radius bottom line of figure 4) when the slew time is equal of the satellite orbit is 26 560 km and the orbital to 1t. This procedure allows transit times to be 3 1 speed is 3.877 10 ms−. A GCSE student measured to better than 1/20th of a chip length, i.e. × 7 8 should be able to show that the signal transit time to better than 9.77 10− s/20 4.88 10− s, 1t from an overhead satellite is 67 ms. Although giving a potential× ranging accuracy= of× around 5 a satellite’s orbital speed is only 1.3 10− c,itis 15 m. The C/A code transmitted by each of the still necessary to allow both for the× time dilation satellites is chosen so that their cross-correlation as described by special relativity (‘moving clocks is (near) zero. This prevents the code produced in

40 Phys. Educ. 34(1) January 1999 PHYSICS UPDATE

Figure 4. Showing the processing of the C/A code transmitted by a satellite. Here the clock on the receiver is shown running fast by δt; it thus starts to generate the replica C/A code at a time δt earlier than the clock on the satellite starts to generate its code. The cross-correlation process shown in the bottom line measures 1t and not the true signal transit time 1t δt. − the receiver for, say, satellite 1 mistakenly locking modulo-2 addition of the received signal and the on to the signal received from any other satellite. set-generated C/A code). Since the satellite code repeats every milli- It is worth commenting on how the binary code second, a correlation peak is achieved not only is transmitted. This is achieved by modulating at slew time 1t but at 1t plus an integer multiple a carrier frequency of 1575.42 MHz (derived of 1 ms. Hence 1t is inherently uncertain from the on-board frequency). The by multiples of 1 ms or 300 km. (We have technique used is called phase-shift keying. In this already seen that transit times are at least 67 ms.) type of modulation, the phase of the carrier shifts The additional timing information required to by π rad when there is a shift between binary 0 remove this ambiguity is transmitted from each and 1. satellite to the receiver as a telemetry signal. The telemetry data, which also includes the current Selective availability ephemeris constants, is transmitted at a rate of 1 50 bits s− . It is superimposed on the C/A code by During the initial testing of the C/A GPS, modulo-2 addition. Whenever a binary 1 occurs it was discovered that accuracies of 20–30 m 1 in the 50 bit s− data stream, the addition has were achievable rather than the intended 100 m. the effect of inverting 20 460 adjacent binary bits Presumably to limit the value of the system to in the C/A code (turning the 0s to 1s and vice potential enemies, the US Department of Defense versa). (The 20 460 is, of course, the product introduced selective availability (SA) to limit 6 1 of the chipping frequency (1.023 10 s− ) and positioning accuracy to 100 m horizontally and to × the telemetry period (1/50 s).) A binary 0 in the 140 m vertically. These accuracies are the two data stream leaves 20 460 adjacent C/A code bits standard deviation (2σ) values; as such the user unaltered. The telemetry code is readily removed can be confident that 95% of the readings will lie in the receiver (it can be done in the set by within these limits. Physicists may instinctively

Phys. Educ. 34(1) January 1999 41 PHYSICS UPDATE prefer to quote the 1σ values of 50 m horizontally corrected display can give positions accurate to and 70 m vertically (giving the 68% confidence 1–5 m. Unlike the GPS, which is provided free limits). Selective availability involves ‘dithering’ to users, the DGPS is—in the UK—a commercial the satellite clocks and/or falsifying the ephemeris service with a license fee. (In the UK one provider data broadcast in the satellite telemetry message. broadcasts it from the Classic FM transmitter Since the dithering is different on each satellite, aerials.) Although DGPS is frequently used on this is not the equivalent of changing the common boats and aircraft, we have yet to meet a rambler clock bias in equations (4) to (7). On 29 March using such a set. The degree of accuracy to which 1996 the US President approved a national policy OS maps can be read just does not justify the on the use of the US GPS system. This states enhanced precision available over time-averaging that ‘It is our intention to discontinue the use techniques. of GPS SA within a decade in a manner that allows adequate times and sources for our military Further reading to prepare fully for operations without SA... Beginning in 2000, the President will make an Further details on the GPS may be found in the annual determination on continued use of GPS texts of Ackroyd and Lorimer (1990), Logsdon SA’. (1995), Leick (1995) and Parkinson and Spilker There are two ways of circumventing the (1994). These texts are listed in ascending order effects of SA. The first (which is applicable of difficulty. only when the receiver is at rest) is to time- There are many web sites devoted to GPS; we average the calculated receiver positions. Several have listed some of those of general interest, at manufacturers produce receivers in which the http://www.dcs.gla.ac.uk/ rjb/gps. time averaging commences at the touch of button ∼ (e.g. Garmin) or automatically on standing still Received 3 August 1998 (e.g. Magellan). In our experience the error PII: S0031-9120(99)96414-6 quoted on the Garmin 12 XL usually falls to approximately 15 m in about a minute of averaging. Because of short-term biasing in the References dithering, the recorded positions of the receiver would have to be averaged for several hours to Ackroyd N and Lorimer N 1990 Global Navigation: A GPS User’s Guide (: Lloyds of London obtain a position accurate to a few metres. (This Press) biasing also means that the recorded positions Bragg W H 1921 The World of Sound (London: Bell) should not be used as a source of data for simple pp 185–90 error-analysis exercises.) The second—and a Ferguson M 1997 GPS Land Navigation (Boise, ID: better—way to defeat the effects of SA is to add Glassford Publishing) Leick A 1995 GPS Satellite Surveying (New York: differential GPS (DGPS) to the receiver. Most Wiley) GPS manufacturers offer DGPS receivers as an Logsdon T 1995 Understanding the Navstar GPS, GIS add-on facility. The principle here is that a base and IVHS 2nd edn (New York: Van Nostrand station at an accurately surveyed site continuously Reinhold) records its apparent position as given by a GPS Parkinson B W and Spilker J J (eds) 1994 Global Positioning System: Theory and Applications receiver. It then transmits the difference between Progress in Astronautics and Aeronautics vol 163 the true and apparent position which is picked (Washington: American Institute of Aeronautics up by the user’s DGPS beacon. The resulting and Astronautics)

42 Phys. Educ. 34(1) January 1999