Let's try RTK of several centimeter order positioning with an internet-connected PC

category: gnss
tags: rtk rtklib

Overview of GPS positioning error and RTK

Let’s try the RTK which increases GPS positioning accuracy to the order of several centimeters. This content is Hiroshima version IoT Lightning Talk (IoTLT Hiroshima) Vol.9 that I gave a lecture in Japanese.

In positioning where GPS radiowaves are received, the GPS receiver shows it moves from several meters to tens of meters even it is stopped. For car navigation systems and smart phones, we use a tire rotation sensor, acceleration sensor, etc. to indicate that the user is stopped when the user is stopped.

We assume that an actual position is in the three-dimensional moving locus (or in a position not largely deviated from the locus). Here, we also assume that the difference between the actual position and the measured position is defined to be an error. Such errors are source of the differences between ionospheric radio wave delay model parameters transmitted by GPS satellites and actual radio wave delays, the clock error in the satellites, the deterioration of solutions due to available geometrical constellation of satellites.

The RTK is a method to performs positioning with a “reference station” that latitude, longitude and altitude are known. The RTK reference station broadcasts the difference on the Internet so that the user corrects the positioning result itself by receiving the correction data. Here, we use NTRIP as the data transmission protocol.

Brief description of RTK

RTK reference station and pseudo mobile station established at Hiroshima City University

In order to use RTK, it is necessary to have a GPS receiver that can extract the “carrier phase” and the result and the software to perform positioning using the correction information from the reference station. The latter software can use the famous freeware RTKLIB, but usually you need the hardware.

Therefore, in order to carry out RTK experiments even on rainy days, we prepared a simulated mobile station in a location somewhat inferior to the reference station. Like the reference station observation data, observation data of the pseudo mobile station is also sent.

NTRIP Caster broadcasting from Hiroshima City University

RTK experience with Windows PC

  1. Download the RTKLIB or the modified version of RTKLIB provided by Emlid.
  2. Run rtknavi.exe.
  3. Perform various settings and execute RTK. Click on the settings in order as shown below.

RTKLIB Windows Step 1 Click “I” at the top of the window and check (1) Rover and (2) Base Station. Click on each of Rover and Base ’s Opt to make settings. After that, set “Option …” at the bottom.

RTKLIB Windows Step 2 For Opt of (1), write “ntrip.phys.info.hiroshima-cu.ac.jp” to the host, “80” to Port, “ROV” (Rover … abbreviation of mobile station) to Mountpoint. Then press OK. For Opt of (2), enter the values same as (1), except that Mountpoint is set to “F9P”.

RTKLIB Windows Step 3 As for Option …, select “Kinematic” for Positioning Mode, select “L1” for Frequencies, select “Broadcast” for Ionosphere Correction, select “Saastamoinen” for Troposphere Correction and select “Broadcast” for Satellite Ephemeris. Also select all the bottom satellites. Since these are important parameters of satellite positioning, I would like to explain it again. Since we can not help using these values except Mask angle this time, we set this way. Then click the Position tab at the top.

RTKLIB Windows Step 4 Since this reference station is broadcasting its own coordinate value (RTCM 3 Type 1006 message), select “RTCM Antenna Position” in the Base station field. In this way, click “Start” on the first screen to start positioning.

RTKNavi single With the positioning result of the simulated mobile station in several seconds to several tens of seconds, it becomes “Single” (single positioning) state.

RTKNavi float Within 5 seconds or so since clicking start positioning, we may see “Float” state, since the reference station coordinates are sent every 10 seconds. This state “float” indicates the distance from the satellite to the user is searching for several times the wavelength of the radiowave.

RTKNavi fix After waiting for about 30 seconds to 1 hour or so, the distance from the satellite to the user will be in a “Fix” state that indicates consistent with no discrepancy. Occasionally it may be in fix state in a few seconds and soon be in the float state. This is often called miss fix, and it is a phenomenon that it judged that it was correctly determine the position by mistake.

Please explore Setting 2 to fix faster by their parameters.

RTK experience with Linux and Mac PCs

(1) Download the RTKLIB source code. $ Is the prompt.

$ git clone https://github.com/tomojitakasu/RTKLIB.git

On Mac PCs, delete -lrt in RTKLIB/app/*/gcc/makefile. It is a realtime library, and is unnecessary for compiling on Mac.

(2) Execute RTKLIB/app/makeall.sh

$ cd RTKLIB/app
$ ./makeall.sh

(3) Edit configuration with a file named rtkrcv.conf at RTKLIB/app/rtkrcv/gcc/ as follows (you can download it from Gist.

$ cd rtkrcv/gcc/
$ git clone https://gist.github.com/00587e3767ab01e6b61410c1d69364d6.gitmv rtkrcv.conf

(4) Execute rtknavi

$ ./rtknavi
rtknavi> start
rtknavi> stat 1
Ctrl + C
rtknavi> shut

rtkrcv-linux1 After waiting for a while, it will be in fix state.


This is the enlargement of the above screen. The solution status indicated fixed, and the ratio of validation showed 3.19. It is possible to be miss fix. The ratio of validation would rapidly increase from around 10 and becomes the maximum value of 999.9 after waiting for a while.