GPS Simulation: Difference between revisions
m (→Introduction) |
|||
Line 8: | Line 8: | ||
[[File:TrinityCollege_s1r1.jpg]] | [[File:TrinityCollege_s1r1.jpg]] | ||
== Setup == | |||
Software to git clone - https://github.com/osqzss/gps-sdr-sim <br/> | Software to git clone - https://github.com/osqzss/gps-sdr-sim <br/> | ||
Follow the instructions on the github page for how to compile, it is a very easy procedure on Ubuntu with build-essential package installed. <br/> | Follow the instructions on the github page for how to compile, it is a very easy procedure on Ubuntu with build-essential package installed. <br/> | ||
Note there is a setting in gpssim.h for USER_MOTION_SIZE default 3000 max duration at 10MHz. You can increase that to 6000 or more to get longer default running times. | <nowiki>$ gcc gpssim.c -lm -O3 -o gps-sdr-sim</nowiki> | ||
Note there is a setting in gpssim.h for USER_MOTION_SIZE default 3000 max duration at 10MHz (300 seconds). You can increase that to 6000 or more to get longer default running times.<br/> | |||
The default sample rate for gps-sdr-sim is 2.6e6, 16 bit I/Q data format. LimeSDR will need 10e6, and 8 bit interleaved I/Q data format, so the strategy is to create and rf data file non-realtime and then transmit that with a simple gnuradio-companion script. The gps-fake-out project [http://sdrgps.blogspot.com/2016/12/gps-fake-out-with-limesdr.html] links to a grc file, or it's easy to create your own. That example project simultaneous transmits the rf data file and also collects rf data for later analysis with Matlab and SoftGNSS. I found it useful to replace the file sink with an fft display slightly offset, and 20e6 input rate. <br> | |||
<br/> | |||
The last puzzle piece needed are ephemeris data to feed gps-sdr-sim (required), RINEX v2 format ( read all about it here [ftp://ftp.unibe.ch/aiub/rinex/rinex211.txt] - especially the file name format). There is a global network of Internation GNSS Service installations [http://www.igs.org/network] providing up the date data, which may be accessed with at Goddard Space Flight Center | |||
<nowiki>ftp -p cddis.gsfc.nasa.gov</nowiki> | |||
Login anonymous 'ftp' and email for password. Use the merged GPS broadcast ephemeris file found in /pub/gps/data/daily/2017/brdc/. The filename convention is | |||
<nowiki>'brdc' + < 3 digit day of year > + '0.' + <2 digit year> + n.Z (compressed).</nowiki> | |||
Day of year can be found with | |||
<nowiki>$ date +%j</nowiki> | |||
Get yesterdays - for example, today, Feb 28, 2017, I would get 'brdc0580.17n.Z', uncompress | |||
<nowiki>$ uncompress brdc0580.17n.Z</nowiki> | |||
Revision as of 17:14, 28 February 2017
Introduction
This page details experiences using LimeSDR to simulate GPS.
These experiments were inspired by the excellent procedure written up here [1]. We want to use a similar process to target real devices, and have had luck with a qstarz 818XT bluetooth gps device a couple of inches from an antenna. Here I am visiting Trinity College Cambridge.
Setup
Software to git clone - https://github.com/osqzss/gps-sdr-sim
Follow the instructions on the github page for how to compile, it is a very easy procedure on Ubuntu with build-essential package installed.
$ gcc gpssim.c -lm -O3 -o gps-sdr-sim
Note there is a setting in gpssim.h for USER_MOTION_SIZE default 3000 max duration at 10MHz (300 seconds). You can increase that to 6000 or more to get longer default running times.
The default sample rate for gps-sdr-sim is 2.6e6, 16 bit I/Q data format. LimeSDR will need 10e6, and 8 bit interleaved I/Q data format, so the strategy is to create and rf data file non-realtime and then transmit that with a simple gnuradio-companion script. The gps-fake-out project [2] links to a grc file, or it's easy to create your own. That example project simultaneous transmits the rf data file and also collects rf data for later analysis with Matlab and SoftGNSS. I found it useful to replace the file sink with an fft display slightly offset, and 20e6 input rate.
The last puzzle piece needed are ephemeris data to feed gps-sdr-sim (required), RINEX v2 format ( read all about it here [3] - especially the file name format). There is a global network of Internation GNSS Service installations [4] providing up the date data, which may be accessed with at Goddard Space Flight Center
ftp -p cddis.gsfc.nasa.gov
Login anonymous 'ftp' and email for password. Use the merged GPS broadcast ephemeris file found in /pub/gps/data/daily/2017/brdc/. The filename convention is
'brdc' + < 3 digit day of year > + '0.' + <2 digit year> + n.Z (compressed).
Day of year can be found with
$ date +%j
Get yesterdays - for example, today, Feb 28, 2017, I would get 'brdc0580.17n.Z', uncompress
$ uncompress brdc0580.17n.Z
|