This app takes as input:
- an SDR IQ recording
- or an rtl-sdr device
It performs signal acquisition, tracking and ephemeris decoding. Finally it attempts to get a position fix.
Note that this is still a WIP.
As the gnss receiver processes the IQ data it periodically updates a web page (index.html + pics) that helps explain the inner state of the decoder. Cf plots/index.html.
You need to install librtlsdr:
$ sudo apt install librtlsdr-dev
or
$ brew install librtlsdr
$ RUST_LOG=info cargo run --release -- -f path/to/recording.bin
Note that the app supports multiple IQ file formats: i8, 2xf16, 2xf32, etc. This can be specified via the cmd-line option -t.
The one I used for most of the development: https://github.com/codyd51/gypsum/releases/download/1.0/nov_3_time_18_48_st_ives.zip .. unzip and move the file under resources/. Use "-t 2xf32".
A few online SDR recordings at 1575,42 MHz are available online:
- https://jeremyclark.ca/wp/telecom/rtl-sdr-for-satellite-gps/
- https://s-taka.org/en/gnss-sdr-with-rtl-tcp/
- https://destevez.net/2022/03/timing-sdr-recordings-with-gps/
The info required to download/generate samples data: README.md
Cf GPS-SDR-SIM
./gps-sdr-sim -b 16 -d 60 -t 2022/01/01,01:02:03 -l 35.681298,139.766247,10.0 -e brdc0010.22n -s 2046000
This generates an IQ recording w/ 2 int16 per I and Q sample. You can use this using the cmd-line option "-t 2xf16".
If you have an rtlsdr dongle with a GPS L1 antenna you can try to run the receiver directly off of the IQ sampled by the device:
$ RUST_LOG=warn cargo run --release -- -d
WIP: I haven't been able to identify satellites by using rtlsdr directly with my h/w setup. Not sure it's due to a bug or my setup.
If you have a device w/ an rtlsdr dongle, you can use rtl_tcp on that host to stream the IQ data to a gnss-rcv instance running on a different host. Run rtl_tcp on host w/ rtlsdr device:
$ rtl_tcp -a
and connect to it w/ gnss-rcv:
$ RUST_LOG=warn cargo run --release -- -h <hostname>
gnss-rcv will automatically configure the sampling rate, center frequency, etc. WIP: same caveat
You can use your rtlsdr device to capture a set of IQ samples that can then be fed to gnss-rcv.
- you need to activate bias-t and power the gps/lna antenna:
$ rtl_biast -d 0 -b 1
- command to sample L1 at 2046KHz for 10 sec:
$ rtl_sdr -f 1575420000 -s 2046000 -n 20460000 output.bin
WIP: same caveat
- RTL-SDR
- Software Defined GPS
- GPS-SDR-SIM
- Python GPS software: Gypsum
- SWIFT-NAV
- Raw GPS Signal
- PocketSDR
- finish position fix computation
- test + fix rtlsdr support
- support: SBAS, Galileo, QZSS, Beidu.
- handle different sampling frequencies
- add a minimal UI: ratatui/egui