-
Notifications
You must be signed in to change notification settings - Fork 7.6k
GNSS RTK: Add basic integration #90890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
e333b76
to
a7984f5
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments captured from Arch WG review 250701
subsys/rtk/CMakeLists.txt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Move to drivers/gnss/*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to subsys/gnss
instead.
9f187bf
to
799ef56
Compare
175d489
to
9e8bc2c
Compare
9e8bc2c
to
5a345fa
Compare
ff6359a
to
e365290
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really great contribution!
e365290
to
551859b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR integrates basic Real Time Kinematics (RTK) support into the GNSS subsystem by adding RTCM3 decoding, an RTK publish/subscribe API, and a serial client, along with corresponding driver updates, tests, and samples.
- Added RTCM3 CRC-24Q checksumming and frame-extraction API with unit tests.
- Introduced
gnss_rtk_publish_data
and iterable callbacks to distribute correction data, plus a serial client to feed corrections. - Extended the UBX F9P driver and GNSS samples to consume and display RTK data, and added necessary Kconfig/CMake updates.
Reviewed Changes
Copilot reviewed 42 out of 42 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
tests/unit/crc/main.c | Added test_crc24q_rtcm3 unit test |
tests/subsys/gnss/rtk/rtcm3/testcase.yaml | Defined native_sim test harness for RTCM3 decoder |
tests/subsys/gnss/rtk/rtcm3/src/main.c | Implemented frame-detection and CRC tests |
subsys/gnss/rtk/decoder.h | Declared RTK decoder API |
subsys/gnss/rtk/rtk.c | Implemented gnss_rtk_publish_data semaphore logic |
subsys/gnss/rtk/protocol/rtcm3.c | RTCM3 framing, length parsing, and CRC check |
subsys/gnss/rtk/serial/serial.c | Serial client ISR, ring buffer, work handler |
include/zephyr/gnss/rtk/rtk.h | Defined RTK data callback macros and types |
include/zephyr/modem/ubx/protocol.h | Added UBX DGNSS/RTK mode and flag constants |
drivers/gnss/gnss_u_blox_f9p.c | Hooked RTK data callback into UBX F9P init sequence |
samples/drivers/gnss/src/main.c | Updated sample to count and print RTK-corrected sats |
* it or not depending on the RTCM3 message type and its alignment with what the | ||
* GNSS modem has observed. | ||
*/ | ||
(void)ubx_f9p_msg_send(dev, (const void *)data->data, data->len, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cast to const void *
may conflict with the expected const struct ubx_frame *
parameter of ubx_f9p_msg_send
. Use (const struct ubx_frame *)data->data
to avoid pointer-type mismatch warnings.
(void)ubx_f9p_msg_send(dev, (const void *)data->data, data->len, false); | |
(void)ubx_f9p_msg_send(dev, (const struct ubx_frame *)data->data, data->len, false); |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should cast this to an UBX frame, as it's an RTCM3 msg. See commit:
modem: ubx: Change request buffer to be void
Incorporate the basic RTK API as well as a basic client integration (serial) as a way to receive and publish the RTK data. Signed-off-by: Luis Ubieda <luisf@croxel.com>
5bfe1a8
to
6167f47
Compare
6167f47
to
a1b1bb3
Compare
To be covered by existing Drivers: GNSS, as per requested during the review process. Added myself as a collaborator to follow-up with RTK-related changes. Signed-off-by: Luis Ubieda <luisf@croxel.com>
To capture framing capabilities (only API so far). Signed-off-by: Luis Ubieda <luisf@croxel.com>
So this API can be used to send frames with a different encoding than UBX. This enables UBX drivers to send RTCM3 correction frames using UBX API, without having to switch over modem pipes. Signed-off-by: Luis Ubieda <luisf@croxel.com>
Enable driver to consume RTK data-correction messages published in order to enhance GNSS Navigation results. Signed-off-by: Luis Ubieda <luisf@croxel.com>
Expand this sample to also work with GNSS_RTK through a serial client. Make this compatible to work with VMU_RT1170 which requires using the F9P, instead of the M8 UBX module. Signed-off-by: Luis Ubieda <luisf@croxel.com>
a1b1bb3
to
f62d3db
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
Description
This PR introduces RTK (Real Time Kinematics) to GNSS modems by providing a path to feed RTK correction data (proposed on #90363).
Detailed changes:
Note
Adding DNM until both conditions are resolved.