Skip to content

RTK GPS: C94-M8P Evaluation Boards

Real Time Kinematics (RTK) is a GNSS technique to achieve high accuracy (about 2-5cm) in the vicinity of the GPS receiver designated as the base station. RTK falls under the umbrella of differential GPS (DGPS) methods and so requires at least two GPS receivers. One of the GPS modules is termed the base station while the GPS module(s) that move are termed rovers.

Because RTK GPS often requires additional infrastructure (i.e., a stationary base station), it may not be ideal for algorithms, but can be extremely helpful for analysis (i.e., "ground truth" comparisons for visual tracking). However, it is possible to have a moving baseline where both the base station and the rover move. You could imagine a base station and a rover attached to a left and right wing of a plane. The result is called GPS compassing and while the absolute positioning accuracy is low, the attitude determination is very good.

You can learn more about the operating principle of RTK GPS at navipedia's article on RTK Fundamentals.

RTK-Enabled GNSS Modules

One of the most popular GNSS companies is u-blox, a Swiss company that has its roots in ETH-Zurich. They provide the NEO-M8P GNSS module that has integrated RTK capability (as opposed to the M8T module that provides raw information and requires the use of off-board RTK processing from something like RTKLIB). There are two products in this series:

  • NEO-M8P-0: GNSS module with rover functionality (i.e., essentially a regular GPS module). [around $100]
  • NEO-M8P-2: GNSS module with rover and base station functionality. [around $120]

You should probably always prefer the NEO-M8P-2 because of its flexibility.

C94-M8P Evaluation Boards

For $300, u-blox sells evaluation boards (EVBs) for the NEO-M8P-2.

The C94-M8P is a $300 package that contains two evaluation boards (EVBs) based on the NEO-M8P-2. Not only do these boards have the RTK-enabled NEO-M8P GNSS module, but they also have an integrated radio link (which is based on the HopeRF HM-TRP with SiK 1.9 firmware -- think 3DR telemetry radio for the Pixhawk). The purpose of the integrated radio is to transmit GPS/RTK corrections (via RTCM3 messages) from the base station to the rover.

At the time of this writing (May 2018), the Electromagnetic Measurement Group (Dr. Brian Mazzeo's lab) has two sets of EVBs (total of 4 boards):

  • C94-M8P-B
  • C94-M8P-E

Note the difference between Rev B and Rev E (currently the newest revision).

Getting RTK Running with Two C94-M8P EVBs

We will follow the User Guide to get the RTK working with two EVBs. A video tutorial on the hardware and configuration of the C94-M8P boards for RTK GPS can be found here. Note that the u-center configuration program that is used for connecting to the EVB is a Windows-only application. However, we will forgive u-blox because we can use Wine to run u-center on Linux.

Setup

Configuration

Field Test

Using One C94-M8P Base Station with Multiple Rovers

Pixhawk/APM RTK GPS Integration

Running u-center on Linux with Wine

This has been tested with u-center v8.29 and Wine 3.0.1 on Ubuntu 16.04. More discussion can be found here.

Install Wine

Because the Wine that is packaged with Ubuntu is outdated, install Wine directly from WineHQ's repository following these instructions.

sudo dpkg --add-architecture i386

wget -nc https://dl.winehq.org/wine-builds/Release.key
sudo apt-key add Release.key
sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/

sudo apt update

sudo apt install --install-recommends winehq-stable

Note: Make sure that you remove old installations and any old PPAs with Wine in them (check /etc/apt/sources.list and /etc/apt/sources.list.d/. While you are there, make sure that the i386 architecture is not disabled for universe package -- i.e., there are no [arch=amd64] to only use amd64).

Configure Wine using winecfg to use Windows Version 10.

Install u-center

Download u-center for Windows. Install in default location. After installation, u-center should launch.

Add an Alias for Convenience

In order to run u-center, you have give the wine command the full path. Instead, you could create an alias in your ~/.bashrc:

alias ucenter='wine "/home/user/.wine/drive_c/Program Files (x86)/u-blox/u-center_v8.29/u-center.exe"'

After re-sourcing (. ~/.bashrc) you can use the ucenter command to open u-center.

Add a udev Rule

Everything in Linux is considered a file. For example, hardware devices appear in /dev/ as files (inodes). Adding a udev rule tells the OS Device Manager to create a symlink at specific spot each time the same device (as determined by its idProduct, idVendor, and other identifiers) is plugged in.

Create the following udev rule and place it in /etc/udev/rules.d/99-ublox-gps.rules:

# u-blox C94-M8P
ACTION=="add", SUBSYSTEM=="tty", ATTRS{idProduct}=="01a8", ATTRS{idVendor}=="1546", SYMLINK+="ublox"

Then, reload and trigger with:

sudo udevadm control --reload-rules
sudo udevadm trigger # alternatively, unplug and plug back in

Now every time the EVB is plugged in, it will show up as /dev/ublox. Note that this was only tested for a single EVB at a time.

Windows uses COM ports and Linux uses /dev devices. Wine creates a bridge between the two in ~/.wine/dosdevices. Create COM port that u-center can see with:

cd ~/.wine/dosdevices
ln -s /dev/ublox com40

In u-center, COM40 will always point to your device.