The portal has been deactivated. Please contact your portal admin.

Pop Video: How Does Your GPS Device Know Where You Are?

In this video we look at how GPS devices use signals from satellites to calculate your position on Earth, and why we need to take account of Einstein’s general and special theories of relativity to get usefully accurate readings.


Video Transcript

How does your GPS device know where you are?

Since the 1980s, the US Government has made the radio signals from their network of GPS satellites, orbiting over 20,000 kilometres above Earth’s surface, available to anyone with an appropriate GPS receiver. Worldwide coverage by 24 satellites arrived in 1993, and it became really useful for a whole range of civilian purposes when access was fully opened up in 2000.

More recently, other services have been launched by Russia, China, India, Japan, and the European Union, to run either independently or to enhance the accuracy of the American system. The satellites transmit geolocation and time information, along with a generated stream of pseudocode. And by comparing signals from four or more satellites, a GPS receiver can reliably calculate where in the world it is within a few metres. With more satellites and information from additional ground-based systems, the location can be calculated within centimetres.

In this video, we’ll be taking a look at how satellite navigation works, some of the calculations involved, and how we need to use Einstein’s special and general relativity to make it as accurate as it is. First though, let’s imagine we’re lost in a featureless two-dimensional flat landscape, whose only redeeming feature is that it exists within a clearly defined coordinate system, with units measured in kilometres east of a known location, the 𝑥-coordinate, and kilometres north of that location, the 𝑦-coordinate.

We’re pretty sad about being lost. Then, suddenly, a magical being appears, and we ask them where we are. They tell us that we’re exactly 39 kilometres away from the centre of Antville, which has coordinates 14, 45. We quickly whip out some graph paper, make a grid, and draw the circle on it. So we could be anywhere on the circumference of a circle with radius of 39 kilometres and its centre in Antville. We can even write down the equation of the circle of points where we could be. 𝑥 minus 14 all squared plus 𝑦 minus 45 all squared equals 39 squared.

Now that’s helpful-ish, but there are still infinitely many places we could be. Okay, so I’m being a bit pedantic to say that there are infinitely many positions around that circumference, but there are. We’ve certainly narrowed down our position in the world quite significantly, but we don’t know exactly where we are. And we’re probably wondering why the magical being didn’t just tell us our own coordinates rather than giving us that cryptic reference to Antville. Perhaps they were a maths teacher in a previous life.

Then, as if reading our thoughts, the magical being tells us that we are also exactly 50 kilometres away from the centre of Buffalo Town, which has coordinates 80, 70. Now that is quite helpful. We add that circle to our graph paper and write down its equation: 𝑥 minus 80 all squared plus 𝑦 minus 70 all squared equals 50 squared. If Antville and Buffalo Town were exactly 39 plus 50 — that’s 89 kilometres apart — then these two circles would touch in just one place, and we’d know exactly where we were. Sadly, they’re not, and there are two places where the circles intersect, and we could be in either one of those.

Then the magical being tells us that we’re exactly 29 kilometres from the centre of Cat City, which has the coordinates 71, 50. We draw out that circle and write down its equation — 𝑥 minus 71 all squared plus 𝑦 minus 50 all squared equals 29 squared — and discover that it cuts each of the previous two circles in two places. But all three circles only intersect at one point, with coordinates 50, 30.

Now, if all of the information is 100 percent accurate and the magical being was telling us the truth, then we now know exactly where we are. If the centres of the circles had all fallen in a straight line, then they’d probably all intersect in two places. So we wouldn’t be able to narrow down our position to just one place. But if we can cut a deal with the magical being to make sure the information they give us isn’t from circles with their centres all in a straight line, then we can work out exactly where we are.

Now we used scale drawing to work out our position. But we could also use a bit of algebra, solving the simultaneous equations, to work it out more accurately. The other advantage of the algebra is that we could program a computer to work out the answer for us very quickly. This is a kind of simple two-dimensional analogy to satellite navigation.

When we extend the coordinate system to three dimensions, we get spheres of possible positions, rather than circles. And we need four spheres with their centres not in a straight line to work out the 𝑥-, 𝑦-, and 𝑧-coordinates of our location, rather than three. But it’s still just a matter of solving simultaneous equations. This technique of using circles or, in the case of GPS, spheres from known reference points to work out a location is known as trilateration. But it’s just part of the process that your GPS receiver device uses to work out where you are.

A real-world communication system doesn’t have a magic being that can tell you the exact coordinates and distances to known locations. Instead, in our 2D analogy, let’s say that we have radio transmitters at the centres of Antville, Buffalo Town, and Cat City, and they’re transmitting time-coded messages with their coordinates. The radio transmitters know the time superaccurately because they’ve got atomic clocks. And they also know exactly where they are.

Radio waves are electromagnetic waves that travel at the speed of light, 299,792.458 kilometres per second. Well, that’s the speed in a vacuum, and it’ll vary slightly through the atmosphere, but let’s not worry about that yet. To make things simpler in our 2D example, let’s say we’ve got special radio waves that travel at only one kilometre per second.

So then we’re standing in the featureless landscape, not knowing where we are. We’ve got our receiver. And the signal takes 39 seconds to get from Antville, 50 seconds to get from Buffalo Town, and 29 seconds to get from Cat City. If the clock on our receiver is perfectly synchronised with the clocks in the transmitters and continues to run at that same rate, then we can examine the timestamps in the messages and compare them with the time when they arrived. And then we can work out how long it took them to get here.

We know that speed equals distance divided by time, so we can rearrange this into distance equals speed times time. The signal from Antville, for example, took 39 seconds to get here, and the speed of the signal is one kilometre per second. So the distance to Antville is one kilometre per second times 39 seconds. That’s 39 kilometres. Similarly, we can work out the distances to Buffalo Town and Cat City from the differences in the timestamps when the messages were sent and when we received them.

Since the messages also contain the coordinates of the towns, it’s as if our magical being is back, giving us the information, and we know we can work out exactly where we are. So back in the three-dimensional real world, GPS satellites do all have superaccurate atomic clocks onboard and are programmed to simultaneously transmit their coordinates in three-dimensional space, along with the corresponding accurate timestamp.

However, the average GPS receiver doesn’t have such an accurate clock. They’d be far too big and expensive to put in your smartphone. This means that the time delay between the signal setting off and arriving at your receiver can’t be measured as accurately as we’d like. If the clocks were badly desynchronised, then the calculations would tell you that you’re in quite a different place to where you actually were.

Luckily, most receivers cleverly repeatedly analyse the messages from lots of satellites and reverse-engineer the calculations we did earlier to compare where they actually are with where the time difference implies they are. This enables them to update their internal clocks to keep much more accurate time. GPS receivers don’t need atomic clocks because they can effectively piggyback off the atomic clocks in the satellites instead.

The more satellites your GPS receivers can see, the more data they have to work with and the more accurate they can be. In three dimensions, you generally need at least four signals from separate satellites to work out where you are, although if you have three signals, it may be possible to use the centre of the Earth as a kind of fourth satellite, assuming you’re on the Earth’s surface. But this will almost certainly give you a less accurate idea of where you are.

If you’re within sight of seven or more satellites and conditions are ideal, it’s possible to get results within just a few metres of your true position around 95 percent of the time with publicly available GPS systems. And this can be improved further with additional information from supplementary ground-based systems.

Even with the clever clock updates and multiple satellite readings, radio signals can bounce off of buildings, trees, and even clouds and will slow down slightly in denser parts of the atmosphere, which can affect how long they take to reach your receiver. This makes it very tricky to know when your location reading is highly accurate and when it’s less accurate.

But there’s one even more surprising thing that satellite navigation systems have to take into account when working out where you are: relativity. Because the satellites are travelling so fast in orbit around the Earth, we need to use this time dilation formula when evaluating time from the point of view of the clock on the satellite.

In our case, Δ𝑡 is the time in seconds as observed by a theoretical observer on Earth. Δ𝑡 sub zero is the time in seconds that registers on the atomic clock onboard the satellite. 𝑣 is the velocity of the satellite in metres per second. And 𝑐 is the speed of light in metres per second. Now, there are 86,400 seconds in a day, and the speed of light is 2.998 times 10 to the eighth metres per second. But what is the velocity of the satellite?

Well, GPS satellites orbit 20,000 kilometres above the surface of the Earth, and the Earth has a radius of about 6,371 kilometres. So the circumference of the orbit, assuming it’s a circle, is two times 𝜋 times the radius of the orbit, and that makes 165,693,879.7 metres. It takes the satellite 11 hours and 58 minutes to orbit the Earth once; that’s 43,080 seconds. This means the satellite travels at about 3,846.19 metres per second, or 13,846 kilometres an hour, which is quite fast.

When we plug those values into the formula, we see that one day seems like a day plus seven microseconds to the satellite. It’s gonna lose seven microseconds per day compared to a clock on Earth, even with its atomic clock.

But that’s not all. The satellites are over four times further away from the Earth’s centre of mass than we are on the ground, which makes the gravitational effect of all that mass weaker. In fact, the gravitational effect varies as the inverse square of the distance from the mass. So gravity seems over 17 times stronger to us on the ground than it does to the satellite. That means that space-time is warped less up there, and clocks run faster than they would here on Earth.

We can express the differences due to gravity in timing observations made on Earth compared to the satellite using this formula, where Δ𝑡 prime is the time in seconds that passes for the observer-under-the-influence-of-gravity’s clock, Δ𝑡 is the time in seconds that registers on a theoretical observer-not-affected-by-gravity’s clock, 𝐺 is the universal gravitational constant, 𝑀 is the mass of the gravitational object, Earth in our case, in kilograms, 𝑟 is the distance in metres from the gravitational object, and 𝑐 is the speed of light in metres per second.

If we plug in the numbers, we find that clocks run 45 microseconds a day faster on the satellite than they would here on Earth. So seven microseconds slower per day due to high velocity and 45 microseconds faster a day due to lower gravity. That makes an overall difference of 38 microseconds a day.

If we didn’t take that into account, the timings would drift by 38 microseconds a day. And since radio signals travel at the speed of light, that would mean our measurements would drift out by about 11.4 kilometres per day. Satnav would be useless. You could say that we wouldn’t be where we are today without Einstein’s special and general theories of relativity.

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.