gps-sdr-sim-master_xhl

所属分类:其他
开发工具:C/C++
文件大小:8634KB
下载次数:0
上传日期:2021-04-14 12:49:40
上 传 者xuhoule
说明:  C语言编写的GPS模拟器,能够模拟GNSS信号。
(GPS simulator written in C language can simulate GNSS signal.)

文件列表:
xhl (0, 2021-02-15)
xhl\bladerf.script (150, 2020-12-06)
xhl\brdc3540.14n (270728, 2020-12-06)
xhl\circle.csv (135000, 2020-12-06)
xhl\extclk (0, 2020-12-15)
xhl\extclk\extclk.GBL (13518, 2020-12-06)
xhl\extclk\extclk.GBS (459, 2020-12-06)
xhl\extclk\extclk.GML (209, 2020-12-06)
xhl\extclk\extclk.GTL (22056, 2020-12-06)
xhl\extclk\extclk.GTO (1925, 2020-12-06)
xhl\extclk\extclk.GTS (669, 2020-12-06)
xhl\extclk\extclk.TXT (244, 2020-12-06)
xhl\extclk\hackrf_gpssim.jpg (131141, 2020-12-06)
xhl\extclk\hackrf_tcxo.jpg (168104, 2020-12-06)
xhl\getopt.c (4248, 2020-12-15)
xhl\getopt.h (148, 2020-12-06)
xhl\gps-sdr-sim-master.zip (4436925, 2020-12-25)
xhl\gpssim.c (68133, 2021-01-12)
xhl\gpssim.h (5656, 2020-12-25)
xhl\LICENSE (1082, 2020-12-06)
xhl\Makefile (1019, 2020-12-06)
xhl\player (0, 2020-12-15)
xhl\player\bladeplayer.c (8945, 2020-12-06)
xhl\player\hackplayer.c (6473, 2020-12-06)
xhl\player\limeplayer.c (14792, 2020-12-06)
xhl\player\limeplayer_win (0, 2020-12-15)
xhl\player\limeplayer_win\Default_TX_Antenna.jpg (160456, 2020-12-06)
xhl\player\limeplayer_win\getopt.c (4263, 2020-12-15)
xhl\player\limeplayer_win\getopt.h (148, 2020-12-06)
xhl\player\limeplayer_win\limeplayer.c (11901, 2020-12-06)
xhl\player\limeplayer_win\limeplayer.png (24753, 2020-12-06)
xhl\player\Makefile (897, 2020-12-06)
xhl\player\plutoplayer.c (8174, 2020-12-06)
xhl\rocket.csv (175545, 2020-12-06)
xhl\rtk (0, 2020-12-15)
xhl\rtk\base.csv (135000, 2020-12-06)
... ...

# 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 [ADALM-Pluto](https://wiki.analog.com/university/tools/pluto), [bladeRF](http://nuand.com/), [HackRF](https://github.com/mossmann/hackrf/wiki), and [USRP](http://www.ettus.com/). ### Windows build instructions 1. Start Visual Studio. 2. Create an empty project for a console application. 3. On the Solution Explorer at right, add "gpssim.c" and "getopt.c" to the Souce Files folder. 4. Select "Release" in Solution Configurations drop-down list. 5. Build the solution. ### Building with GCC ``` $ gcc gpssim.c -lm -O3 -o gps-sdr-sim ``` ### Using bigger user motion files In order to use user motion files with more than 30000 samples (at 10Hz), the `USER_MOTION_SIZE` variable can be set to the maximum time of the user motion file in seconds. It is advisable to do this using make so gps-sdr-bin can update the size when needed. e.g: ``` $ make USER_MOTION_SIZE=4000 ``` This variable can also be set when compiling directly with GCC: ``` $ gcc gpssim.c -lm -O3 -o gps-sdr-sim -DUSER_MOTION_SIZE=4000 ``` ### 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 ephemeris file (brdc) is a merge of the individual site navigation files into one. The archive for the daily file can be downloaded from: https://cddis.nasa.gov/archive/gnss/data/daily/. Access to this site requires registration, which is free. 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 and ADALM-Pluto 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, bladeRF and ADALM-Pluto 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](https://github.com/osqzss/gps-sdr-sim/tree/master/player) for bladeRF to playback the compressed file. ``` Usage: gps-sdr-sim [options] Options: -e RINEX navigation file for GPS ephemerides (required) -u User motion file (dynamic mode) -g NMEA GGA stream (dynamic mode) -c ECEF X,Y,Z in meters (static mode) e.g. 3967283.15,1022538.18,4872414.48 -l Lat,Lon,Hgt (static mode) e.g. 30.286502,120.032669,100 -t Scenario start time YYYY/MM/DD,hh:mm:ss -T Overwrite TOC and TOE to scenario start time -d Duration [sec] (dynamic mode max: 300 static mode max: 8***00) -o I/Q sampling data file (default: gpssim.bin ; use - for stdout) -s Sampling frequency [Hz] (default: 2600000) -b 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 ``` ### 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. #### BladeRF: 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 ``` #### HackRF: ``` > hackrf_transfer -t gpssim.bin -f 1575420000 -s 2600000 -a 1 -x 0 ``` #### UHD supported devices (tested with USRP2 only): ``` > gps-sdr-sim-uhd.py -t gpssim.bin -s 2500000 -x 0 ``` #### LimeSDR (in case of 1 Msps 1-bit file, to get full BaseBand dynamic and low RF power): ``` > limeplayer -s 1000000 -b 1 -d 2047 -g 0.1 < ../circle.1b.1M.bin ``` #### ADALM-Pluto (PlutoSDR): The ADALM-Pluto device is expected to have its network interface up and running and is accessible via "pluto.local" by default. Default settings: ``` > plutoplayer -t gpssim.bin ``` Set TX attenuation: ``` > plutoplayer -t gpssim.bin -a -30.0 ``` Default -20.0dB. Applicable range 0.0dB to -80.0dB in 0.25dB steps. Set RF bandwidth: ``` > plutoplayer -t gpssim.bin -b 3.0 ``` Default 3.0MHz. Applicable range 1.0MHz to 5.0MHz. ### License Copyright © 2015-2018 Takuji Ebinuma Distributed under the [MIT License](http://www.opensource.org/licenses/mit-license.php).

近期下载者

相关文件


收藏者