A fully modular, end-to-end simulation of a civilian Global Navigation Satellite System (GNSS) receiver pipeline written in Python. This project implements the essential components of a software GNSS receiver, including satellite signal generation, channel effects, receiver processing, and position computation.
This simulator models the following GNSS receiver pipeline:
- Satellite Transmitters: Simulated PRN-coded signals (C/A code)
- Signal Propagation Medium: Models delays, Doppler, noise, and real-world errors
- Receiver: Tracks signals, extracts pseudoranges
- Navigation Engine: Solves for receiver position and clock bias
- Main Script: Combines all components into a test scenario
Designed to replicate realistic GNSS reception and solve the Position, Velocity, Time (PVT) problem up to the Position level (Level 6).
The pseudorange measured by the receiver from satellite
Where:
-
$\rho_i$ : measured pseudorange -
$R_i$ : geometric range between receiver and satellite -
$c \delta t$ : receiver clock bias -
$c \delta t_i^{\text{sat}}$ : satellite clock bias -
$I_i$ ,$T_i$ : ionospheric and tropospheric delays -
$M_i$ : multipath delay -
$\epsilon_i$ : measurement noise
To solve for the receiver position and clock bias, the following nonlinear system is constructed:
Where
- Simulates PRN-coded signal generation
- Computes code phase and Doppler shift from satellite-to-receiver geometry
- Emits signal sampled at user-defined frequency
-
Propagates signals from all transmitters to receiver
-
Adds:
- Satellite clock bias
$c\delta t^{\text{sat}}$ - Ionospheric delay
$I_i$ - Tropospheric delay
$T_i$ - Multipath delay
$M_i$ - AWGN
$\epsilon_i$
- Satellite clock bias
-
Returns composite signal and component-wise pseudoranges
- Tracks the satellite signals (simulation)
- Extracts pseudoranges from signal or directly from medium
- Solves for
$(x, y, z, \delta t)$ using Gauss-Newton iteration - Converts ECEF position to LLA (Latitude, Longitude, Altitude)
# Pseudocode:
1. Define satellites with positions and velocities
2. Define true receiver position (ECEF)
3. Simulate signal propagation with Medium
4. Receiver extracts pseudoranges
5. NavigationEngine solves for position
6. Compare estimated vs true positionThe linearized system:
Where:
-
$H$ : Jacobian matrix (partial derivatives wrt position and clock bias) -
$\Delta \rho$ : residuals between measured and predicted pseudoranges -
$\Delta x$ : update to$[x, y, z, c\delta t]$
Updated iteratively until
gnss_simulator/
├── main.py
├── transmitter.py
├── medium.py
├── receiver.py
├── navigation.py
└── README.md
- Ephemeris-based orbital motion
- Real NAV message decoding
- Dual-frequency ionosphere mitigation
- Doppler-based velocity estimation
- Kalman filtering and RTK
- Integration with real RF front ends (SDR)