-
Notifications
You must be signed in to change notification settings - Fork 786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPS-SDR-SIM #169
Open
WuMason
wants to merge
43
commits into
osqzss:master
Choose a base branch
from
gym487:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
GPS-SDR-SIM #169
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Support realtime with user command input file/point.
Peterthegreat
approved these changes
Oct 8, 2020
http.server seems to be slow to handle massive requests.
And finally I found that web.py supports Python 3...
Add Python 3 support
SultanSuhail
added a commit
to SultanSuhail/gps-sdr-sim
that referenced
this pull request
May 31, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
GPS-SDR-SIM realtime
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
$ gcc gpssim.c -lm -O3 -o gps-sdr-sim
Realtime by Gnuradio
Use -n option can connect to a TCP source in Gnuradio for realtime simulation.
The tcp source should be set in "Server" mode.
See tcp.grc as an example.
Map
Run gps-sdr-sim with -w option, and
cd into /mapserver, and run
python mapper.py
Then visit http://127.0.0.1:8080/static/baidumap.html to use the baidu Online map.
Actually I don't want to use BaiduMap.. But because of the GFW, I can't access Google..
You can write an map which can POST data to http://127.0.0.1:8080/post like this
lon=116&lat=39&hgt=10
to replace Baidumap.
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, 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 ephemers 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 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.
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)
-l 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 [sec] (dynamic mode max: 300 static mode max: 86400)
-o I/Q sampling data file (default: gpssim.bin)
-s 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
-n Use TCP connection to Gnuradio TCP-Source for realtime simulation.
-w Connect with map server(/mapserver/mapper.py) by udp on port 5678.
The user motion can be specified in either dynamic or static mode:
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: