Conversation
Group GPS source configuration on a dedicated page and link Remote ID to the shared NMEA settings. Add NMEA TCP recovery and consistent manual and automatic connection controls for NMEA and RTK, including explicit serial receiver selection. Align GPS logging categories with module paths, trace constructor and destructor addresses, and document constructor initializer formatting. Update connection, settings migration, navigation, and layout tests.
Add a cancellable UDP receiver transport with peer filtering and partial-datagram buffering. Reuse RTK connection controls, autoconnect, and recovery with a configurable local UDP port. Cover bidirectional transport, cancellation, bind failure, receiver recovery, settings controls, and RTCM forwarding. Normal and serial-disabled builds pass, along with all 20 focused GPS tests; full unit suites retain the known BluetoothWorkerTest failure.
Move NmeaSourceManager and the shared NMEAUtils helpers into GPS/NMEA, mirror the source manager test location, and update CMake registration and the logging category. Validation: Debug build and all 20 focused GPS tests pass. The full unit suite passes 268 of 269 tests, retaining the known BluetoothWorkerTest failure.
Keep dynamic serial configurations across retries so busy ports retain backoff and respect manual disconnects. Release retry state when a port disappears and log expected autoconnect permission failures at debug level.
Wait for a u-blox survey to stop before starting a fresh survey. Distinguish intentional transport cancellation from read failures, and keep real I/O errors visible. Open standby NMEA devices before discarding stale input and start stale detection only after the first accepted fix. Add regressions for survey sequencing, cancellation, UDP fallback, and idle NMEA sources. Normal and no-serial builds pass; focused tests and hardware reconnect/shutdown checks pass. Both full unit suites retain the existing BluetoothWorkerTest strict-log failure.
There was a problem hiding this comment.
🟡 Changes recommended
A critical unbounded UDP buffering issue and three moderate connection-selection and UTC normalization defects remain unresolved.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Unifies GPS receiver configuration, adds TCP/UDP RTK support, receiver-based positioning, recovery improvements, and PX4 driver updates.
Changes:
- Adds shared GPS settings and serial/TCP/UDP connection management.
- Adds RTK-derived positioning with source fallback and stale-data handling.
- Expands diagnostics, logging, driver patches, and GPS test coverage.
File summaries
| File | Description |
|---|---|
tools/tests/test_settings_qml_generator.py |
Tests settings section keys. |
tools/generators/settings_qml/templates/pages_model.qml.j2 |
Emits settings section keys. |
tools/generators/settings_qml/emit.py |
Generates section metadata. |
test/QmlUITests/RemoteIDSettingsUITest.h |
Declares GPS navigation tests. |
test/QmlUITests/RemoteIDSettingsUITest.cc |
Tests shared GPS navigation. |
test/QmlUITests/NTRIPSettingsUITest.h |
Updates NTRIP UI tests. |
test/QmlUITests/NTRIPSettingsUITest.cc |
Tests the separated NTRIP page. |
test/GPS/UdpForwarderTest.cc |
Updates logging expectations. |
test/GPS/RTK/UdpGPSTransportTest.h |
Declares UDP transport tests. |
test/GPS/RTK/UdpGPSTransportTest.cc |
Tests UDP transport behavior. |
test/GPS/RTK/TcpGPSTransportTest.h |
Declares TCP transport tests. |
test/GPS/RTK/TcpGPSTransportTest.cc |
Tests TCP transport behavior. |
test/GPS/RTK/SerialGPSTransportTest.cc |
Tests serial cancellation state. |
test/GPS/RTK/RTKPositionSourceTest.h |
Declares position-source tests. |
test/GPS/RTK/RTKPositionSourceTest.cc |
Tests fix conversion and validation. |
test/GPS/RTK/RTKAutoConnectTest.h |
Declares connection recovery tests. |
test/GPS/RTK/RTKAutoConnectTest.cc |
Tests serial and network recovery. |
test/GPS/RTK/GPSRtkTest.h |
Declares receiver-position tests. |
test/GPS/RTK/GPSRtkTest.cc |
Tests receiver-position lifecycle. |
test/GPS/RTK/Driver/GPSDriverUBXTest.h |
Declares UBX regression tests. |
test/GPS/RTK/Driver/GPSDriverTimeTest.h |
Declares UTC conversion tests. |
test/GPS/RTK/Driver/GPSDriverTimeTest.cc |
Tests UTC conversion behavior. |
test/GPS/RTK/Driver/GPSDriverTest.h |
Declares driver bridge tests. |
test/GPS/RTK/Driver/GPSDriverTest.cc |
Tests cancellation and baud handling. |
test/GPS/RTK/Driver/CMakeLists.txt |
Registers driver tests. |
test/GPS/RTK/CMakeLists.txt |
Registers RTK tests. |
test/GPS/RTCM/RTCMUdpInputTest.cc |
Updates logging expectations. |
test/GPS/PositionManager/PositionManagerTest.h |
Declares source fallback tests. |
test/GPS/PositionManager/PositionManagerTest.cc |
Tests source priority and staleness. |
test/GPS/NTRIP/NTRIPManagerTest.cc |
Updates logging expectations. |
test/GPS/NTRIP/NTRIPHttpTransportTest.cc |
Updates transport logging tests. |
test/GPS/NMEA/NmeaSourceManagerTest.h |
Declares NMEA connection tests. |
test/GPS/NMEA/NmeaSourceManagerTest.cc |
Tests NMEA recovery and controls. |
test/GPS/NMEA/CMakeLists.txt |
Registers NMEA tests. |
test/GPS/GPSManagerTest.h |
Declares GPS manager integration tests. |
test/GPS/CMakeLists.txt |
Reorganizes GPS tests. |
test/Comms/LinkManagerTest.h |
Declares reconnect-backoff tests. |
test/Comms/LinkManagerTest.cc |
Tests retained serial retry state. |
src/Utilities/Network/UdpForwarder.cc |
Standardizes its logging category. |
src/Settings/RTKSettings.h |
Adds RTK connection settings. |
src/Settings/RTKSettings.cc |
Implements RTK settings and migration. |
src/Settings/RTK.SettingsGroup.json |
Defines RTK connection metadata. |
src/Settings/AutoConnectSettings.h |
Adds TCP and autoconnect facts. |
src/Settings/AutoConnectSettings.cc |
Implements new connection facts. |
src/Settings/AutoConnect.SettingsGroup.json |
Defines connection metadata. |
src/QmlControls/QGroundControlQmlGlobal.h |
Exposes the GPS manager. |
src/QmlControls/QGroundControlQmlGlobal.cc |
Provides the GPS singleton. |
src/QmlControls/AppSettings.qml |
Supports settings-section navigation. |
src/MainWindow/MainWindow.qml |
Forwards settings-section navigation. |
src/GPS/RTK/UdpGPSTransport.h |
Declares UDP RTK transport. |
src/GPS/RTK/UdpGPSTransport.cc |
Implements UDP RTK transport. |
src/GPS/RTK/TcpGPSTransport.h |
Declares TCP RTK transport. |
src/GPS/RTK/TcpGPSTransport.cc |
Implements TCP RTK transport. |
src/GPS/RTK/SerialGPSTransport.h |
Exposes serial cancellation state. |
src/GPS/RTK/SerialGPSTransport.cc |
Updates transport lifecycle logging. |
src/GPS/RTK/RTKPositionSource.h |
Declares the receiver position adapter. |
src/GPS/RTK/RTKPositionSource.cc |
Converts and validates receiver fixes. |
src/GPS/RTK/RTKAutoConnectSerial.cc |
Implements serial discovery policy. |
src/GPS/RTK/RTKAutoConnect.h |
Defines unified RTK connection control. |
src/GPS/RTK/RTKAutoConnect.cc |
Implements network connection recovery. |
src/GPS/RTK/GPSRTKFactGroup.cc |
Standardizes lifecycle logging. |
src/GPS/RTK/GPSRtk.h |
Exposes the receiver position source. |
src/GPS/RTK/GPSRtk.cc |
Routes validated receiver fixes. |
src/GPS/RTK/GPSProvider.h |
Adds an explicit destructor. |
src/GPS/RTK/GPSProvider.cc |
Adds lifecycle logging. |
src/GPS/RTK/Driver/sensor_gps.h |
Updates the GNSS data structure. |
src/GPS/RTK/Driver/sensor_gnss_relative.h |
Updates its source reference. |
src/GPS/RTK/Driver/satellite_info.h |
Expands satellite capacity. |
src/GPS/RTK/Driver/px4-gpsdrivers-utc.patch |
Adds UTC conversion changes. |
src/GPS/RTK/Driver/px4-gpsdrivers-survey-read-error.patch |
Aborts survey on read failure. |
src/GPS/RTK/Driver/px4-gpsdrivers-survey-in.patch |
Restarts active surveys safely. |
src/GPS/RTK/Driver/px4-gpsdrivers-comms-diagnostics.patch |
Adds congestion diagnostics. |
src/GPS/RTK/Driver/px4-gpsdrivers-cancellation.patch |
Adds cancellation semantics. |
src/GPS/RTK/Driver/GPSTransport.h |
Extends the transport contract. |
src/GPS/RTK/Driver/GPSTransport.cc |
Adds transport lifecycle logging. |
src/GPS/RTK/Driver/GPSDriver.cc |
Handles cancellation and fixed baud. |
src/GPS/RTK/Driver/CMakeLists.txt |
Pins and patches PX4 drivers. |
src/GPS/RTK/CMakeLists.txt |
Builds RTK transports and sources. |
src/GPS/RTCM/RTCMUdpInput.cc |
Standardizes logging. |
src/GPS/RTCM/RTCMParser.h |
Adds an explicit destructor. |
src/GPS/RTCM/RTCMParser.cc |
Adds lifecycle logging. |
src/GPS/RTCM/RTCMMavlink.cc |
Standardizes its logging category. |
src/GPS/PositionManager/SimulatedPosition.cc |
Standardizes lifecycle logging. |
src/GPS/PositionManager/PositionManager.h |
Adds prioritized receiver positioning. |
src/GPS/NTRIP/NTRIPTransport.h |
Adds explicit lifecycle methods. |
src/GPS/NTRIP/NTRIPTransport.cc |
Adds transport lifecycle logging. |
src/GPS/NTRIP/NTRIPSourceTableController.cc |
Standardizes lifecycle logging. |
src/GPS/NTRIP/NTRIPSourceTable.h |
Adds an explicit model destructor. |
src/GPS/NTRIP/NTRIPSourceTable.cc |
Adds model lifecycle logging. |
src/GPS/NTRIP/NTRIPManager.cc |
Standardizes manager logging. |
src/GPS/NTRIP/NTRIPHttpTransport.cc |
Standardizes transport logging. |
src/GPS/NTRIP/NTRIPGgaProvider.h |
Adds an explicit destructor. |
src/GPS/NTRIP/NTRIPGgaProvider.cc |
Adds lifecycle logging. |
src/GPS/NTRIP/NTRIPConnectionStats.h |
Adds an explicit destructor. |
src/GPS/NTRIP/NTRIPConnectionStats.cc |
Adds lifecycle logging. |
src/GPS/NTRIP/CMakeLists.txt |
Updates NTRIP build sources. |
src/GPS/NmeaSourceManager.h |
Removes the old manager declaration. |
src/GPS/NmeaSourceManager.cc |
Removes the old manager implementation. |
src/GPS/NMEA/NMEAUtils.h |
Relocates NMEA utilities. |
src/GPS/NMEA/NMEAUtils.cc |
Implements relocated NMEA utilities. |
src/GPS/NMEA/NmeaSourceManager.h |
Declares the unified NMEA manager. |
src/GPS/NMEA/NmeaSourceManager.cc |
Implements serial/TCP/UDP NMEA management. |
src/GPS/NMEA/CMakeLists.txt |
Builds the NMEA module. |
src/GPS/GPSManager.h |
Exposes unified GPS controls. |
src/GPS/GPSManager.cc |
Coordinates receiver connections and positioning. |
src/GPS/CMakeLists.txt |
Integrates the NMEA submodule. |
src/Comms/SerialPortManager.h |
Exposes serial exclusion state. |
src/Comms/SerialPortManager.cc |
Implements exclusion queries. |
src/Comms/SerialLink.cc |
Suppresses repeated occupied-port warnings. |
src/Comms/LinkManager.h |
Retains serial autoconnect configurations. |
src/Comms/LinkManager.cc |
Preserves reconnect backoff. |
src/AppSettings/RemoteIDGpsSourceButton.qml |
Links Remote ID to GPS settings. |
src/AppSettings/RemoteIDGpsLocation.qml |
Removes duplicated GPS controls. |
src/AppSettings/pages/SettingsPages.json |
Adds GPS and separates NTRIP settings. |
src/AppSettings/pages/RemoteID.SettingsUI.json |
Adds shared GPS navigation. |
src/AppSettings/pages/NTRIP.SettingsUI.json |
Removes non-NTRIP controls. |
src/AppSettings/pages/GPS.SettingsUI.json |
Defines the dedicated GPS page. |
src/AppSettings/pages/CommLinks.SettingsUI.json |
Removes relocated GPS controls. |
src/AppSettings/NmeaGpsSettings.qml |
Adds unified NMEA controls. |
src/AppSettings/LocalRtkSettings.qml |
Adds local RTK controls. |
src/AppSettings/GpsConnectionType.qml |
Adds a shared connection selector. |
src/AppSettings/GpsConnectionControls.qml |
Adds shared connection actions. |
src/AppSettings/CMakeLists.txt |
Registers new settings components. |
CODING_STYLE.md |
Documents initializer formatting. |
Review details
- Files reviewed: 125/127 changed files
- Comments generated: 4
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| if (_receiverSource && _nmeaSource) { | ||
| _nmeaNeedsRestart = true; | ||
| } else if (_nmeaNeedsRestart && _nmeaSource) { |
| if (host.isEmpty() || !endpoint.isValid() || endpoint.host().isEmpty() || port < 1 || port > 65535 || type < 0 || | ||
| type > 3 || connection < RTKSettings::Serial || connection > RTKSettings::Udp || | ||
| (udp && (localPort < 0 || localPort > 65535))) { | ||
| return false; | ||
| } |
| const auto eligible = [this, &selectedDevice](const SerialPortManager::Port& port) { | ||
| return port.autoConnectAllowed && !port.bootloader && _serialPorts->canAutoConnectPort(port.systemLocation) && | ||
| (selectedDevice.isEmpty() ? port.boardType == QGCSerialPortInfo::BoardTypeRTKGPS | ||
| : port.systemLocation == selectedDevice); | ||
| }; |
| QCOMPARE(driver.timeFromUtc(utc, nanoseconds), expectedUsecs); | ||
| QCOMPARE(driver.clockUpdates, 1); | ||
| QCOMPARE(driver.clockTime.tv_sec, expected.toSecsSinceEpoch()); | ||
| QCOMPARE(driver.clockTime.tv_nsec, nanoseconds); |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #15060 +/- ##
==========================================
+ Coverage 25.47% 35.15% +9.68%
==========================================
Files 769 962 +193
Lines 65912 86715 +20803
Branches 30495 39991 +9496
==========================================
+ Hits 16788 30481 +13693
+ Misses 37285 35890 -1395
- Partials 11839 20344 +8505
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 640 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
|
See the Build Results workflow run for details. |
Show incoming UDP traffic and return to listening after five seconds without datagrams. Log connection status changes and cover idle recovery and teardown.
Pin PX4-GPSDrivers to ab090ca9dfe8038ae84eb795a0bed0d314896d85 after upstream PR 236 merged. Remove the five superseded patches and their patch-specific cache setup.
Feed independent bounded streams to Qt position and satellite parsers over one receiver connection. Expose satellite counts with freshness tracking and cover UDP, TCP, and teardown behavior. Capitalize NMEA source manager and stream splitter names consistently.
Expose a borrowed position source to PositionManager and keep decoder restart and queued-delivery handling in the NMEA module. Preserve source destruction subscriptions across selection changes. Cover parser reset, requests, borrowed-source lifetime, and disconnect during position delivery.
Separate connection intent from readiness for NMEA and RTK sessions, with shared pause and bounded retry behavior. Make RTK disconnect asynchronous and hold reconnection until the retiring worker releases its transport. Expose configuring, retrying, and stopping states in settings and cover lifecycle transitions and worker retirement in tests.
Apply common position validation and freshness rules to NMEA and RTK sessions. Track position and satellite expiry independently, account for queued delivery age, and expose matching fix-health status in GPS settings. Have PositionManager consume session health while preserving source priority and rejecting retired-source updates. Cover expiry, recovery, source lifetime, survey independence, and QML status bindings.
Move shared MAVLink forwarding and UDP correction input into GPSCorrectionManager. Route local RTK and NTRIP corrections independently, guard shutdown during delivery, and cover shared routing and session retirement.
Validate NMEA endpoints and retain RTK endpoint and receiver settings together across retries. Pass receiver configuration explicitly into GPSRtk and preserve saved settings in the Fact system. Cover configuration validation, connection preservation, and retry versus reconnect behavior.
Frame NMEA from mixed receiver output, normalize satellite messages for Qt, and prepare previously configured serial receivers for a manual return to NMEA. Move shared transports into the driver module and use the PX4 driver PR source. Validated with both build variants, focused GPS tests, and a live USB receiver. The full unit run has the existing BluetoothWorkerTest failure. Receiver preparation currently requires the uncommitted local PX4-GPSDrivers changes via the CPM source override.
Add an explicit serial receiver configuration setting so u-blox devices can switch from RTK to NMEA across application restarts. Keep passive sources read-only, detect managed receiver baud, and handle cancellation without retaining receiver history. Build PX4 drivers directly from src/GPS/Driver/PX4 instead of fetching PR 238. Copy sources from the local checkout based on b5a128be2b278122ea91dd884e1df0f460915926, including uncommitted NMEA configuration and acknowledgement cancellation changes. Preserve upstream source formatting and exclude the vendored subtree from QGC analysis. Validation: normal and no-serial builds passed; focused GPS tests and analyzer tests passed. Full Unit run passed 280/281 suites, with the existing BluetoothWorkerTest device-warning failure. Verified managed NMEA reception on F9P hardware across fresh application launches.
Separate GPS core and receiver libraries, retain managed NMEA transports, and carry receiver-independent observations with original reception timestamps. Add runtime capability validation, typed driver outcomes, bounded cancellation, and source-aware RTCM routing with per-sender UDP parsing. Cover lifecycle races and stale data with native, headless, and application regressions. Validation: normal and serial-disabled builds pass; GPS suites pass 42/42 and 41/41 respectively. Full Unit run passes 293/294 with the existing host-dependent Bluetooth warning failure. Scoped policy, formatting, and QML checks pass; full lint retains repository and local tooling blockers.
Separate general receiver presentation from RTK survey state around a shared receiver session. Route local corrections directly from the session and update Facts, QML, and NTRIP consumers. Move autoconnection into a receiver controller shared with managed NMEA, with settings conversion outside the controller and preserved reconnect intent. Validation: normal and no-serial builds pass; all GPS suites pass; full Unit suite passes 294/295 with the existing BluetoothWorkerTest failure. Scoped lint and changed-region formatting pass; known unavailable analysis tools remain excluded.
Share live-position Facts and metadata between vehicle and local GPS receivers. Expose survey Facts through the receiver's nested rtk group and keep GPSBaseStationState internal. Rename the base-station Fact group, state, and metadata, and migrate all 24 translation contexts without changing existing messages. Validation: normal and no-serial builds pass, along with relevant GPS suites. Full Unit suite passes 295/296 with the existing BluetoothWorkerTest failure. Scoped checks retain the existing Vehicle CMake formatting and analyzer-tool limitations.
Separate NTRIP protocol and session handling, consolidate NMEA connection ownership, and unify observation freshness and consumer policies. Add source-aware correction routing with optional receiver injection, bounded worker mailboxes, driver backend adapters, and configuration and I/O contract tests. Validation: normal and no-serial builds pass; all 51 no-serial GPS tests and the settings UI test pass. Full Unit suite passes 299 of 300 tests, with the existing Bluetooth/BlueZ failure remaining. Scoped lint passes with documented formatting and analysis-tool exclusions.
Unify receiver configuration profiles and expose capability-driven settings. Give correction settings their own owner while retaining saved keys and shared legacy Facts. Track correction selection, queueing, transport writes, drops, and unconfirmed results with bounded session-aware history. Add deterministic receiver replay and opt-in parser fuzz targets. Validation: normal and no-serial builds pass; all 54 no-serial GPS tests pass. Full Unit suite passes 302 of 303 tests with the existing Bluetooth/BlueZ failure. Settings UI, replay, native driver suites, and 11000 sanitizer fuzz runs per parser pass. Scoped lint passes with existing formatting and analysis-tool exclusions.
Add explicit position-source selection with opt-in healthy-source fallback, shared satellite and relative-position models, bounded recording and replay export, and configuration acknowledgment/readback diagnostics. Validate normal and serial-disabled builds, 57 GPS-related tests, native and sanitizer replay tests, and scoped lint. Full unit suite passes 305 of 306 tests; the existing BluetoothWorkerTest environment failure remains.
Separate shared contracts, NMEA decoding, observation models, and correction handling. Mirror ownership in tests and document application integration boundaries. Validated normal and serial-disabled builds, 57 GPS-related tests, and scoped lint. Full unit suite passes 305 of 306 tests with the existing Bluetooth environment failure.
Centralize source registration, satellite freshness, receiver profiles and attempt state. Share typed settings and vehicle observation projection. Unify RTCM framing, bounded correction delivery, NTRIP request and sink handling, and versioned recording/replay. Add incremental diagnostics and bounded mountpoint layouts. Validate serial and no-serial builds, GPS integration tests, and 35 sanitized replay cases. Full Unit suite passes 306 of 307 tests; the existing BluetoothWorker BlueZ warning failure remains.
Extract lightweight contracts and shared build definitions, organize native transports, and compose source lifecycles through scoped registrations and injectable schedulers. Preserve typed transport outcomes and original observation metadata across correction routing, diagnostics, and replay. Unify NMEA satellite decoding, fix NTRIP EOF and mountpoint projection, inject GGA and MAVLink outputs, and account for each correction destination. Remove the GPS module README. Validation: serial and no-serial builds pass; 62 GPS-related suites pass; 308/309 unit suites pass with the existing Bluetooth/BlueZ failure. Sanitized replay passes 21 cases and standalone recording passes 22 cases. Scoped lint passes. Android build/device validation remains outstanding.
Make connection admission transactional, expire observations and native diagnostics independently, and decouple correction outputs from bounded history. Share NTRIP framing and retry interrupted responses. Honor Android serial write deadlines and partial progress, validate atomic base-reference saves, normalize high-latency vehicle GPS observations, and consolidate settings profiles, NMEA satellite identity, and replay lifecycle handling. Validation: serial and no-serial builds pass; 310/311 Unit suites pass with the existing Bluetooth/BlueZ failure; all 59 no-serial GPS suites pass. Replay sanitizer tests and Android host, Java, and ARM64 compile checks pass. Full repository lint retains baseline failures.
Share typed bounded I/O, reports, framing and parsing helpers across retained receiver families. Split decoder and configuration units, remove unused copied backends, and preserve satellite and integrity metadata. Validate with connected ZED-F9P positioning, NMEA, survey/RTCM and reconnect; native sanitizers and fuzzing pass. Unit suite passes 310/311 with an unrelated Bluetooth warning failure; full lint retains existing toolchain limitations.
Associate GST accuracy and satellite identities with their receiver data, isolate NMEA UDP senders, and assemble UBX navigation epochs with EOE and deadline fallback. Centralize UBX message and receiver capability definitions, bound serial output, and add attributed upstream fixtures plus replay and fuzz coverage. Validation: application and no-serial builds passed; 311/312 unit tests passed with the existing Bluetooth/BlueZ failure; all 60 no-serial GPS/network tests and 12 native sanitizer tests passed. Connected ZED-F9P native, NMEA, survey/RTCM, and reconnect checks passed.
Unify connection control and scheduler ownership, normalize native receiver reports, and propagate explicit NMEA fix loss. Share NTRIP response handling, simplify correction ingress, and consolidate Fact metadata and position registrations. Move pure NMEA helpers into the protocol library and export immutable recordings asynchronously. Add protocol, lifecycle, virtual-time, and integration regressions. Validation: application build and GPS suites pass; 315 of 316 Unit suites pass with the existing Bluetooth adapter warning failure. Native sanitizer and fuzz coverage, serial-disabled checks, and scoped lint pass.
Share production GPS targets with standalone consumers and tests. Inject native runtime services and serial reservations, separate QGC presentation and integration, and reuse timing, wire and I/O utilities. Use explicit protocol wire layouts, selectable receiver families and recording provenance while preserving saved settings and strict replay. Validated QGC build, 63 focused suites, 19 standalone suites with and without serial, sanitizer/fuzz runs and connected ZED-F9P modes. Full Unit: 312/313; existing Bluetooth warning failure remains.
Separate receiver domain state from presentation, share vehicle observations, and extract settings and source bindings from GPSManager. Preserve NTRIP model reset safety and serial discovery identity across retries. Use typed configuration and failure outcomes, independent integrity events, checked UBX codecs, dedicated correction accounting and recording codecs, and explicit standalone library boundaries. Consolidate Android serial writes through the shared progress engine. Validation: QGC build and 62 GPS-focused tests pass; full Unit suite passes 313 of 314 with the existing BluetoothWorkerTest failure. Receiver-family builds, native sanitizer/fuzz tests, Android host/Java tests and cross-compilation pass. Connected F9P native, NMEA, reconnect and repeated autoconnect polling pass; completed survey/RTCM output and Android hardware remain unverified.
This has tons of unnecessary crap. Just messing around with stuff
Description
Allow ground-station NMEA and RTK receivers to connect over serial, UDP, or TCP, with shared connection controls and automatic recovery. GPS configuration is collected on a dedicated settings page; NTRIP retains its own page, and Remote ID links to the shared GPS source configuration.
The local RTK receiver can also supply the ground-station position. Receiver disconnects fall back to the configured NMEA or platform source, stale data is discarded on source transitions, and idle NMEA listeners wait for their first valid fix before starting the stale-position timer.
txbufwarnings, logging each port's current and historical buffer usage. Snapshots are validated and identified as observations after the warning.The driver changes are also maintained in PX4/PX4-GPSDrivers#236.
Type of Change
Testing
Linux Debug builds passed with serial support enabled and disabled. The eight focused GPS suites passed, and the final UBX regression suite passed in both builds. Scoped pre-commit checks passed for the final driver patches, CMake integration, and UBX tests.
Full Unit runs excluding
Flaky|Network: 271/272 passed with serial and 267/268 passed without serial. Both retain the previously observedBluetoothWorkerTest::_testDisconnectResetsReconnectStatefailure from unexpected Bluetooth warnings. The full repository lint/static-analysis sweep is not claimed as passing.Physical ZED-F9P USB testing covered receiver position delivery, survey restart, source switching, reconnect, and clean shutdown. The latest run accepted 52 fixes with no rejections, and a real receiver
txbuf allocwarning triggered a five-port MON-COMMS snapshot. The snapshot had already recovered to no active buffer error; it does not identify the port responsible for the earlier congestion. Survey-in completion and flight operation were not validated.The standalone PX4 driver tests also passed in Debug, Release, and AddressSanitizer/UndefinedBehaviorSanitizer builds.
Platforms Tested
Checklist
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).