RTL-SDR Tutorial: GPS Decoding and Plotting

The RTL-SDR can be used to receive, decode and plot Global Positioning System (GPS) data in real time. To do this the RTL-SDR must be connected to a GPS antenna.

Extremely cheap $5 or less active GPS antennas with SMA connectors can be found on eBay, Amazon or Aliexpress. These GPS antennas contain a small ceramic patch antenna, a low noise amplifier and a GPS filter. In order to power the LNA in the antenna, you’ll need to have an RTL-SDR with bias tee. Our RTL-SDR.com V3 dongles have this feature built in, but if you don’t have a V3 you could also use a homebrew 5V external bias tee module or hack it into a standard RTL-SDR if you desired.

Also note that most standard R820T/2 RTL-SDRs fail to receive after a few minutes at frequencies above about 1.3 GHz due to heat issues. Our RTL-SDR.com V3 dongles don’t have this problem in most climates thanks to the metal case cooling and improved thermal design on the PCB. If you experience this problem it can also be alleviated by using the special L-Band RTL-SDR drivers.

A typical $3 GPS antenna
A typical $3 GPS antenna

The main GPS frequency is 1.575420 GHz, but most of this signal is very weak and below the noise floor. If you were try to view the spectrum of GPS in SDR# you will find that you won’t see much other than perhaps a very weak hump. Only through clever signal processing is such a weak signal actually recovered. Below we show screenshots of the GPS spectrum as seen by an RTL-SDR and more wideband Airspy R2 SDR.

GPS RTL-SDR

GPS RTL-SDR

GPS Airspy

GPS Airspy

The following tutorial shows how to receive and decode GPS signals and get a coordinate on a map of your location, using only an RTL-SDR dongle (with bias tee) and GPS antenna. This tutorial is based heavily on Philip Hahn’s blog post at sdrgps.blogspot.com/2015/12/first-proof-of-concept-gps-fix-in.html.

  1. Download GNSS-SDRLIB from github.com/taroz/GNSS-SDRLIB. On GitHub click on the green “Clone or download” button on the right and then click “Download ZIP”. Extract the zip file into a convenient folder on your PC. If you want to use the modified L-band drivers, copy the modified rtlsdr.dll into the the bin folder.
     
  2. Download the latest version of RTK-NAVI from rtklib.com. If you like, you can also try their beta version at github.com/tomojitakasu/RTKLIB_bin/tree/rtklib_2.4.3. Extract the zip into a convenient folder on your PC.
     
  3. Make sure your RTL-SDR is plugged in, and that the bias tee has been activated (V3 software for activating the bias tee, see feature 2).
     
  4. In the GNSS-SDRLIB folder, open gnss-sdrgui.exe. This will be stored in the bin subfolder.
     
  5. Now set the following parameters:
    1. Change the Input Type to RTL-SDR
    2. Place a check next to RTCM MSM , and set the Port to 9999.
    3. Ensure that “Output Interval” is set to 10Hz.
    4. Ensure that “Plot Acquisition” and “Plot Tracking” are both checked.
    5. Under “MISC” optionally enter your approximate latitude and longitude to help with getting an initial lock..
    6. Under the GPS, GLONASS and Galileo headings ensure that the “ALL”
Apply appropriate settings in GNSS-SDRLIB GUI
Apply appropriate settings in GNSS-SDRLIB GUI
  1. Press Start. A bunch of command windows will begin opening and closing for a few seconds. After that, a bunch of gnuplot graph windows will open up. These can be ignored.
     
  2. Next go to the extracted RTK-NAVI folder, and enter the bin directory. Open the rtlnavi.exe file.
     
  3. Click on the “I” button in the upper right region.
     
  4. Place a check mark next to (1) Rover, and change the “Type” to TCP Client, and the “Format” to RTCM3. Click on the button with three dots under the leftmost “Opt” and set the “TCP Server Address” to localhost, and the “Port” to 9999. Press the OK button to exit the two windows.
Set the input stream
Set the input stream
  1. Now press Start in RTK-NAVI.
     
  2. You should now see several bars in the top graph. These bars show GPS signal strengths for satellites. After a short time you should see a solution in the left panel which will be your current coordinates. If no solution ever comes, try respositioning your GPS antenna for a better view of the sky, and double checking that the bias tee is activated. Sometimes simply restarting GNSS-SDRLIB can fix no solution being found.
Check reception and wait for GPS lock solution.
Check reception and wait for GPS lock solution.
  1. In RTK-NAVI click on the “Plot” button. This will open a positional plot of the recorded coordinates. To view your position on a Google map, click View → Google Map View. If everything is working correctly you should now be seeing an accurate marker of your current location.
View your GPS position on a map.
View your GPS position on a map.

9 comments

  1. doug

    Not working for me in Windows 8. Picked up a couple satellites for a few minutes but even after restarting apps, verifying Bias T was working, verifying described settings and restarting pc even…. still nothing. I do see the lil bars at the top of rtknavi and verified rtl-sdr v3 is working. I do not see much in troubleshooting info for either app online.

  2. Tim

    I wish to report that I have this running under win 10 using the silver RTL dongle and outernet LNA.
    Plotting works as described. I’m seeing 5 satellites with about 40db signal strength.

    • Tim

      After about 20 minutes the solution, Lat and long stops updating. I can see 8 satellites with a a range of 20-50 db. but I have to restart both prog to get it going again to get the solution working .

      • admin

        I do see the same problem too. Seems the TCP connection gets dropped after 20 minutes. Immediately restarting the program fixes it for another 20 minutes and so on.

        • Tim

          one time when it went wonky on me I noticed the solution coordinates drifting and decided to plot it. I’m in the Boston area and the coordinates drifted all the way down to just off the coast of Texas. Makes me think somehow I was tracking one of the satellites itself.

  3. Terry Gaff

    I tried this tutorial a few months back and I could never get the plots to appear as described in step 14. After this point nothing happens. My antenna is fine and bias-T is on (verified in SDR#.. I can see the GPS ‘hump’). So I downloaded the latest files and tried again.. same result. I checked that Windows Firewall isn’t blocking RTKNAVI.. it’s fine. I see two ‘dark’ green boxes at the top right of RTKNAVI (same position as the screen cap above) the first one often changes to orange. Anybody else experiencing this or suggest a solution ?
    Terry

    • Ol

      I confirm it – this solution is not working. I was try it with old and new RTL-SDR dongles and 2 types active antennas. Windows 7×64 and Win10 my OSes.
      All as Terry wrote…

    • Tim

      I have it working and I did see the 2 green boxes, left one sometimes goes orange…on the same 2 green blocks hit that letter I and make sure your localhost and that port 9999, ALSO must be set to RTCM 3 or your won’t see sats and db

Post a comment

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>