There is software defined radio (SDR) that captures radio waves into a computer and demodulates the radio signals by signal processing. Even if the signal format changes, the same hardware can be used by software update.
In this time, I used a software, GNSS-SDR, to demodulate and position from GPS signals collected remotely. Eventually, positioning was not possible, but it seems to be a bit more.
The device configuration consists of a GPS antenna on the roof, USB DTV dongle, and Raspberry Pi 2 that converts a GPS reception signal into the Ethernet packet. This signal is transmitted to the laboratory using the campus Ethernet, and the signal is demodulated in real time by the software GNSS-SDR on the Mac in the laboratory.
The system consists of a rooftop GPS antenna, USB dongle, and a Raspberry Pi 2. The Raspberry Pi 2 converts GPS received radio waves into packets and transmits the signals via campus Ethernet. This signal is demodulated in real time by software GNSS-SDR on the laboratory PC.
GNSS-SDR runs on GNU Radio, a platform written in the programming languages Python and C++. The source code of this GNSS-SDR is open to the public and can be modified. When using GNU Radio on an OS other than Linux, we need various know-how such as matching the library version. However, this GNSS-SDR also have a docker version that works on containers. Therefore, GNSS-SDR can be installed easily.
I connected USB dongle, GPS antenna, power supply, and Ethernet cable to Raspberry Pi, and installed
rtl-sdr with apt-get command. We can transfer the GPS signal to the laboratory PC with the
rtl_tcp. This procedure allows digitized GPS L1 radio signal packets to flow over the Ethernet.
Almost all GPS antenna has a built-in low noise amplifier (LNA). The LNA must be powered, but this dongle has a “bias tee” that can power the LNA. Therefore, install the software rtl_biast to instruct the power supply to this dongle.
libusb-1.1-0 required for rtl_biast should already be installed. If the old version
libusb-0.1-4 is installed, uninstall it. Or
# rmmod dvb_usb_rtl28xxu
to unload the unnecessary kernel module.
Then, send the signal received by this USB dongle to Ethernet. I made the following shell script.
rtl_biast -d 1 -b 1 && \ rtl_tcp -a 0.0.0.0 -f 1575420000 -g 0 -s 2000000 \ > /dev/null 2>&1 &
The GPS receiver is ready. We can get the GPS signal by accessing the IP address and port number 1234 of this Raspberry Pi.
I installed docker on the desktop PC to demodulate the received signal and perform positioning. Docker automatically installs and starts GNSS-SDR. Save the following configuration file that instructs GNSS-SDR to operate in an arbitrary directory, for example,
Replace “[IP address]” in “SignalSource.addres” with the IP address of the Raspberry Pi of the GPS radio wave receiver, and save the following shell script as
gnss-sdr.sh, because I don’t want to enter the long argument of the docker command every time.
# https://hub.docker.com/r/carlesfernandez/docker-gnsssdr docker run -it --rm \ -v $(PWD):/home \ --net=host \ carlesfernandez/docker-gnsssdr
In addition, create a shell script to start GNSS-SDR from the shell inside docker as
When ready, we start the shell script “gnss-sdr.sh.” When the container starts up and prompts, run the shell script
./start-in-docker.sh to start GNSS SDR. Since the current directory is mounted by docker option, you can see this shell script in the container.
The satellite signal is received immediately, and the status is displayed on the console, for example:
Tracking of GPS L1 C/A signal started on channel 7 for satellite GPS PRN 19 (Block IIR) Current receiver time: 5 min 51 s Current receiver time: 5 min 52 s Loss of lock in channel 0! Tracking of GPS L1 C/A signal started on channel 0 for satellite GPS PRN 01 (Block IIF) Current receiver time: 5 min 53 s Current receiver time: 5 min 54 s Current receiver time: 5 min 55 s Loss of lock in channel 4! Tracking of GPS L1 C/A signal started on channel 4 for satellite GPS PRN 26 (Block IIF) Current receiver time: 5 min 56 s Loss of lock in channel 6! Tracking of GPS L1 C/A signal started on channel 6 for satellite GPS PRN 27 (Block IIF) Loss of lock in channel 6! Tracking of GPS L1 C/A signal started on channel 6 for satellite GPS PRN 27 (Block IIF) Current receiver time: 5 min 57 s Loss of lock in channel 3!
In my environment, I could capture GPS signals, but it seemed that I lost the signal before receiving the number of satellites required for positioning. It may be necessary to perform positioning directly at the GPS radio receiver without using RTL_TCP.