I’m working on integrating HERE3+ GPS with a custom STM32H723 board using Embassy Rust framework, and I’m encountering issues parsing GPS coordinates from DroneCAN Fix2 messages.
Setup
GPS Module: HERE3+
MCU: STM32H723 with FDCAN peripheral
Framework: Embassy Rust (async embedded framework)
CAN Speed: 1 Mbps
GPS Node ID: 126
Message Type: 1063 (uavcan.equipment.gnss.Fix2)
The Problem
According to the DroneCAN DSDL specification for Fix2 messages, GPS coordinates should be encoded as:
Longitude: 37-bit signed integer at bits 144-180 (scaled by 1e8)
Latitude: 37-bit signed integer at bits 181-217 (scaled by 1e8)
However, when I parse Fix2 messages from my HERE3+ using these bit offsets, I get invalid coordinates like:
Latitude: 302.67°
Longitude: 0.015°
Status: TIME_ONLY
What I’ve Tried
Standard DSDL parsing - Using bit offsets 144/181 as per specification
Different bit alignments - Tried various offsets in case of alignment issues
Little/Big endian variations - Tested both byte orders
Multi-frame assembly verification - Confirmed frames are assembled correctly
Interesting Discovery
After extensive pattern searching in the raw CAN frames, I found valid coordinates but in an unexpected location:
Raw Fix2 first frame (8 bytes):
[17, 2D, 2D, 2D, 17, 2D, 09, C6]
When interpreted as Big-Endian int32 pairs:
Bytes 0-3: 388831021 / 1e7 = 38.8831021° (valid latitude!)
Bytes 4-7: 388825097 / 1e7 = 38.8825097° (valid longitude!)
These coordinates are valid for my location (Turkey), but they appear at the beginning of the first CAN frame, not at the DSDL-specified bit positions.
Raw Data Example
Here’s a complete Fix2 message dump (64 bytes):
[00-07]: [17, 2D, 2D, 2D, 17, 2D, 09, C6]
[08-15]: [06, C0, 93, CF, A6, B6, 3C, 06]
[16-23]: [40, 00, 00, 6A, 0A, 59, C3, 03]
[24-31]: [A6, 36, 8F, 68, 2E, 1E, C3, 45]
[32-39]: [C3, D8, 68, 00, 00, 00, 00, 6F]
[40-47]: [12, 83, 3A, 6F, 12, 03, BC, 43]
[48-55]: [00, 06, E0, 3C, E0, 3C, 15, 41]
[56-63]: [3B, 26, 3B, 26, 3B, 26, 00, 00]
Questions
Does HERE3+ use a modified Fix2 format that differs from the standard DroneCAN DSDL?
Is there documentation for the actual byte layout used by HERE3+ firmware?
Why might coordinates appear at byte offset 0 instead of the DSDL-specified positions?
Could this be related to the GPS status showing TIME_ONLY instead of 3D_FIX?
Code Repository
I’ve created multiple parsers trying different approaches. Here’s my working solution that reads coordinates from offset 0:
// This works but doesn’t follow DSDL spec
let lat_raw = i32::from_be_bytes([data[0], data[1], data[2], data[3]]);
let lon_raw = i32::from_be_bytes([data[4], data[5], data[6], data[7]]);
let lat = lat_raw as f64 / 1e7; // Note: 1e7, not 1e8 as per DSDL
let lon = lon_raw as f64 / 1e7;
Has anyone else encountered this issue with HERE3+? Any insights into why the message format appears different from the standard DSDL specification would be greatly appreciated.
Thanks in advance for your help!