gps-sdr-sim: Software-Defined GPS Signal Simulator
GPS-SDR-SIM
GPS-SDR-SIM generates GPS baseband signal data streams, which can be converted to RF using software-defined radio (SDR) platforms, such as bladeRF, HackRF, and USRP.
Windows build instructions
- Start Visual Studio.
- Create an empty project for a console application.
- On the Solution Explorer at right, add “gpssim.c” and “getopt.c” to the Souce Files folder.
- Select “Release” in Solution Configurations drop-down list.
- Build the solution.
Building with GCC
Generating the GPS signal file
A user-defined trajectory can be specified in either a CSV file, which contains the Earth-centered Earth-fixed (ECEF) user positions, r an NMEA GGA stream. The sampling rate of the user motion has to be 10Hz. The user is also able to assign a static location directly through the command line.
The user specifies the GPS satellite constellation through a GPS broadcast ephemeris file. The daily GPS broadcast ephemeris file (brdc) is a merge of the individual site navigation files into one. The archive for the daily file is:
ftp://cddis.gsfc.nasa.gov/gnss/data/daily/
These files are then used to generate the simulated pseudo-range and Doppler for the GPS satellites in view. This simulated range data is then used to generate the digitized I/Q samples for the GPS signal.
The bladeRF command line interface requires I/Q pairs stored as signed 16-bit integers, while the hackrf_transfer and gps-sdr-sim-uhd.py support signed bytes.
HackRF and bladeRF require 2.6 MHz sample rate, while the USRP2 requires 2.5 MHz (an even integral decimator of 100 MHz).
The simulation start time can be specified if the corresponding set of ephemerides is available. Otherwise, the first time of ephemeris in the RINEX navigation file is selected.
The maximum simulation duration time is defined by USER_MOTION_SIZE to prevent the output file from getting too large.
The output file size can be reduced by using “-b 1” option to store four 1-bit I/Q samples into a single byte. You can use bladeplayer for bladeRF to playback the compressed file.
The user motion can be specified in either dynamic or static mode:
Transmitting the samples
The TX port of a particular SDR platform is connected to the GPS receiver under test through a DC block and a fixed 50-60dB attenuator.
The simulated GPS signal file, named “gpssim.bin”, can be loaded into the bladeRF for playback as shown below:
You can also execute these commands via the bladeRF-cli
script option as below:
For the HackRF:
For UHD supported devices (tested with USRP2 only):
Copyright © 2015-2018 Takuji Ebinuma
Source: https://github.com/osqzss/