# How does GPS work?

*Until a few years ago, if you were lost, the only way to find your way back home was to ask for directions from locals, use a compass, or seek patterns in the sky. But, what if you're lost in a desert or under a dense forest canopy? Unfortunately, many people have died in such situations.*

Today, however, all you have to do in such a dreadful situation is pull out your smartphone/ GPS receiver, and boom! You're back on track! Would you like to know how such a tiny device pinpoints your location with such accuracy?

## Trilateration

A GPS receiver establishes its location by calculating the time it takes for a signal from four satellites to arrive at its location. Consider the satellite to be a spotlight. You receive a circle of light when you shine it on the ground. The GPS receiver could be everywhere in that circle of light with just one satellite. Similarly, there are three circles with three satellites. There is just one point where these three circles overlap or cross. That is where the GPS receiver is located.

## The math behind it!

Satellites transmit signals to the GPS receiver. These signals are time-stamped by the satellites. By calculating the difference between the received and sent times, the GPS receiver determines how far away it is from each satellite. GPS receivers also know each satellite's position in the sky. Therefore, based on the time it takes the signals to travel from the satellites and their precise positions in the sky, the GPS receiver can determine its location in three dimensions - latitude, longitude, and altitude.

Radio waves from satellites travel at a speed of 186,000 miles per second. A satellite's distance can be calculated by taking the difference between the signal's transmission and reception, multiplied by the speed of light.

(186,000 mi/sec) x (signal travel time in seconds) = Distance of the satellite to the receiver in miles.

Having already received the satellite's coordinates, you can easily calculate your location by building a sphere around the center point of the satellite.

### It's all good, but the time is wrong!

A complication exists. The GPS receiver needs to know the time precisely to calculate when the GPS signals arrive. That's why we have fitted GPS satellites with atomic clocks that keep very accurate time.

### Defeating ‘time offset’: How can we do it?

We have regular quartz clocks in receivers/ smartphones. This is not accurate as atomic clocks. The ‘time offset’ is the difference between the atomic clock time in the satellite and the time measured by your mobile phone. This minute time difference can result in a significant inaccuracy in GPS computations. Because the speed of light is so high, even a microsecond error will result in an error of kilometers in this computation.

We can resolve this problem by updating the phone/receiver's time from a fourth satellite. As a result, the fourth satellite removes the need for an atomic clock in your cellphone, which may cost thousands of dollars otherwise.

## Time takes it all. Einstein’s general theory of relativity: A Practical Application

Time is a relative term influenced by many factors. According to the theory of relativity, time slows down for a fast-moving object. The atomic clocks, which travel at a speed of 14,000 kilometers per hour, will slow down by seven (07) microseconds every day. As a result, a GPS won't be able to pinpoint your exact location.

Another problem is that time passes faster for objects far away from gravity, according to general relativity theory. At a height of 20,000 kilometers, the earth's gravity is only one-quarter of what it is at sea level. As a result, the clocks will tick 45 microseconds quicker every day.

Every day, the atomic clock creates a net offset of 38 (45-7) microseconds. This means that if nothing is done, GPS locations will become 6 miles off every day.

To compensate for this, the computer has been programmed to adapt to the atomic clock differences. Furthermore, using at least four satellites overcomes both difficulties by providing exact item locations. There's no way you'll get erroneous measurements when you have four spheres.

## Time is money, honey!

In addition to geolocation information, GPS delivers time signals that are accurate to 10 billionths of a second. Banking systems, power grids, and cellular networks use atomic time from GPS for their time-stamped transactions and operations.

GPS helps us in many important ways, but following our pizza may be the most important! So, the next time you track your food delivery or drive your car, remember how fundamental the theory of relativity and other mathematical concepts are in the development of GPS.

Cheers!