HomeGuides
Log In
Guides

How to configure RTK GPS correction broadcast for Ardupilot/PX4 UAVs

This document explains the configuration of RTK GPS correction broadcast for Ardupilot/PX4 UAVs. It has two main steps:

  1. Configuration of RTK GPS Client (RTK Tool)
  2. Configuration of Ardupilot/PX4 VSM

Both of these steps are explained in detail below.

RTK Client Configuration

To broadcast RTK corrections, the RTK Client (RTK Tool) application should be used. It allows reading the corrections either from the base station or from the NTRIP services, and retransmitting data as a MAVLink message to multiple consumers. The tool can be downloaded from this source: RTK Tool

Base station

To start using RTK Client for RTCM broadcast in combination with the base station and the normal telemetry radio link or Herelink controller, perform the following steps:

  1. Connect the base station to the computer and take note of the COM port that was assigned to the base station in Device Manager.
  2. Open RTK GPS Client and under Source settings select the correct COM port and baud rate (9600).
  3. Set Mav Msg type to GPS_RTCM_DATA.
  4. Tick M8P/F9P autoconfig, M8P fw 130+/F9P, and in case radio modules are used to connect the base station to the PC (as opposed to a direct connection via cable), tick 3DR Radio link option.
  5. On the right side, next to Use UDP client sink, set the Host address to 127.0.0.1 and the port to 44444.
  6. By default, the survey accuracy SurveyLn Acc(m) = 2. If necessary, this value can be decreased even further to 1 m, for example.

The app window should now look like this:

  1. Click on Connect. Red squares next to GPS and Glonass should now turn green, and on the right side, you should see satellites appearing.
  2. Click Restart and wait till the base station accuracy reaches the accuracy set under SurveyIn Acc(m). When this happens, the red square next to Base should turn green, and under Survey In, it should say Position is Valid.
    The app should now look like this:

NTRIP service

This example shows how to use the NTRIP service for a drone equipped with the normal telemetry radio link or a Herelink controller.

  1. Ensure the computer is connected to the internet.

  2. Open RTK Client and under Source settings select the NTRIP option.

  3. Provide the connection details in the NRIP address field using the following format: http://[username]:[password]@[ntrip_host]:[ntrip_port]/[mount_point_name].

  4. Set Mav Msg type to GPS_RTCM_DATA.

  5. Tick M8P/F9P autoconfig, M8P fw 130+/F9P, and in case radio modules are used to connect the base station to the PC (as opposed to a direct connection via cable), tick 3DR Radio link option.

  6. On the right side, next to Use UDP client sink, set the Host address to 127.0.0.1 and the port to 44444.

  7. Click on Connect. Red squares next to GPS and Glonass should now turn green, and on the right side, you should see satellites appearing.

  8. Click Restart and wait till the base station accuracy reaches the accuracy set under SurveyIn Acc(m). When this happens, the red square next to Base should turn green, and under Survey In, it should say Position is Valid.
    The app should now look like this:

Ardupilot / PX4 VSM Configuration

Perform the following steps to configure the transmission of RTK GPS correction messages over the telemetry channel.

  1. Open the file vsm-ardupilot.conf or the vsm-px4.conf. (Notepad++ text editor is recommended since administrator privileges are required to save the file). The file is normally located in:
    C:/Program Files (x86)/UgCS/bin/
  2. Find the line (using Ctrl+F shortcut): #mavlink.injection.udp_any.1.local_port = 44444
  3. Uncomment it by removing the hash sign in front, so it becomes:
    mavlink.injection.udp_any.1.local_port = 44444
  4. Save the file
  5. Make sure to restart Ardupilot VSM / PX4 if it was running in the background in the Service Manager. If it was closed, this step can be skipped.

The configuration should now be complete. Check-in UgCS telemetry window that the vehicle reports the GPS state as RTK Fix or RTK Float.

450