GPS Positioning Simulator: Trilateration, GDOP & Accuracy

simulator intermediate ~12 min
Loading simulation...
CEP95 ≈ 3.2 m — 95% of fixes within 3.2 m of true position

With 6 satellites, GDOP=2.5, and 5 m ionospheric delay, the 95% horizontal accuracy is about 3.2 m — typical single-frequency GPS performance in open sky.

Formula

ρᵢ = |r_sat_i - r_user| + c·δt + I + T + ε
σ_pos = GDOP × σ_range
CEP95 ≈ 2.0 × σ_horizontal

Signals from Space

The Global Positioning System consists of 31 satellites orbiting at 20,200 km altitude, each broadcasting its precise position and atomic clock time. A GPS receiver on the ground measures the time delay of each satellite's signal, converting it to a pseudorange — the apparent distance corrupted by clock bias and atmospheric delays. With four or more pseudoranges, the receiver solves for its three position coordinates plus its clock error.

Trilateration Geometry

Each pseudorange defines a sphere centered on a satellite. The receiver's position lies at the intersection of these spheres. With exactly four satellites, the system is determined (4 equations, 4 unknowns). Additional satellites overdetermine the system, enabling least-squares estimation that averages out noise. The simulation visualizes these range spheres projected onto a 2D plane, showing how they intersect to pinpoint position.

Dilution of Precision

Not all satellite configurations are equal. When satellites are spread evenly across the sky, the range-sphere intersections form a tight cluster — low GDOP, high accuracy. When satellites are bunched together, the intersections become elongated — high GDOP, degraded accuracy. The simulation lets you drag satellite positions and watch the GDOP value and position uncertainty ellipse change in real time. Urban canyons and mountainous terrain often restrict visible sky, increasing GDOP.

Error Sources and Mitigation

GPS errors come from satellite clock drift (~2 m), ephemeris errors (~2 m), ionospheric delay (2-15 m), tropospheric delay (~0.5 m), multipath reflections (~1 m), and receiver noise (~0.5 m). Dual-frequency receivers eliminate ionospheric delay. Differential GPS (DGPS) uses a nearby reference station to cancel common errors, achieving sub-meter accuracy. The simulator lets you tune each error source and observe the combined effect on position accuracy.

FAQ

How does GPS determine position?

GPS measures the time for signals to travel from satellites to receiver, converting to distance (pseudorange). With 4+ satellite distances, the receiver solves a system of equations for 3 position coordinates plus clock bias. This is trilateration — intersecting spheres centered at known satellite positions.

Why are 4 satellites needed instead of 3?

Three satellites would suffice if the receiver clock were perfectly synchronized with GPS time. Since consumer receivers use cheap quartz oscillators with microsecond errors, a fourth satellite is needed to solve for the additional unknown: receiver clock bias. Each nanosecond of clock error adds 30 cm of range error.

What is GDOP and why does it matter?

Geometric Dilution of Precision (GDOP) measures how satellite geometry amplifies measurement errors into position errors. When satellites are spread across the sky, GDOP is low (~2) and positioning is accurate. When clustered together (e.g., all in one direction), GDOP is high (>6) and accuracy degrades proportionally.

How accurate is modern GPS?

Standard GPS provides 3-5 m accuracy (95%). Dual-frequency receivers achieve 1-2 m by removing ionospheric delay. RTK (Real-Time Kinematic) GPS using carrier-phase measurements achieves 1-2 cm accuracy. PPP (Precise Point Positioning) reaches similar accuracy without a local base station.

Sources

Embed

<iframe src="https://homo-deus.com/lab/navigation/gps-positioning/embed" width="100%" height="400" frameborder="0"></iframe>
View source on GitHub