What Is GPS?
GPS (Global Positioning System) is a US government-owned satellite navigation system providing free positioning, navigation, and timing (PNT) services globally. Originally developed by the US Department of Defense in the 1970s for military use, GPS was made available for civilian use in 1983 after the KAL 007 navigational disaster. The selective availability feature that deliberately degraded civilian accuracy was switched off in 2000, enabling the modern GPS ecosystem.
For electronics makers, affordable GPS modules like the u-blox NEO-6M ($5–10) bring centimeter-to-meter location accuracy to Arduino and ESP32 projects — enabling vehicle trackers, drone navigation, hiking loggers, and precision agriculture.
The GPS Satellite Constellation
The GPS constellation consists of at least 24 operational satellites(currently 31+) in Medium Earth Orbit at ~20,200 km altitude, arranged in 6 orbital planes with 4+ satellites per plane. This arrangement guarantees that any point on Earth's surface has at least 4 satellites visible above the horizon at all times.
🛰️ Orbit Type
Medium Earth Orbit (MEO) — 20,200 km altitude. Satellites orbit Earth twice per day at ~14,000 km/h.
⏱️ Atomic Clocks
Each satellite carries 4 atomic clocks (cesium + rubidium) accurate to 1 nanosecond. A 1ns error = 30cm position error.
📡 Signal Broadcast
Satellites continuously broadcast their precise location (ephemeris data) and current time on L1 (1575.42 MHz) and L2 (1227.60 MHz) frequencies.
🔄 Orbital Period
GPS satellites complete one orbit every 11 hours 58 minutes, so the same satellite returns to the same sky position every day, ~4 minutes earlier.
Trilateration: How GPS Calculates Your Position
GPS uses trilateration (not triangulation — which uses angles) to determine position from distance measurements. The process:
- Signal Reception: Your GPS receiver detects radio signals from multiple satellites simultaneously.
- Time-of-Arrival Measurement: The receiver compares the timestamp embedded in the satellite signal with its own clock to measure the signal travel time.
- Distance Calculation: Distance = Speed of Light × Travel Time. Since light travels at 299,792,458 m/s, a 0.066-second delay means the satellite is ~20,200 km away.
- Sphere Intersection: Each distance defines a sphere around that satellite where you could be located. Three spheres intersect at two points; one is usually impossible (in space), leaving your surface position.
- 4th Satellite for Clock Correction:The receiver's clock is imperfect. A 4th satellite creates an over-determined system that allows the receiver to solve for clock error simultaneously, correcting all distances.
GPS Accuracy Factors & HDOP
Civilian GPS typically achieves 3–5 meter horizontal accuracy under open sky. Several factors affect this:
🌐 Ionospheric Delay
The ionosphere (75–1000 km altitude) is a layer of charged particles that slows GPS signals unpredictably. This is the largest source of error (~5m). Dual-frequency receivers (L1+L2) can measure and correct this delay.
💧 Tropospheric Delay
Water vapor in the troposphere refracts signals, causing 0.5–2m of error. Atmospheric models in GPS software partially compensate.
🏢 Multipath Error
Signals reflecting off buildings and terrain arrive at the receiver after taking a longer path, appearing to come from a more distant satellite. Causes 1–50m errors in urban canyons.
📐 Satellite Geometry (HDOP)
Horizontal Dilution of Precision — when satellites are spread across the sky, errors are minimized (low HDOP = good). When satellites are clustered, position uncertainty magnifies (high HDOP = poor accuracy). HDOP < 2 is excellent.
SBAS (Satellite-Based Augmentation Systems) like WAAS (USA), EGNOS (Europe), and MSAS (Japan) broadcast real-time ionospheric and satellite error corrections, improving accuracy to under 1 meter for equipped receivers.
GPS vs GLONASS vs Galileo vs BeiDou
| System | Country | Satellites | Accuracy | Coverage |
|---|---|---|---|---|
| GPS | 🇺🇸 USA | 31+ | 3–5m | Global |
| GLONASS | 🇷🇺 Russia | 24+ | 5–10m | Global |
| Galileo | 🇪🇺 EU | 30 (30 planned) | 1m (HAS) | Global |
| BeiDou | 🇨🇳 China | 45+ | 2.5–5m | Global (APac enhanced) |
| NavIC | 🇮🇳 India | 9 | 5–10m | India + 1500km |
Using GPS Modules with Arduino & ESP32
The u-blox NEO-6M is the most popular GPS module for makers — cheap (~$5), reliable, and easy to use. It communicates via UART (serial) and outputs standard NMEA 0183 sentences containing position, speed, time, and satellite data.
Wiring NEO-6M to Arduino Uno
| NEO-6M Pin | Arduino Pin | Notes |
|---|---|---|
| VCC | 3.3V or 5V | Check module voltage tolerance |
| GND | GND | Common ground |
| TX (module) | Pin 4 (SoftwareSerial RX) | Module transmit → Arduino receive |
| RX (module) | Pin 3 (SoftwareSerial TX) | Use 3.3V level shifter if module is 3.3V |
Basic Arduino Code with TinyGPS++
#include <SoftwareSerial.h>
#include <TinyGPS++.h>
SoftwareSerial gpsSerial(4, 3); // RX=4, TX=3
TinyGPSPlus gps;
void setup() {
Serial.begin(115200);
gpsSerial.begin(9600);
}
void loop() {
while (gpsSerial.available()) gps.encode(gpsSerial.read());
if (gps.location.isUpdated()) {
Serial.print(gps.location.lat(), 6);
Serial.print(F(","));
Serial.println(gps.location.lng(), 6);
}
}
Frequently Asked Questions
How does GPS know your exact location?
GPS determines your location using trilateration — measuring the precise time it takes for radio signals to travel from multiple satellites to your receiver. Each satellite broadcasts its current time (from an atomic clock) and position. Your GPS receiver measures the time delay for each signal and calculates the distance. With distances from at least 4 satellites, it mathematically solves for your 3D position and corrects its own clock error.
Why does GPS need 4 satellites instead of 3?
Three satellites provide enough equations to solve for 3 unknowns (latitude, longitude, altitude). However, your GPS receiver's internal clock is far less accurate than the atomic clocks on satellites. This introduces a 4th unknown — the clock error. A 4th satellite provides the additional equation needed to solve all 4 unknowns simultaneously.
What affects GPS accuracy?
GPS accuracy is affected by: (1) Ionospheric delay — charged particles slow signals unpredictably. (2) Tropospheric delay — water vapor causes signal refraction. (3) Multipath errors — signals reflecting off buildings. (4) Satellite geometry (HDOP) — widely spaced satellites give better accuracy. (5) Receiver quality — high-quality receivers with better algorithms perform significantly better.
What is the difference between GPS, GLONASS, and Galileo?
GPS is the American system (31 satellites). GLONASS is the Russian system (24+ satellites). Galileo is the European system (30 satellites, 1m accuracy guarantee). BeiDou is China's system (45+ satellites). Modern smartphones receive multiple systems simultaneously (called GNSS), dramatically improving fix speed and accuracy.
How do I use a GPS module with Arduino?
The most popular GPS module for Arduino is the NEO-6M. Connect VCC to 3.3V/5V, GND to ground, TX to Arduino RX pin, RX to Arduino TX pin. The module outputs NMEA sentences at 9600 baud by default. Use the TinyGPS++ library to parse latitude, longitude, altitude, speed, and date/time. First fix can take 30–90 seconds under open sky (cold start).
Conclusion
GPS is a remarkable convergence of orbital mechanics, atomic physics, signal processing, and software — delivering sub-5-meter accuracy to any device on Earth for free. The combination of multiple GNSS constellations, SBAS augmentation, and improving receiver technology continues to push civilian accuracy below 1 meter, opening new applications in autonomous vehicles, precision agriculture, and AR navigation.
Ready to build GPS projects? Start with the ESP32 guide for WiFi-connected GPS trackers, explore beginner Arduino projects, or learn how WiFi works to complement GPS with indoor positioning.
