Knowledge Base

Everything you need to know and understand to develop V2X applications.

denm-generator.py
msg = self.generate_denm()
future = self.send_request(msg)
future.add_done_callback(self.request_completed)

GNSS Configuration

The cube:evk integrates a u-blox NEO-M8U (or M8L) receiver that provides both GNSS (Global Navigation Satellite System) and IMU (Inertial Measurement Unit) data. The module combines multiple satellite constellations and onboard sensor fusion algorithms to deliver high-accuracy position, velocity, and timing information — essential for V2X synchronization and vehicle motion tracking.


1. Overview

The NEO-M8U supports simultaneous reception of multiple GNSS constellations including GPS, Galileo, and GLONASS, with optional BeiDou support. It also features 3D sensor fusion through its embedded IMU, allowing continuous navigation even during temporary GNSS signal loss.

The GNSS module is automatically configured at system startup using the script:

/usr/local/bin/configure-ublox.bash

You can also execute this script manually after changing the V2X configuration or modifying any GNSS parameters.

cube:~$ sudo /usr/local/bin/configure-ublox.bash

After execution, the configuration is applied immediately. The script uses the UBX binary protocol and the ubxtool utility from the gpsd suite to send configuration messages to the receiver.

Configurable High-precision GNSS

The cube:evk’s NEO-M8U receiver provides high-precision GNSS and IMU data. Its configuration is handled automatically at boot or can be applied manually via the configure-ublox.bash script.


2. Configuration Script Breakdown

The configuration script /usr/local/bin/configure-ublox.bash applies all required settings for V2X operation. The main steps include:

  1. Setting communication parameters

    • Baud rate set to 230400 baud for high-speed serial communication.
    • Enables UBX binary mode and disables NMEA messages to reduce bandwidth.
  2. Satellite constellations

    • Enables GPS, GLONASS, and Galileo.
    • Disables BeiDou (can be re-enabled if required).
  3. Dynamic model selection

    • Adjusts the internal motion model to match the use case:
      • 0: portable
      • 2: stationary
      • 3: pedestrian
      • 4: automotive
      • 12: electric kick scooter

    Default setting: automotive (MODEL,4)

  4. Fusion and high-rate navigation

    • Enables ESF (External Sensor Fusion) and HNR (High Navigation Rate) outputs for real-time position updates.
    • Turns on relevant navigation messages (e.g., NAV-TIMEGPS, NAV-TIMELS, NAV-EELL).
  5. Timepulse configuration

    • Sets a Pulse-Per-Second (PPS) output via the CFG-TP5 command for time synchronization with the C-V2X stack.
    • Pulse width and period are configured for 1 Hz output (100 ms high, 100 ms period).

The script concludes by applying all settings to the module. It does not save configuration permanently (SAVE command commented out), so the configuration is applied on each boot for consistency.

Configure Your GNSS

The configuration script sets the baud rate, enables required constellations, applies the automotive dynamic model, enables sensor fusion, and configures the PPS signal. It ensures the GNSS module is optimized for automotive V2X use cases.


3. UBX Protocol

The UBX protocol is u-blox’s proprietary binary communication format used to configure and control GNSS receivers. It provides a compact and reliable way to exchange messages with the device, enabling far more control than traditional NMEA strings.

Key advantages of UBX:

  • Binary encoding for reduced data overhead.
  • Supports configuration, monitoring, and logging commands.
  • Allows enabling/disabling of messages, changing baud rates, and adjusting navigation models.
  • Extensively documented in the u-blox protocol specification.

For full details, refer to the official u-blox UBX protocol document:

👉 u-blox 8 / M8 Receiver Description & Protocol Specification (UBX-13003221)


4. IMU Orientation

The cube:evk’s integrated IMU (Inertial Measurement Unit) inside the u-blox NEO-M8U continuously measures acceleration and rotation to support sensor fusion and dead reckoning. For accurate results, it is important that the IMU’s coordinate frame matches the physical orientation of the EVK.

Default Orientation

In the standard cube:evk mounting position:

  • The IMU x-axis points forward (direction of motion).
  • The antenna connectors point left relative to the direction of travel.

This orientation ensures that accelerations and angular rates align correctly with the GNSS receiver’s fusion model and navigation frame.

Adjusting for Different Mounting Orientations

If the cube:evk is mounted differently (for example, rotated or installed vertically), the IMU orientation can be compensated by configuring rotation angles directly in the GNSS module. These parameters are described in detail in the u-blox 8 / M8 Receiver Description & Protocol Specification u-blox 8 / M8 Receiver Description & Protocol Specification (UBX-13003221), Chapter 28.3.1.2 User-defined IMU-mount Alignment.


5. GNSS and IMU Data Access

The GNSS and IMU data are provided through the gpsd service, which runs automatically on the cube:evk. gpsd collects binary UBX data and provides it to client applications in standardized formats over TCP port 2947.

You can access the live GNSS data locally or remotely:

Local

cube:~$ cgps -u m

Remote

host:~$ cgps -u m <evk-ip>

Viewing IMU Data

cube:~$ cgps --imu

Both commands display satellite status, position, and motion data in real-time. The -u m option selects metric units.

GPSD Version

Ensure your host system has gpsd ≥ 3.23 installed for full UBX and IMU compatibility.

Developing with cube:ubx

For advanced integration and high-performance applications, the cube:evk provides a dedicated C++ UBX wrapper that enables direct communication with the u-blox NEO-M8U using the UBX binary protocol.

This wrapper abstracts the low-level message parsing and provides a convenient C++ interface. This makes it the recommended method for developers implementing custom GNSS data processing, fusion algorithms, or tight integration with V2X applications.

For complete API documentation and implementation details, refer to:

👉 UBX API Documentation


6. Manual Reconfiguration

If you modify /usr/local/bin/configure-ublox.bash, you can apply the new configuration without rebooting:

cube:~$ sudo /usr/local/bin/configure-ublox.bash

After execution, wait for the GNSS PPS LED (second LED) to start blinking — this indicates that the receiver is synchronized and transmitting valid data.