Set up a SparkFun RTK Reference Station

Follow this guide to set up your SparkFun RTK Reference Station, a high-precision GPS module designed for use with the Real-Time Kinematic (RTK) satellite navigation technique. RTK improves the precision of positional data from satellite-based positioning systems like the Global Positioning System (GPS). When placed in a known location, the RTK Reference Station calculates and transmits correction data to RTK-enabled GPS receivers based on satellite signals it receives.

After following this guide, you can provide the mount point, username, password, and URL from your reference station’s NTRIP server in your Viam machine config for the gps-nmea-rtk-pmtk and gps-nmea-rtk-serial models of movement sensor to allow a rover or other machine configured with your sensor to apply corrections from the reference station, enabling your machine to achieve sub-centimeter-level accuracy in positioning.

Reserve an RTK2GO casting service

To distribute the correction information from your reference station, you should reserve an RTK2GO casting service for your station.

Follow the instructions on New Base Station Reservation to enter information about your reference station. Select Ntrip Rev1 for NTRIP Protocol to Use. Wait for the confirmation email, to which you need to reply. Upon reply, if you didn’t request a specific password you receive a randomized password for your mount point. Save the details of your mountpoint password, username (email), mountpoint name and caster URL, as you need it later in this set up process.

For more information about the RTK2GO reservation system, see Reservations.

Set up the reference station hardware

Insert the microSD card that comes with the Reference Station kit into the microSD card slot:

microSD card slot highlighted on reference station.

Connect the GNSS Surveying Antenna included with the Reference Station kit to the UBLOX connector on the kit, and connect the kit’s SMA WiFi / Bluetooth Antenna to the ESP32 connector on the kit:

UBLOX and ESP32 connections highlighted on reference station.

Bring the antenna outside

Bring the surveying antenna outside, where it can have a clear 360 degree view of the sky. You must do this to enable casting from the reference station.

Power up the reference station

You can power up the base station in several ways, described in the RTK Reference Station Hookup Guide. You can choose to power it up using USB-C or Ethernet (PoE):

Power and PoE ports highlighted on reference station.

Configure CfgWiFi mode

CfgWiFi mode allows you to configure the reference station through WiFi. You can also configure it using Ethernet (Cfg Eth mode) but for that an Ethernet connection is required, which can be limiting for outdoor setup.

To configure CfgWiFi mode, select CfgWiFi using the reference kit’s MODE button. Press it once to activate the MODE menu. Press the button again to step through the available modes. Once highlighted, pause on CfgWiFi to select this mode.

Use WiFi to configure the reference station

When CfgWiFi mode is selected, the reference station broadcasts its own WiFi called “RTK Config”.

Connect your phone or computer to the WiFi network called “RTK Config” and use your web browser (Safari or Internet Explorer are recommended over Chrome) to go to the address 192.168.4.1, which is the default IP address of the reference station. At that address you will see the RTK setup configure page displayed:

The SparkFun RTK Setup configure page displayed with dropdown menu rows showing different options for configuration.

Update System configuration

Look on the top of the RTK setup configure page and ensure that the firmware version of the base station is v4.0 or higher:

The top of the SparkFun RTK Setup configure page with the RTK Firmware version displayed as v4.0.

This is important since as of April 2024, version 4.0 allows the base station to send RTCM corrections over WiFi. To update the version of the firmware to 4.0, select the System Configuration dropdown and follow the steps provided in Updating Firmware Over-The-Air.

Update GNSS configuration

Select the GNSS Configuration dropdown on the RTK setup configure page. Hover over the subsequent i button for more information about an option, including default values and limits. For each option, select the following:

Measurement Rate:

  • In Hz: 4.00 Hz (default).
  • Seconds between measurements:: 0.25.

Dynamic Model: Portable (default).

Min SV Elevation: 10.

Min C/N0: Keep the default value here, 6dBHz for ZED-F9P.

Constellations: Keep the default selections here: GPS, SBAS, GLONASS, BeiDou, and Galileo.

With these recommended values selected, your GNSS Configuration should look like this:

Recommended GNSS Configuration.

Now click on the Message Rates box. In the Message Menu enable the following messages:

  • GGA
  • GLL
  • GNS
  • GSV
  • RMC
  • VTG

This is necessary for this use case because Viam’s RTK driver uses these messages. Your Message Rates option should look like this:

Recommended GNSS Message Rates Configuration.

Update Base configuration

Select the Base Configuration dropdown on the RTK setup configure page.

Survey-In: Enable the Survey-In mode, and configure it as follows:

  • Minimum observation time: 60 (default).
  • Required Mean 3D standard deviation (m): 5.00 (default).

Fixed: You only want the Fixed mode if your reference station will be stationary at a permanent location. Keep this deselected.

Enable NTRIP Server: Enable this option. Enter the following credentials:

For example:

Recommended Base Configuration.

Update WiFi configuration

Select the WiFi Configuration dropdown on the RTK setup configure page.

Networks: Enter credentials for up to 4 WiFi networks. The device tries all networks and uses the best network available.

Configure Mode: WiFi.

Your WiFi configuration should look like this, with the examples replaced with your real values:

Example WiFi Configuration.

Update Profile configuration

Select the Profile Configuration dropdown on the RTK setup configure page.

Select a profile to assign settings to that profile. At reset, your RTK device will use the selected settings profile.

Your Profile Configuration should look like this:

Example Profile Configuration.

Save your configuration changes

Select Save Configuration on the RTK setup configure page and wait for your configurations to take effect.

Start RTK2GO casting

Using the reference kit’s MODE button, switch the mode back to the default Base. Press the MODE button once to activate the menu. Press the button again to step through the available modes. Once highlighted, pause on Base to select this mode.

Because you configured the base station to be in Survey-in mode in the update Base configuration step, it will take your base station up to six minutes to go into Xmitting RTCM mode. After a few minutes it goes into Casting mode. Once you see Casting on the mode menu display screen, go to rtk2go.com:2101 in your browser and find your mount point in the source table.

Next steps: configure an RTK movement sensor

Open the configuration instructions for your RTK-enabled movement sensor model:

Follow the configuration instructions, providing the values you entered for your NTRIP server Base configuration as the equal attributes in your Viam machine config:

  • ntrip_url: your RTK2GO casting URL, comprised of Caster Host and Caster Port (like rtk2go.com:2101)
  • ntrip_username: your Caster User, which should be the same email you used for your RTK2GO reservation]
  • ntrip_password: your Mount Point PW
  • ntrip_mountpoint: your Mount Point name

Configuring your movement sensor with your NTRIP casting server access information allows your machine to receive both GPS signals and correction data and apply corrections, increasing the positioning capacity of the movement sensor to sub-centimeter level accuracy.

Troubleshooting

If your base station loses the WiFi IP address after set up, then trying to reconfigure it in ConfigWiFi mode will not work. In this case, you must connect the base station to your network through an Ethernet cable and then select ConfigEth mode in Use WiFi to configure the reference station. Then, during Update system configuration use the IP address displayed on the reference station to connect and configure it.

Have questions, or want to meet other people working on robots? Join our Community Discord.

If you notice any issues with the documentation, feel free to file an issue or edit this file.