What is GPS and how does it work?

  • Daniel Marsh
  • |
  • December 06, 2021

What is GPS?

The Global Positioning System (GPS) was originally developed for military use, but has been readily adopted as a consumer-facing technology, and is the most commonly used satellite navigation system (hence the abbreviated term ‘satnav’). These systems allow travellers to locate their position anywhere on the Earth’s surface, as long as enough GPS satellites are in view. They are also linked to a service that allows them to receive travel directions to a particular destination based on their current location.

GPS-based location detection

GPS devices use latitude and longitude coordinates to represent and communicate geolocation information. Millions of separate GPS receivers can use the same GPS satellites to determine their location without the satellites needing to know anything about the receivers. This is because, rather than the satellites responding to individual requests from each separate receiver, each satellite broadcasts the same information to all the GPS receivers that are in sight of it. The receiver then works out its location based on the information it receives.

But how do the GPS receivers determine those coordinates, and how do they do it without the need to connect to the GPS satellites directly?

The calculation used to determine the distance of the receiver from each satellite is based on the time taken for the signal to go from the satellites (with known positions) to the receiver. This requires very accurate timing and the ability to use synchronised clocks on the satellites and the receiver.

The signal transmitted from a satellite to a GPS receiver contains a sequence of code that runs continuously and synchronously (in step) at both the GPS receiver and the GPS satellite transmitter.

Assuming that the code sequence runs in perfect synchrony at both the transmitter and the receiver, the GPS receiver can compare the received code with the code already running at the receiver. The received code will appear delayed by the amount of time that it has taken to propagate from the transmitter – that is, it will appear to have been shifted in time. The adjustment in the time needed to bring the received code and the original code sequences back into alignment is the time it takes for the signal to travel from the satellite transmitter to the receiver.

The following calculation shows how we can estimate the time it takes for a signal to reach the Earth’s surface from a GPS satellite directly above it, at an altitude of 20 800 km. A radio signal travels at the speed of light, which is approximately 3 × 108 m/s (300 000 000 metres per second), and which we assume to be constant.

The relationship between speed, distance and time are:

speed = distance/time where time is in seconds, distance in metres and speed in metres per second.

As we know the distance from the receiver to the satellite and the speed of light, we can rearrange the equation to calculate the time as follows:

time = distance / speed

The first thing we need to do is to convert the distance in km into metres as follows:

20 800 km = 20 800 000 m = 2.08 × 107 m

The calculation then becomes:

time in seconds = (2.08 × 107 m) / (3 × 108 m/s)

By expressing the calculation in scientific notation, we can divide the first power-of-10 term by the second by subtracting the exponent of the second number (the denominator) from the exponent of the first number (the numerator):

(2.08 / 3) × 107−8 s = 0.69 × 10−1 s (to 2 significant figures)

The negative exponent tells us that if we want to express this in ordinary notation, we should move the decimal point one place to the left. Thus the propagation time is 0.069 s (to 2 significant figures), which is to say, 69 milliseconds (69 ms).

Two more challenges to using GPS

GPS needs to measure a time delay of somewhere around 60 or 70 ms to a precision of about 3 ns for a resolution of 1 metre to be achieved.

But we are still faced with two problems when it comes to determining the location of the receiver. Firstly, how do we ensure that the clocks in the receiver and the satellites are synchronised? Secondly, where are the satellites, so that we can fix our position relative to them?

In answer to the first question, high-accuracy atomic clocks are available, but they are expensive. The cost of such a clock can be justified on the 24 GPS satellites, but not in the millions of low-cost GPS receivers. This means that the clocks in GPS receivers are not sufficiently accurate to identify a precise location from three satellites.

A solution to this problem lies in using the fourth satellite. In a perfectly accurate system, the theoretical lines joining the GPS receiver to three satellites that the receiver is using will meet in a single point. However, if the calculated distances from each satellite are slightly inaccurate (because they have been calculated from slightly inaccurate times), then the theoretical spheres won’t be in exactly the right place. Consequently, the point of intersection won’t be at the right place on the Earth’s surface and the GPS receiver will report an erroneous position. This is where the fourth satellite comes in.

If all the time measurements (and the corresponding distances) were precise, then a fourth satellite measurement would coincide precisely with the single point of intersection of the other three. In the real, imprecise world, the fourth measurement seldom does coincide, which indicates that a correction is required to the receiver’s sense of time. If we assume that the receiver’s clock is no longer in synchrony with the atomic clocks on the satellites and that this is the source of the error, then we need to bring the receiver’s clock back into sync. The receiver does this by searching for one single correction that it can make to all four of its timing measurements such that the fourth satellite measurement gives the same position as the other three. (This demonstrates another use of the signal from GPS satellites: providing accurate timing information to the receiver.) This is one reason why it may take some time for your GPS device to decide where you are located – it’s trying to spot enough satellites and calculate an appropriate timing correction to synchronise its clock.

Having sorted out the right time, we now need to address the second problem: where are the satellites? Part of the signal transmitted by the satellites is used to transmit some data, known as ephemeris data, which describes the orbit of that particular satellite. Waiting to receive this data may also be a source of delay in fixing our location. More general almanack data, which is also broadcast by the satellites, tells the receiver roughly where each satellite in a GPS location is likely to be in the sky, and which ones are likely to be in sight.

By using the ephemeris data for each satellite to calculate its location at that particular time, along with the time delay on each satellite’s synchronisation data to calculate the distance to each satellite, our receiver can calculate exactly where it is to a high degree of precision.

Other forms of location-based technology

cellphone towers

Unlike the GPS, where the satellites are completely unaware of the location of receivers, cell tower localisation may reveal the location of the receiver back to the network, via the cell towers. In addition, communication service providers may retain this information and associate it with you, which means that cell-tower localisation may have implications for personal privacy.

Wi-Fi location

You may have noticed how your web browser occasionally prompts you for location information when using your desktop or laptop computer. (Browser location services can be enabled and disabled through your browser settings/preferences.) This information can then be shared with the website that requested it to provide location-based services.


Who knows where you are? An ongoing privacy battle

If you ever go on a journey and take a mobile phone with you, it will be repeatedly listening out for signals from nearby cell towers. As your phone connects to different cell towers, the cell towers may record connection information. This information is likely to include an identifier for the phone, the signal strength and the round-trip time (the time it takes for a signal to go from the cell tower to the phone and back again). The signal strength and round-trip time can be used to give an estimate for the distance the phone is from the tower. The cell tower may also record which antenna a connection was made through. (Cell towers often have antennas with a 120-degree field of view, providing a crude bearing to connected devices.)

At the same time, the network operator will be detecting connection information broadcast by your phone from multiple cell towers. By pooling this information, the network can locate the approximate position of handsets connected to it.

This ‘dual’ property of networks, where an individual can locate themselves by referencing several other nodes in the network, or the network can locate individuals through the pooling of information from several network nodes (each with only crude information about the location of an individual), is very powerful. But it also provides a cautionary tale.

You may think you’re being discreet, taking care not to post details about your location on social media and switching location services off on your phone; but the network as a whole may implicitly know far more about you, including your exact location, than any single node within it; and that information may be recorded at a system level as the separate nodes pool their information to provide a global view of your activities.

This information is also retained. For example, in 2006, the European Union passed a Data Retention Directive that required public communications providers to collect a range of information relating to their customers’ use of the public communications network. The data collection allowed, among other things, the identification of the location of mobile communication equipment. (Many elements of this directive were covered in the UK by the Investigatory Powers Act 2016.)

In 2011, Malte Spitz, a German politician, requested a bulk copy of the information collected – under German legislation implementing the EU directive – from his mobile phone by network operator Deutsche Telekom to see what it revealed about his activities.

As the operator of Spitz’s mobile phone contract, you may or may not think it is reasonable for Deutsche Telekom to collect this data as part of their network operations. The legislation was written by governments such that it obliged communications providers to retain such information, with a view that access to it could then be requested as part of a criminal investigation. But commercial operators may also choose to retain such information, subject to data protection legislation, to support their operations or improve (and maybe even personalise) the delivery of services to their users.