osqzss / gps-sdr-sim

Software-Defined GPS Signal Simulator
MIT License
2.61k stars 761 forks source link

Running problem #347

Open SpongeBobaa opened 1 year ago

SpongeBobaa commented 1 year ago

When I do ./gps-sdr-sim -e brdc3540 .14n -l 31.603202, 120.466576, 100 -b 8 -d 100

Print: Using static location mode. xyz = 5437244.4, 0.0, 3323038.3 llh = 31.603202, 0.000000, 0.0 ERROR: ephemeris file not found.

Could anyone tell me how to solve the error?

osqzss commented 1 year ago

Try ./gps-sdr-sim -e brdc0010.22n -l 31.603202,120.466576,100 -b 8 -d 100

SpongeBobaa commented 1 year ago

thanks a lot

I use the USRP B210 to do the test, I run sudo python3 gps-sdr-sim-uhd.py -t gpssim.bin -s 2500000 -x 0

Print: [INFO] [UHD] linux; GNU C++ version 9.3.0; Boost_107100; UHD_3.15.0.0-release [INFO] [B200] Detected Device: B210 [INFO] [B200] Operating over USB 3. [INFO] [B200] Initialize CODEC control... [INFO] [B200] Initialize Radio control... [INFO] [B200] Performing register loopback test... [INFO] [B200] Register loopback test passed [INFO] [B200] Performing register loopback test... [INFO] [B200] Register loopback test passed [INFO] [B200] Setting master clock rate selection to 'automatic'. [INFO] [B200] Asking for clock rate 16.000000 MHz... [INFO] [B200] Actually got clock rate 16.000000 MHz. [INFO] [B200] Asking for clock rate 40.000000 MHz... [INFO] [B200] Actually got clock rate 40.000000 MHz. Press Enter to quit: UUUUUUUUUUUU

The port of TX is always on, but it seemed the GPS of my phone didn't change.

Should I buy a GPS antenna? or should I install something like GPSDO in my usrp?

osqzss commented 1 year ago

You need to specify the sampling rate in gps-sdr-sim; ./gps-sdr-sim -e brdc0010.22n -l 31.603202,120.466576,100 -s 2500000 -b 8 -d 100

bkerler commented 1 year ago

The B210 only has an internal clock of 30.72 Mhz, not 100 Mhz. "./gps-sdr-sim -b 16 -e brdc3470.22n -l 49.1234,8.1234,10.0 -s 3072000 -o gpssim_b16.bin" does work fine with a gnuradio flowgraph. Or use "gps-sdr-sm.uhd.py -b 16 -s 3072000 -x 30" with an attenuator. You can also replace -x 30 with -x 0 but then it might be you are getting no lock. Anything other I tried totally failed with b210 (note hackrf had no issues at all).

osqzss commented 1 year ago

Does this help? https://github.com/osqzss/gps-sdr-sim/issues/50