If you’re interested in GPS technology, you may want to try capturing GPS signals using an RTL-SDR device. In this tutorial, we’ll walk you through the steps of capturing GPS signals with an RTL-SDR device using the Windows command line and analyzing the data using open-source software, including Matlab and the SoftGNSS Github repository.

As a graduate student, I needed a large number of captured GPS signals for my research, but I couldn’t find any sources that provided what I needed. At the time, I was unaware of the capabilities of software-defined radios (SDRs), and I focused on using GPS simulators to generate the signals I needed. However, I soon discovered the potential of SDRs for capturing GPS signals.

In this blog post, I will provide a step-by-step tutorial on how to capture GPS signals with an RTL-SDR device and analyze them using open-source software. I will also share my personal experience with using SDRs for GPS signal analysis, which I hope will inspire other students and researchers to explore the capabilities of SDRs in their own work. With the growing popularity and accessibility of SDRs, there is a wealth of potential for new discoveries and advancements in GPS signal analysis.

What is RTL-SDR? RTL-SDR is a low-cost software-defined radio (SDR) that uses a USB dongle to receive and decode a wide range of radio signals. It’s a popular tool among radio enthusiasts, as it can be used to receive and decode signals from various sources, including FM radio, digital TV, and even aircraft transponders.

What you’ll need:

  • RTL-SDR device
  • Active antenna suitable for GPS frequencies (1575 MHz)
  • Computer running Windows
  • Software: RTL-SDR driver, SoftGNSS, and Matlab.

Setting up your RTL-SDR device:

  1. Install the RTL-SDR driver on your computer. You can download the driver from the official website of the RTL-SDR project.
  2. Connect the RTL-SDR device to your computer via USB.
  3. Verify that the device is recognized by your computer. You can do this by checking the Device Manager.

Capturing GPS signals:

  1. Connect the GPS antenna to the RTL-SDR device. Make sure the antenna is suitable for GPS frequencies (1575 MHz).
  2. Open the Windows command line and navigate to the RTL-SDR installation directory.
  3. Run the following command to capture GPS signals: “rtl_sdr -f 1575420000 -s 2500000 -n 50000000 -g 28 capture.dat”
  4. Wait for the capture to finish. The captured GPS signals will be saved to a file named “capture.dat”.

Setting up the softwares:

  1. Download SoftGNSS Github repository.
  2. Configure SoftGNSS to use the captured signal as the input. You can do this by editing the “initSettings.m” file located in the SoftGNSS directory. Change the following parameters:
    • “fileName” parameter to the path of the captured GPS signal file
    • “IF” parameter to 0 (for GPS L1 frequency)
    • “samplingFreq” parameter to 2.5e6 (for RTL-SDR device)
    • “dataType” parameter to schar
    • “fileType” parameter to 2 (for this feature, you need to install updates for SoftGNSS)
  3. Install Matlab on your computer. You can download Matlab from the official MathWorks website.


Keep in mind that the quality of your results will depend on the location where you capture the signals, as factors such as obstructions, interference, and atmospheric conditions can all impact the quality of the signal. For example, in my experiment, I captured the signal from my apartment balcony, which was partially obstructed by the building wall.