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 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.
Notify of

Inline Feedbacks
View all comments
Valentin Vozian

If using last beta version, you can make leaflet work by modifying windows registers.
From support site:

No.149 Map View by Leaflet library does not properly work (RTKPLOT, SRCTBLBROWS, ver.2.4.3 b34)

Map View of RTKPLOT and NTRIP Browser by Leaflet library does not properly work. Map View has no response or a script execution error occures in RTKLIB/bin/leaflet/leaflet.js.
Older version behaviour of WebBrowser component used in the Map View of RTKPLOT or NTRIP browser might make trouble with Leaflet. Add the following entry of Windows resistries by regedit (Registry Editor) to run the WebBrowser component in IE11 emulation mode. (2020/12/30)
– Key: HKEY_LOCAL_MACHINE – SOFTWARE – Microsoft – Internet Explorer – Main – FeatureControl – FEATURE_BROWSER_EMULATION
– Name: rtkplot.exe
– Data: 11000 (decimal)
– Key: Same as above
– Name: srctblbrows.exe
– Data: 11000 (decimal)

Lorenzo Elguea

I have a RTL-SDR v.3 How i can select device?
I have this error:

error: failed to open rtlsdr device #0.
error: rcvinit

Note: To power on bias, i use: rtl_biast -d 1 because is device 1 (not 0)


you have to modify rtlsdr.c in order to open device 1 instead of 1 and recompile the gnss software by using virtual studio 2012 express. I have recompiled and it works, send me an email if you need the windows 64bit recompiled. Anyway I can’t plot anything on rlknavi

Lorenzo Elguea

Thanks Fabio.
I cant recompile!! Can you add a file to repository?
Or add a form to select device number?
I try to recompile and have this error:
Error LNK2019 unresolved external symbol __imp___iob_func referenced in function STEREO_SendFpga gnss-sdrgui

Georgiana O

After command windows are opening and closing, i can’t see any gnuplot graph. It happen to show me only one once. What am i doing wrong? Any advice, please?

Imtiaz Nabi

kindly send me the GNSS-SDR if possible my email is
[email protected]


Hello Fabio, can you please send me the recompiled GNSS-SDRLIB for rtl device 1?
My email is [email protected]
Thank you.

w p

Hello Fabio. Can you please send me an email, [email protected]


So I had this problem too.
Compiling is always tedious, so I thought about a better solution.

The gui binary contains the target rtl-sdr device ID as a magic that can simply be edited in any hex editor (even in text editors, but its a bit harder to spot).

I analyzed the binary, and the offset is 0x5A118 (or 368920) bytes from the beginning of the file.
It is between the strings “No matching devices found.” and “error: failed to open rtlsdr device #%d.”

The number will be 0, change it to 1 (or in my case for some reason, 2)


I have this working a Windows 10 machine and it’s really awesome! But I have to say it’s a bit of a roll of the dice for it to work properly, and it’s easier to get the signals at night, for some reason.


Same as Terry. Getting nothing in Step 14.

Nicolas Perrin

Is there a way to decode trough vbcable ?
I’d like to try to decode dog’s gps collars.


Hola. Conseguiste descodificar las señales de collares de perro???


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.


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.


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 .


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.


RTL SDR can receive GLONASS.One could use combo antenna like this https://www.aliexpress.com/item/waterproof-IP67-outdoor-GPS-Glonass-Antenna/1871753110.html?

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 ?


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…


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


it goes orange because rtlnavi goes on timeout and keep trying to connect gnss