Building a GPS System


Thanks to the efforts of brilliant engineers and scientists, GPS (Global Positioning System) is a cornerstone technology in our world today. Whether it's from our vehicle's navigation system or a handheld device while hiking through the woods, we are now able to pinpoint our exact latitude and longitude from satellites orbiting the earth. Pretty crazy, right? Come along with us and learn what it is, how it works and how you can make your own GPS system.

Learn about the history of GPS, how it works and how it came to be an integral technology in today's world.

How does GPS work?

Satellite Distance from EarthAt Medium Earth Orbit (12,550 miles), there are approximately 31 satellites in operation at any given time. This is a relatively large system, run with careful planning and calibration. The principle idea is math. Wait! Let me finish. Your receiver pinpoints location by calculating the distance between you and that satellite. This is done by multiplying the rate of signal (speed of light) by the atomic clock time on the satellite. You can get your location from three satellites, but it will not be as accurate – four satellites are needed to determine your location in three dimensions. Three satellites are needed for x, y and z coordinates, and one satellite to determine the time it took the signal to travel from the satellites to the receiver (see images below).

Four satellites are needed to find an accurate location: X, Y and Z axes, and a clock reading.

Satellite Technology

Ok, cool. So satellites are zipping around spitting out location data, and if I’m in the line of sight then my receiver will tell me my location. Is that it? No, not exactly. We’ve just taken a small step into GPS technology as a whole. We’ve established there are two key parts, satellites and receivers, so now let’s look closer. A receiver is usually a chip that can receive an electromagnetic wave and translate it into readable data. These systems can range from a standalone chip, to a breakout board, to a fancy complete user system, like in a car. If you’re making a project around these types of technologies, you’ll have to understand the three main features they all need to work. For a GPS module you’ll need an antenna, an integrated system to perform math and data communication, and a communication protocol output that feeds to the user or end system.

Satellite Constellations for Major Powers

Antenna

Any wireless communication system will feature the almighty antenna. In short, we’re looking for a conductive metal that, when hit with electromagnetic waves, an electric current inside the conductor will flow. Think of slapping a pool and watching waves ripple on the water. This current flows in a specific way, controlled by the electromagnetic wave. There is an entire engineering discipline dedicated to making antennas, so we won’t go too deep. But, this is an important component for the next part of the system.

Integrated System

There is no exact standard for this portion, but we need electronics to filter out unwanted wave frequencies and read the ones we’re interested in. These systems can be complex, as with GPS-RTK, or simple for regular GPS. A basic recipe would be a filter, signal decoder and some communication output. We use a variety of chips, and each has their own advantages and disadvantages. So how do we communicate with these chips?

Communication Protocols

Let's assume you’ve heard of or have some experience with common communication methods between electronics, like Serial, I2C, SPI, etc. These are hardware-level, computer-to-computer communication methods, but GPS has an extra layer on top. How do we account for many satellites zipping around spitting out their own languages? We introduce GPS communication protocols, which is just a fancy way of saying standardizing. Meet the NMEA-0183 standard: this basically breaks down signals into sentences.

When the signal is decoded into this standard, the once-electromagnetic wave becomes readable to humans. Throw it on communication method lines, and our computer can show us our location.

If you would like to learn even more about GPS, check out our GPS Basics page below.

GPS Basics

December 14, 2012

The Global Positioning System (GPS) is an engineering marvel that we all have access to for a relatively low cost and no subscription fee. With the correct hardware and minimal effort, you can determine your position and time almost anywhere on the globe.
GPS Constellation

Finding your first location


Now that we've covered the basics with GPS, it's time to dive right in. We've put together a few simple tutorials to introduce you to the hardware and coding needed to build your first GPS project.

Displaying Your Coordinates with a GPS Module

April 30, 2019

This Arduino tutorial will teach you how to pinpoint and display your GPS coordinates with a press of a button using hardware from our Qwiic Connect System (I2C).

GPS Geo-Mapping at the Push of a Button

September 27, 2019

Let's ramp up our GPS tracking skills with KML files and Google Earth. We'll make a tracker that logs location and allows us to visualize our steps with Google Earth.

Make sure to look at our hookup guides!

When learning how to use GPS hardware, one of the best ways to learn is to view the hookup guides. For each product SparkFun carries we have an associated hookup guide on the product pages located under the description. We do our best to walkthrough all the connections needed, associated libraries and a working demonstration or two to get your project off the ground.


Step up in accuracy and precision


With technological advances in GPS receivers, we are able to achieve positional accuracy to one centimeter and even keep your bearing when there is little to no signal.

Real-Time Kinematics (RTK)

GPS receivers capable of RTK take in the normal signals from the Global Navigation Satellite Systems (GNSS) along with a correction stream to achieve 1cm positional accuracy. On top of these signals an RTK receiver takes in an RTCM correction stream and then calculates your location with 1cm accuracy in real time. The rate varies between receivers but most will output a solution at least once per second; some receivers can output this higher precision solution up to 20 times a second. Learm more about RTK in our What is GPS RTK tutorial.

What is GPS RTK?

September 14, 2018

Learn about the latest generation of GPS and GNSS receivers to get 14mm positional accuracy!

Dead Reckoning

Navigating a dense city, short tunnel or parking garage can provide poor signal quality or complete signal loss. These issues can be overcome with dead reckoning; the process of determining current position by combining previously determined positional data with speed and heading. 3D inertial measurement units (IMUs) and vehicle distance data (e.g. wheel ticks, and odometers) can be used to continually calculate a vehicles current position when GNSS data momentarily fails. Dead Reckoning can be achieved with our GPS Dead Reckoning NEO-M8U breakout board.

Best of Both Worlds

Putting together both real-time kinematics and dead reckoning used to be a task that required thousands of dollars of special equipment. Luckily technolgy has advanced to the point where achieving incredible untethered accuracy is much more accessable. SparkFun makes two boards (the GPS-RTK Dead Reckoning Breakout and the GPS-RTK Dead Reckoning pHAT for Raspberry Pi) to do just that. These boards will require a fair amount of end-user work to set up and calibrate as they are made for professional applications.


Find your Hardware


As with any technology, GPS hardware comes in many shapes and sizes to fit the specific needs of your project. Below we have listed a few of our favorite breakout boards, antennas and modules.

Our Creative Technologist Rob takes us through the different types of GPS hardware
and information to help you build the system right for you.

See our GPS Buying Guide

GPS Breakout Boards:

GPS breakout boards are equipped with a receiver, and have the ability to interface with your favorite development boards, such as a SparkFun RedBoard Qwiic.

See all GPS & GNSS Breakout Boards

GPS Development Boards:

We manufacture a wide array of GPS/GNSS development boards to fit the needs of many applications.

SparkFun GNSS L1/L5 Breakout - NEO-F10N, SMA

SparkFun GNSS L1/L5 Breakout - NEO-F10N, SMA

GPS-24114
$39.95
SparkFun GPS Breakout - NEO-M9N, U.FL (Qwiic)

SparkFun GPS Breakout - NEO-M9N, U.FL (Qwiic)

GPS-15712
$69.95
5
SparkFun GPS Breakout - ZOE-M8Q (Qwiic)

SparkFun GPS Breakout - ZOE-M8Q (Qwiic)

GPS-15193
$49.95
8
SparkFun GPS Breakout - NEO-M9N, Chip Antenna (Qwiic)

SparkFun GPS Breakout - NEO-M9N, Chip Antenna (Qwiic)

GPS-15733
$74.95
3

See all our GPS Boards

High Precision GNSS Boards:

We have a great selection of high-precision, RTK capable development boards for when you need that extra bit of accuracy.

SparkFun Triband GNSS RTK Breakout - UM980

SparkFun Triband GNSS RTK Breakout - UM980

GPS-23286
$299.95
SparkFun Triband GNSS RTK Breakout - mosaic-X5

SparkFun Triband GNSS RTK Breakout - mosaic-X5

GPS-23088
$699.95
1
SparkFun GPS-RTK2 Board - ZED-F9P (Qwiic)

SparkFun GPS-RTK2 Board - ZED-F9P (Qwiic)

GPS-15136
$274.95
21
SparkFun Triband GNSS RTK Breakout - UM980

SparkFun Triband GNSS RTK Breakout - UM980

GPS-23286
$299.95

See all our High Precision GNSS Boards

Enclosed RTK Surveyors:

RTK Surveyors are enclosed and ready to use GNSS receiver for millimeter-level positioning. No programming required!

SparkFun RTK Surveyor

SparkFun RTK Surveyor

GPS-18443
$427.95
5
SparkFun RTK Express

SparkFun RTK Express

GPS-18442
$534.95
1
SparkFun RTK Express Plus

SparkFun RTK Express Plus

GPS-18590
$588.50
SparkFun RTK Facet

SparkFun RTK Facet

GPS-19984
$699.95
14

Learn More About RTK Surveyors

Antennas:

Some projects require an antenna to better recieve signals from the satellites. Below are some of our favorites.

GPS/GNSS Magnetic Mount Antenna - 3m (SMA)

GPS/GNSS Magnetic Mount Antenna - 3m (SMA)

GPS-14986
$13.95
3
Interface Cable SMA to U.FL - 100mm

Interface Cable SMA to U.FL - 100mm

WRL-09145
$5.50
3

SparkFun GNSS Chip Antenna Evaluation Board

GPS-15247
1
Molex Flexible GNSS Antenna - U.FL (Adhesive)

Molex Flexible GNSS Antenna - U.FL (Adhesive)

GPS-15246
$4.50
1

See all GPS Antennas

Modules:

GPS modules are the signal receivers. These modules come without a breakout board, so interfacing with these modules may increase difficulty of a project.

GNSS Receiver - EM-506N5

GNSS Receiver - EM-506N5

GPS-19629
$44.95
1
GPS Receiver - GP-735 (56 Channel)

GPS Receiver - GP-735 (56 Channel)

GPS-13670
$49.50
16

GPS Receiver - EM-506 (48 Channel)

GPS-12751
14 Retired

See all GPS Modules


Additional Resources


Here are a few other projects that use GPS. We are always trying to expand our library of projects and tutorials, so check back often or fill out the form above to be notified of new content.

Setting up a Rover Base RTK System

October 14, 2020

Getting GNSS RTCM correction data from a base to a rover is easy with a serial telemetry radio! We'll show you how to get your high precision RTK GNSS system setup and running.

How to Build a DIY GNSS Reference Station

October 15, 2020

Learn how to affix a GNSS antenna, use PPP to get its ECEF coordinates and then broadcast your own RTCM data over the internet and cellular using NTRIP to increase rover reception to 10km!

Qwiic GPS Clock

September 14, 2020

What time is it? Time for you to... Qwiic-ly build a GPS clock and output it to a display! This project provides you with the current date and time using GPS satellites. Read the date and time as a digital or analog clock. Or even configure the clock for military, your time zone, or automatically adjust the time for daylight savings time!

Getting Started with U-Center for u-blox

September 13, 2018

Learn the tips and tricks to use the u-blox software tool to configure your GPS receiver.

RFID Beginners Tutorial

June 15, 2020

In this tutorial we'll revisit some RFID basics and practice by making a remote work logger using an RFID reader and a GPS module. You'll scan a card and get ID, location, and time. All the perfect data to punch in and punch out from the middle of Nowhere!
So you’re wondering what the difference is between GPS and GNSS? Good news, you’re not alone and you’ve come to the right place! In this blog, we’ll lay out the similarities, differences, and how each will fit into your next project.
Check out our latest geospatial blog post - this time focusing on orbits, their uses, and which GNSS systems utilize them!