Skip to content

Validate RTCM from UDP before forwarding#14379

Open
Ryanf55 wants to merge 2 commits into
mavlink:masterfrom
ThinkOrbital:validate-udp-input-as-rtcm
Open

Validate RTCM from UDP before forwarding#14379
Ryanf55 wants to merge 2 commits into
mavlink:masterfrom
ThinkOrbital:validate-udp-input-as-rtcm

Conversation

@Ryanf55
Copy link
Copy Markdown
Contributor

@Ryanf55 Ryanf55 commented May 14, 2026

Description

The new UDP input option for RTCM data currently takes raw datagrams and sends them raw via MAVLink to the drone.
The NTRIP caster currently validates incoming RTCM data as RTCM. Now, we reuse the RTCM parser to optionally validate the incoming UDP stream. I enable validation by default.

Along the way, I added some more tests after having claude compare implementations between this and PX4.
Claude found no issues with either RTCM parser implementation.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • CI/Build changes
  • Other

Testing

  • Tested locally
  • Added/updated unit tests
  • [] Tested with simulator (SITL)
  • Tested with hardware

Tested on FreeFly AltaX with validation enabled and disabled to make sure both still work.

Platforms Tested

  • Linux
  • Windows
  • macOS
  • Android
  • iOS

Flight Stacks Tested

  • PX4
  • ArduPilot

Screenshots

Here are the debug log messages with validation enabled:
image

And with validation disabled
image

Both result in RTK fix.

Checklist

  • I have read the Contribution Guidelines
  • I have read the Code of Conduct
  • My code follows the project's coding standards
  • I have added tests that prove my fix/feature works
  • New and existing unit tests pass locally

Related Issues


By submitting this pull request, I confirm that my contribution is made under the terms of the project's dual license (Apache 2.0 and GPL v3).

* Add related tests
* Expose validation through settings but not in UI because most people will want RTCM validation on

Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

❌ Patch coverage is 4.87805% with 39 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (master@b59e589). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/GPS/NTRIP/RTCMUdpInput.cc 0.00% 36 Missing ⚠️
src/GPS/NTRIP/NTRIPManager.cc 50.00% 0 Missing and 1 partial ⚠️
src/GPS/NTRIP/RTCMUdpInput.h 50.00% 1 Missing ⚠️
src/Settings/NTRIPSettings.cc 0.00% 0 Missing and 1 partial ⚠️

❌ Your patch check has failed because the patch coverage (4.87%) is below the target coverage (30.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #14379   +/-   ##
=========================================
  Coverage          ?   25.34%           
=========================================
  Files             ?      769           
  Lines             ?    65948           
  Branches          ?    30515           
=========================================
  Hits              ?    16714           
  Misses            ?    37448           
  Partials          ?    11786           
Flag Coverage Δ
unittests 25.34% <4.87%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/GPS/NTRIP/RTCMParser.h 100.00% <ø> (ø)
src/GPS/NTRIP/NTRIPManager.cc 8.96% <50.00%> (ø)
src/GPS/NTRIP/RTCMUdpInput.h 33.33% <50.00%> (ø)
src/Settings/NTRIPSettings.cc 0.00% <0.00%> (ø)
src/GPS/NTRIP/RTCMUdpInput.cc 10.84% <0.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b59e589...43ea3d7. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

Build Results

Platform Status

Platform Status Details
Linux Passed View
Windows Passed View
MacOS Passed View
Android Failed View

Some builds failed.

Pre-commit

Check Status Details
pre-commit Failed (non-blocking) View

Pre-commit hooks: 4 passed, 45 failed, 7 skipped.

Test Results

linux-coverage: 90 passed, 0 skipped
Total: 90 passed, 0 skipped

Code Coverage

Coverage Baseline Change
59.2% 59.2% -0.0%

Artifact Sizes

Artifact Size Δ from master
QGroundControl 216.88 MB -4.60 MB (decrease)
QGroundControl-aarch64 176.78 MB +0.00 MB (increase)
QGroundControl-installer-AMD64 134.72 MB +0.01 MB (increase)
QGroundControl-installer-AMD64-ARM64 77.33 MB +0.01 MB (increase)
QGroundControl-installer-ARM64 106.05 MB -0.01 MB (decrease)
QGroundControl-x86_64 171.96 MB -0.44 MB (decrease)
Total size decreased by 5.02 MB

Updated: 2026-05-15 00:18:37 UTC • Triggered by: Android

Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com>
@Ryanf55 Ryanf55 force-pushed the validate-udp-input-as-rtcm branch from ae8274a to 43ea3d7 Compare May 14, 2026 23:11
@Ryanf55 Ryanf55 marked this pull request as ready for review May 14, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant