uBlox Protocol Parser Issue with NAV-SAT and NAV-SVINFO
jbeyerstedt opened this issue · 2 comments
We are experiencing a mismatch between the data in the satellite_info
uORB message (and the GPS_STATUS MAVLink message) and the UART data stream from our Pixhawk 4 GPS module. We analyzed the raw UART data stream by enabling the GPS_DUMP parameter in PX4 and adding the corresponding topic to the list of logged topics.
While comparing the code in the driver with the uBlox protocol specification from the M8N module (Release R20, 26 June 2020) I noticed some differences in the data format:
- The repeated structure of NAV-SAT and NAV-SVINFO should be 12 bytes long according to uBlox
- ubx_payload_rx_nav_svinfo_part2_t actually contains 14 bytes. Compared to uBlox:
cno
should be beforeelev
- there should be no SNR field
- there should be no PRN field
- ubx_payload_rx_nav_sat_part2_t actually contains 13 bytes. Compared to uBlox:
cno
should be at third place- there should be no PRN field
- Shouldn't these be packed structs? As far as I understand, you're filling the data by some pointer arithmetic, right?
This also leads to some issues with the satellite_info
uORB message and GPS_STATUS mavlink message. Currently the satellite_prn
data of the MAVLink message is filled from the prn
array of satellite_info
.
But when this information is missing from the uBlox message:
- either the
satellite_info.prn
array should be filled with the ubloxsvId
to ensure backwards compatibility - or the MAVLink message should be using
satellite_info.svid
whensatellite_info.prn
is empty.
You're right, NAV-SAT
is indeed incorrect (I didn't check NAV-SVINFO
). Can you do a PR to fix that?
Shouldn't these be packed structs?
Yes, they are packed: https://github.com/PX4/PX4-GPSDrivers/blob/master/src/ubx.h#L336
We also want to activate Galileo, so I think I must fix this anyways while I'm at it.
See PX4/PX4-Autopilot#16370 on how to integrate all the configuration options to select the set of used GNSS systems.