
Real-time GPS signal simulator for bladeRF
Very crude experimental implementation of gps-sdr-sim for real-time signal generation. The code works with bladeRF and has been tested on Windows 10 and Ubuntu 20.04.
Usage: bladegps [options]
Options:
-e <gps_nav> RINEX navigation file for GPS ephemerides (required)
-y <yuma_alm> YUMA almanac file for GPS almanacs
-u <user_motion> User motion file (dynamic mode)
-g <nmea_gga> NMEA GGA stream (dynamic mode)
-l <location> Lat,Lon,Hgt (static mode) e.g. 35.274,137.014,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] (max: 86400)
-x <XB_number> Enable XB board, e.g. '-x 200' for XB200
-i Interactive mode: North='w', South='s', East='d', West='a'
-I Disable ionospheric delay for spacecraft scenario
-p Disable path loss and hold power level constant
Follow the instructions at Nuand wiki page and build the bladeRF library from the source with Visual Studio 2013 Express for Windows Desktop. Assume you already downloaded pthread and libusb files and successfully built the bladeRF library for your Windows environment.
Configuration Properties -> C/C++ -> General -> Additional Include Directories:
Configuration Properties -> Linker -> General -> Additional Library Directories:
Configuration Properties -> Linker -> Input -> Additional Dependencies:
Build -> Build SolutionAfter a successful build, you can find the executable in the Release folder. You should put the copies of the following DLLs in the same folder to run the code:
Retrieve the bladeRF source in a directory next to the current directory
$ cd ..
$ git clone [email protected]:Nuand/bladeRF.git
Build the bladeRF host library
$ cd bladeRF/host
$ mkdir build
$ cd build
$ cmake ..
$ make
Build bladeGPS
$ cd ../../../bladeGPS
$ make
Install Xcode
Install Xcode Command Line Tools
$ xcode-select --install
Install MacPorts
Create a symlink to port
$ sudo ln -s /opt/local/bin/port /usr/local/bin/port
Install bladeRF
$ sudo port install bladeRF +tecla
Install cmake
$ sudo port install cmake
Retrieve the bladeRF source in a directory next to the current directory
$ cd ..
$ git clone [email protected]:Nuand/bladeRF.git
Build the bladeRF host library
$ cd bladeRF/host
$ mkdir build
$ cd build
$ cmake ..
$ make && sudo make install
Install libomp and wget
$ sudo port install libomp
$ sudo port install wget
Compile for _MACOSX with OpenMP path and build bladeGPS
$ cd ../../../bladeGPS
$ make CFLAGS=”-I/opt/local/include/libomp _MACOSX”
A Dockerfile was created from Ubuntu 20.04 image that allows you to spin up
a docker container in seconds.
Build docker image
$ cd docker
$ docker build -t bladegps .
Run bladegps command directly
$ docker run -it --rm --privileged --device /dev/ttyUSB0 bladegps \
/bin/bash -c "bladegps -e /opt/bladeGPS/brdc3300.18n -l 35.274,137.014,100 -d 86400"
Run bladegps command from docker cli
$ docker run -it --rm --privileged --device /dev/ttyUSB0 bladegps /bin/bash
bladegps@cb744220dea3:~$ bladegps -e /opt/bladeGPS/brdc3300.18n -l 35.274,137.014,100 -d 86400
A docker-compose.yml example is provided, if you want to run bladegps as a
service, restarting when it hits end of duration. Edit command and the device
name before starting up service using docker-compose.
Run docker-compose service in background
$ cd docker
$ docker-compose up -d
Check docker-compose process status
$ docker-compose ps
Connect to container running service, if desired
$ docker-compose exec bladegps /bin/bash
Down the service when done
$ docker-compose down
Copyright © 2015-2022 Takuji Ebinuma
Distributed under the MIT License.