GPS-SDR-SIM generates GPS baseband signal data streams, which can be converted to RF using the bladeRF software-defined radio (SDR).
Use the following tutorial links to Install libbladeRF and bladeRF-cli on Windows, Linux, or on Mac OSX.
Pre-build Linux PPA packages exist on LaunchPad.
Download the appropriate bladeRF FPGA file from the Nuand FPGA repository.
- 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.
$ gcc gpssim.c -lm -O3 -o gps-sdr-sim
A user-defined trajectory can be specified in either a CSV file, which contains the Earth-centered Earth-fixed (ECEF) user positions, or 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 pseudorange 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 interface requires I/Q pairs stored as signed 16-bit integers.
The bladeRF requires 2.6 MHz sample rate.
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.
Usage: gps-sdr-sim [options]
Options:
-e <gps_nav> RINEX navigation file for GPS ephemerides (required)
-u <user_motion> User motion file (dynamic mode)
-g <nmea_gga> NMEA GGA stream (dynamic mode)
-c <location> ECEF X,Y,Z in meters (static mode) e.g. 3967283.15,1022538.18,4872414.48
-l <location> Lat,Lon,Hgt (static mode) e.g. 30.286502,120.032669,100
-t <date,time> Scenario start time YYYY/MM/DD,hh:mm:ss
-T <date,time> Overwrite TOC and TOE to scenario start time
-d <duration> Duration [sec] (dynamic mode max: 300 static mode max: 86400)
-o <output> I/Q sampling data file (default: gpssim.bin ; use - for stdout)
-s <frequency> Sampling frequency [Hz] (default: 2600000)
-b <iq_bits> I/Q data format [1/8/16] (default: 16)
-i Disable ionospheric delay for spacecraft scenario
-v Show details about simulated channels
The user motion can be specified in either dynamic or static mode:
> gps-sdr-sim -e brdc3540.14n -u circle.csv
> gps-sdr-sim -e brdc3540.14n -g triumphv3.txt
> gps-sdr-sim -e brdc3540.14n -l 30.286502,120.032669,100
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:
set frequency 1575.42M
set samplerate 2.6M
set bandwidth 2.5M
set txvga1 -25
cal lms
cal dc tx
tx config file=gpssim.bin format=bin
tx start
You can also execute these commands via the bladeRF-cli
script option as below:
> bladeRF-cli -s bladerf.script
Copyright © 2015-2018 Takuji Ebinuma
Distributed under the MIT License.