gps-sdr-sim step - t17 lab · gps-sdr-sim gps-sdr-sim step building with gcc gcc gpssim.c -lm -o3...
TRANSCRIPT
gps-sdr-sim https://github.com/osqzss/gps-sdr-sim
gps-sdr-sim
step Building with GCC
gcc gpssim.c -lm -O3 -o gps-sdr-sim
Generating the GPS signal file
> 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
or
> ./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
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 <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
-d <duration> Duration [sec] (max: 300)
-o <output> I/Q sampling data file (default: gpssim.bin)
-s <frequency> Sampling frequency [Hz] (default: 2600000)
-b <iq_bits> I/Q data format [1/8/16] (default: 16)
-v Show details about simulated channels
for hack rf should add "-b 8"
for example
./gps-sdr-sim -e brdc3540.14n -l 30.286502,120.032669,100 -b 8
Then Transmitting the samples
hackrf_transfer -t gpssim.bin -f 1575420000 -s 2600000 -a 1 -x 0
NOTE External Clock Interface (CLKIN and CLKOUT)
HackRF One produces a 10 MHz clock signal on CLKOUT. The signal is a 10 MHz square wave from
0 V to 3 V intended for a high impedance load.
The CLKIN port on HackRF One is a high impedance input that expects a 0 V to 3 V square wave at
10 MHz. Do not exceed 3.3 V or drop below 0 V on this input. Do not connect a clock signal at a
frequency other than 10 MHz (unless you modify the firmware to support this). You may directly
connect the CLKOUT port of one HackRF One to the CLKIN port of another HackRF One.
HackRF One uses CLKIN instead of the internal crystal when a clock signal is detected on CLKIN.
The switch to or from CLKIN only happens when a transmit or receive operation begins.
To verify that a signal has been detected on CLKIN, use hackrf_si5351c -n 0 -r. The expected output
with a clock detected is [ 0] -> 0x01. The expected output with no clock detected is [ 0] -> 0x51.
來自 <https://github.com/mossmann/hackrf/wiki/HackRF-One>
You have to set the GPS signal level properly. It is very weak and shouldn't be seen on a spectrum
analyzer. The typical signal strength is -130dBm, and it is below the noise floor with the GPS signal
bandwidth. You may need 30dB to 40dB extra attenuation. Otherwise, the receiver could be
overwhelmed and see the unseen signals due to the cross-correlations.
If you are an Android user, try AndroiTS GPS Test and set the TX power to make the signal level
around 40.
來自 <osqzss/gps sdr sim#26>
photo
The output signal from hackrf-one. but at this time, we can not get GPS solution.
The output signal from hackrf-one. We can get GPS solution at this time.
issue add clock
antenna
distance
consider free space loss: https://www.pasternack.com/t-calculator-fspl.aspx
30 cm about -25.93dB at 1575.42MHz