How Does GPS Work?

How Does GPS Work?

Let’s take a closer look at the technical aspects of this technology (Global Positioning Systems), starting with the satellites and working our way down to the receivers on the ground.

![Image for post](https://i2.wp.com/miro.medium.com/max/468/1*rBAMjm_JHGi1SBqs8vgu5g.png?resize=586%2C350&ssl=1)
NavStar GPS satellite

Background Info

The Global Positioning System (GPS), originally known as NavStar, was created by the US military back in 1995. NavStar was originally a collection of over two dozen GPS satellites in geosynchronous orbit.

Nowadays, NavStar has grown to a network of over 30 satellites orbiting the Earth approximately 13,000 miles above the surface. These satellites make two passes over the same spot every day as they move in their west to east orbit.

While other countries are developing their own GPS satellite networks, the US NavStar system is still the standard.

Only 24 satellites are needed to provide line of sight coverage to 95% of Earth’s surface. The remaining function primarily as backup and are queried only when more accuracy is needed.

Satellites

The most critical component on board these satellites is the atomic clock. As you’ll soon see, reliable timekeeping is the single most important function of these satellites.

![Image for post](https://i0.wp.com/miro.medium.com/max/1500/1*dZQbtHhY_4vNde3GlVOYLg.jpeg?w=1260&ssl=1)
This atomic clock was built for the first GPS satellites in the late 1970s.

“Atomic clocks are designed to measure the precise length of a second, the base unit of modern timekeeping. The International System of Units (SI) defines the second as the time it takes a caesium-133 atom in a precisely defined state to oscillate exactly: 9 billion, 192 million, 631 thousand, 770 times.”

— Live Science

GPS Payload

GPS is inherently a passive system. The GPS satellites do not receive any information.

Instead, each satellite reports at regular intervals:

  1. Pseudo Random Code — an identification value for the satellite (used by the receiver to decode the signal)
  2. **Almanac Data **— the position of the satellite at any given moment in time and orbital information about all other active satellites (this informs the receiver about which satellites should be available and at what time -helping the receiver to more quickly acquire a GPS fix)
  3. Ephemeris Data — more specific information about the satellite: it’s current date, time, health, and location. This data is broadcasted approximately every 30 seconds by NavStar satellites. Ephemeris data is usually updated every 2 hours and is valid for 4 hours.

From A Cold Start

Despite the frequency of the broadcast, the almanac alone is generally not accurate enough for a GPS receiver to get a location fix — especially if the GPS receiver is launching from a cold start.

More often that not, the cached almanac information of the GPS receiver will be out of date, so some receivers — especially older ones — may have to wait upwards of 10 minutes to receive a full almanac and ephemeris data broadcast from each satellite before they can provide a GPS fix.

Additionally, ephemeris data has a natural expiry as it can’t be cached for too long due to clock drift. Waiting for the broadcast and reception of updated ephemeris data is the main cause for the long start time of GPS receivers.

A-GPS

Luckily most modern devices, like today’s smartphones, are able to minimize this wait time. Most modern mobile devices use a variant of traditional GPS technology called A-GPS ( Assisted Global Positioning System) that helps them acquire a GPS fix quickly.

A-GPS works by leveraging the phone’s data connection to contact an assistance server. The server will provide the almanac and ephemeris data directly, so the phone no longer needs to wait for the transmission from the satellite. However, once you are out of cell coverage, the phone would then revert back to the onboard GPS unit and will need several minutes to acquire the ephemeris and almanac data in the traditional manner.

GPS Signal

Most GPS transmissions are in the UHF portion of the frequency spectrum. Most civilian GPS communication is done on 1575.42 MHz or 1227.60 MHz.

Additionally, GPS signal uses CDMA spread-spectrum techniques in order to allow all satellites to transmit on the same frequency without interfering with one another.

GPS Transmission

According to RadioElectronics, standard GPS transmission is roughly 15000 bits in length and is transmitted at a rate of 50 bits / second — taking about 30 seconds to complete the transmission.

The frame is split up into 5 sub-frames each 300 bits in length with a transmission time of 6 seconds.

The frames help the receiver identify the start and end of the transmission so they can easily synchronize with the incoming signals and decode the transmission.

**Sub-Frame 1: **Clock, GPS Time, Health of Satellite, Satellite ID

Sub-Frame 2–3: Ephemeris Data

Sub-Frame 4–5: Almanac Data

Receiver

Trilateration

GPS, on the receiver side, works by using an approach called trilateration.

Imagine I told you I was 150 miles from Los Angeles, 200 miles from Las Vegas, and 75 miles from your Fresno.

With just those 3 distance values, you would be able to determine a region that matches these constraints and would be able to estimate my current location within that region. The more distance measurements you have, the more accurate your estimate of my location becomes.

![Image for post](https://i1.wp.com/miro.medium.com/max/526/1*PZaGjJw3W-TQl3DmkpahjA.png?resize=578%2C558&ssl=1)
Trilateration Example

GPS requires at minimum distances to 3 satellite in order to get a fix on your location. As we already known, GPS signals include the location of the satellite and the time according to the satellite’s internal clock. If we measure the time that we receive the message and compare the difference in time to the time the message was sent from the satellite, we can figure out how long the message was in transit. Additionally, knowing that all of these signals are sent at the speed of light, we can multiply these two values together to compute your straight line distance to a particular satellite.

![Image for post](https://i2.wp.com/miro.medium.com/proxy/0*HY7l7PcoJBE_eqXK.jpg?resize=582%2C422&ssl=1)

Satellites use expensive atomic clocks for this very reason. The more accurate the time value transmitted, the more accurate the receiver can be about it’s distance to the satellite.

Though we can figure out a user’s 2D location using just 3 satellites, using a 4th satellite allows us to compute an altitude value. While a 2D location fix might work for some cases as GPS would assume you’re near sea level, if you were on a mountain, a 2D fix could have an error of several hundred meters.

Furthermore, because receivers — like a mobile phone — often have cheaper less accurate clocks — we need to account for the timing error introduced by the cheaper hardware and other environmental factors (decreases in the signal’s speed caused by the ionosphere and the troposphere). Using a 4th satellite will not only provide an altitude value, but it will allow us to solve a system of equations that let’s us identify the clock error and compute a more accurate position.

Most modern GPS receivers will use this additional information to try and synchronize their internal clock with the satellite’s atomic clock.

![Image for post](https://i1.wp.com/miro.medium.com/max/468/1*VV60PICUN4Xnwt6tphqNDQ.png?resize=579%2C297&ssl=1)

That’s why most modern GPS receivers will typically track all available line of sight satellites, but only use some subset for the actual calculation.

Now that the GPS receiver’s antenna can pick up at least 4 satellites, it can accurately calculate it’s position and time in 3 dimensions (latitude, longitude, and altitude).

If you’re curious about the actual mathematics behind trilaterationhere’s a resource courtesy of Penn State. Additionally, I recommend you visit some of the websites linked in the sources section below.

Thanks for checking out this article!

Feel free to check out some of my other content

http://lowpolygonart.com/

http://stickerspot.digitalbunker.dev/

http://halfway.digitalbunker.dev/

https://mixrecipes.digitalbunker.dev/

Sources

https://gis.stackexchange.com/questions/179/what-data-is-sent-from-gps-satellites-to-receivers

https://www.maptoaster.com/maptoaster-topo-nz/articles/how-gps-works/how-gps-works.html

https://timeandnavigation.si.edu/multimedia-asset/how-does-gps-work

https://www.scientificamerican.com/article/how-do-gps-devices-work/

https://www.extremetech.com/extreme/210893-extremetech-explains-how-does-gps-work

https://www.maptoaster.com/maptoaster-topo-nz/articles/how-gps-works/how-gps-works.html

https://learn.sparkfun.com/tutorials/gps-basics

https://www.radio-electronics.com/info/satellite/gps/signals.php

https://www.courses.psu.edu/aersp/aersp055_r81/satellites/gps_details.html

Let’s take a closer look at the technical aspects of this technology (Global Positioning Systems), starting with the satellites and working our way down to the receivers on the ground.

Image for post
NavStar GPS satellite

Background Info

The Global Positioning System (GPS), originally known as NavStar, was created by the US military back in 1995. NavStar was originally a collection of over two dozen GPS satellites in geosynchronous orbit.

Nowadays, NavStar has grown to a network of over 30 satellites orbiting the Earth approximately 13,000 miles above the surface. These satellites make two passes over the same spot every day as they move in their west to east orbit.

While other countries are developing their own GPS satellite networks, the US NavStar system is still the standard.

Only 24 satellites are needed to provide line of sight coverage to 95% of Earth’s surface. The remaining function primarily as backup and are queried only when more accuracy is needed.

Satellites

The most critical component on board these satellites is the atomic clock. As you’ll soon see, reliable timekeeping is the single most important function of these satellites.

Image for post
This atomic clock was built for the first GPS satellites in the late 1970s.

“Atomic clocks are designed to measure the precise length of a second, the base unit of modern timekeeping. The International System of Units (SI) defines the second as the time it takes a caesium-133 atom in a precisely defined state to oscillate exactly: 9 billion, 192 million, 631 thousand, 770 times.”

— Live Science

GPS Payload

GPS is inherently a passive system. The GPS satellites do not receive any information.

Instead, each satellite reports at regular intervals:

  1. Pseudo Random Code — an identification value for the satellite (used by the receiver to decode the signal)
  2. Almanac Data — the position of the satellite at any given moment in time and orbital information about all other active satellites (this informs the receiver about which satellites should be available and at what time -helping the receiver to more quickly acquire a GPS fix)
  3. Ephemeris Data — more specific information about the satellite: it’s current date, time, health, and location. This data is broadcasted approximately every 30 seconds by NavStar satellites. Ephemeris data is usually updated every 2 hours and is valid for 4 hours.

From A Cold Start

Despite the frequency of the broadcast, the almanac alone is generally not accurate enough for a GPS receiver to get a location fix — especially if the GPS receiver is launching from a cold start.

More often that not, the cached almanac information of the GPS receiver will be out of date, so some receivers — especially older ones — may have to wait upwards of 10 minutes to receive a full almanac and ephemeris data broadcast from each satellite before they can provide a GPS fix.

Additionally, ephemeris data has a natural expiry as it can’t be cached for too long due to clock drift. Waiting for the broadcast and reception of updated ephemeris data is the main cause for the long start time of GPS receivers.

A-GPS

Luckily most modern devices, like today’s smartphones, are able to minimize this wait time. Most modern mobile devices use a variant of traditional GPS technology called A-GPS ( Assisted Global Positioning System) that helps them acquire a GPS fix quickly.

A-GPS works by leveraging the phone’s data connection to contact an assistance server. The server will provide the almanac and ephemeris data directly, so the phone no longer needs to wait for the transmission from the satellite. However, once you are out of cell coverage, the phone would then revert back to the onboard GPS unit and will need several minutes to acquire the ephemeris and almanac data in the traditional manner.

GPS Signal

Most GPS transmissions are in the UHF portion of the frequency spectrum. Most civilian GPS communication is done on 1575.42 MHz or 1227.60 MHz.

Additionally, GPS signal uses CDMA spread-spectrum techniques in order to allow all satellites to transmit on the same frequency without interfering with one another.

GPS Transmission

According to RadioElectronics, standard GPS transmission is roughly 15000 bits in length and is transmitted at a rate of 50 bits / second — taking about 30 seconds to complete the transmission.

The frame is split up into 5 sub-frames each 300 bits in length with a transmission time of 6 seconds.

The frames help the receiver identify the start and end of the transmission so they can easily synchronize with the incoming signals and decode the transmission.

Sub-Frame 1: Clock, GPS Time, Health of Satellite, Satellite ID

Sub-Frame 2–3: Ephemeris Data

Sub-Frame 4–5: Almanac Data

Receiver

Trilateration

GPS, on the receiver side, works by using an approach called trilateration.

Imagine I told you I was 150 miles from Los Angeles, 200 miles from Las Vegas, and 75 miles from your Fresno.

With just those 3 distance values, you would be able to determine a region that matches these constraints and would be able to estimate my current location within that region. The more distance measurements you have, the more accurate your estimate of my location becomes.

Image for post
Trilateration Example

GPS requires at minimum distances to 3 satellite in order to get a fix on your location. As we already known, GPS signals include the location of the satellite and the time according to the satellite’s internal clock. If we measure the time that we receive the message and compare the difference in time to the time the message was sent from the satellite, we can figure out how long the message was in transit. Additionally, knowing that all of these signals are sent at the speed of light, we can multiply these two values together to compute your straight line distance to a particular satellite.

Image for post

Satellites use expensive atomic clocks for this very reason. The more accurate the time value transmitted, the more accurate the receiver can be about it’s distance to the satellite.

Though we can figure out a user’s 2D location using just 3 satellites, using a 4th satellite allows us to compute an altitude value. While a 2D location fix might work for some cases as GPS would assume you’re near sea level, if you were on a mountain, a 2D fix could have an error of several hundred meters.

Furthermore, because receivers — like a mobile phone — often have cheaper less accurate clocks — we need to account for the timing error introduced by the cheaper hardware and other environmental factors (decreases in the signal’s speed caused by the ionosphere and the troposphere). Using a 4th satellite will not only provide an altitude value, but it will allow us to solve a system of equations that let’s us identify the clock error and compute a more accurate position.

Most modern GPS receivers will use this additional information to try and synchronize their internal clock with the satellite’s atomic clock.

Image for post

That’s why most modern GPS receivers will typically track all available line of sight satellites, but only use some subset for the actual calculation.

Now that the GPS receiver’s antenna can pick up at least 4 satellites, it can accurately calculate it’s position and time in 3 dimensions (latitude, longitude, and altitude).

If you’re curious about the actual mathematics behind trilaterationhere’s a resource courtesy of Penn State. Additionally, I recommend you visit some of the websites linked in the sources section below.

Thanks for checking out this article!

Feel free to check out some of my other content

http://lowpolygonart.com/

http://stickerspot.digitalbunker.dev/

http://halfway.digitalbunker.dev/

https://mixrecipes.digitalbunker.dev/

Sources

https://gis.stackexchange.com/questions/179/what-data-is-sent-from-gps-satellites-to-receivers

https://www.maptoaster.com/maptoaster-topo-nz/articles/how-gps-works/how-gps-works.html

https://timeandnavigation.si.edu/multimedia-asset/how-does-gps-work

https://www.scientificamerican.com/article/how-do-gps-devices-work/

https://www.extremetech.com/extreme/210893-extremetech-explains-how-does-gps-work

https://www.maptoaster.com/maptoaster-topo-nz/articles/how-gps-works/how-gps-works.html

https://learn.sparkfun.com/tutorials/gps-basics

https://www.radio-electronics.com/info/satellite/gps/signals.php

https://www.courses.psu.edu/aersp/aersp055_r81/satellites/gps_details.html

Subscribe to Digital Bunker

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
[email protected]
Subscribe