you need to install uhd before everything(reference http://www.zhixun-wireless.top/install-uhd-and-gnuradio-on-ubuntu-1604 to install uhd).

the instrunction of gps-sdr-sim can be found in its readme:

https://github.com/osqzss/gps-sdr-sim

however it did not tell how to use usrp b210 to send the generated gps signal.

generate gpssim.bin for b210, run this command:

./gps-sdr-sim -v -e brdc1300.19n -b 16 -s 2600000 -l 30.286502,120.032669,100 -d 200

it is very important to set rate as 2600000 rather than 2500000 mentioned in gps-sdr-sim readme. if set to 2500000 some cell phone will not detect gps signal.

if want to generate moving gps signal you can use this command:

gps-sdr-sim -e brdc3540.14n -b 16 -s 2600000 -u circle.csv

or

gps-sdr-sim -e brdc3540.14n -b 16 -s 2600000 -g triumphv3.txt

circle.csv and triumphv3.txt are track file in different format. they are both in the gps-sdr-sim git repo.

find tx_samples_from_file in your / folder

cd /
sudo find -name tx_samples_from_file

copy tx_samples_from_file to the same folder of gpssim.bin

then run

sudo ./tx_samples_from_file --args="master_clock_rate=52e6" --file gpssim.bin --type short --rate 2600000 --freq 1575420000 --gain 50 --repeat

the sample rate should be 2600000

if want to use external 10Mhz clock then run

sudo ./tx_samples_from_file --args="master_clock_rate=52e6" --file gpssim.bin --type short --rate 2600000 --freq 1575420000 --gain 50 --repeat --ref external

if want to use channel B then add --subdev=A:B