How GPS Works

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

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.

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.

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.

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.

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 trilateration, here’s a resource courtesy of Penn State. Additionally, I recommend you visit some of the websites linked in the sources section below.

Sources

My Other Projects

www.lowpolygonart.com