Skip to content

866 add support for dual gps#867

Merged
Matthew-Dobson merged 19 commits intomainfrom
866-add-support-for-dual-gps
Nov 27, 2025
Merged

866 add support for dual gps#867
Matthew-Dobson merged 19 commits intomainfrom
866-add-support-for-dual-gps

Conversation

@Matthew-Dobson
Copy link
Copy Markdown
Contributor

This PR adds full support for dual-GPS telemetry by integrating the GPS2_RAW (ID 124) MAVLink message into the entire FGCS pipeline. The backend now registers and forwards GPS2_RAW alongside GPS_RAW_INT, the socket middleware handles and dispatches it, Redux stores it in a new gps2RawIntData slice, and the status bar displays the secondary GPS fix type when the data is present. This brings FGCS in line with ArduPilot’s dual-GPS capabilities and allows operators to see and verify secondary GPS status in both SITL and real dual-receiver setups.

Copilot AI review requested due to automatic review settings November 23, 2025 02:07
@Matthew-Dobson Matthew-Dobson linked an issue Nov 23, 2025 that may be closed by this pull request
@Matthew-Dobson Matthew-Dobson self-assigned this Nov 23, 2025
@Matthew-Dobson Matthew-Dobson requested a review from a team November 23, 2025 02:07
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 adds comprehensive support for dual GPS telemetry by integrating the GPS2_RAW MAVLink message (ID 124) throughout the FGCS stack. The implementation enables operators to monitor secondary GPS status in both SITL and real dual-receiver setups, aligning with ArduPilot's dual-GPS capabilities.

  • Backend now registers and forwards GPS2_RAW messages alongside GPS_RAW_INT
  • Redux state management includes a new gps2RawIntData slice with dedicated reducer and selectors
  • Status bar UI conditionally displays secondary GPS fix type and satellite count when data is available

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
radio/app/endpoints/states.py Adds GPS2_RAW to the dashboard message listeners for backend message forwarding
gcs/src/redux/slices/droneInfoSlice.js Implements GPS2 state management with new gps2RawIntData initial state, setGps2RawIntData reducer, and selectGPS2RawInt selector
gcs/src/redux/middleware/socketMiddleware.js Handles incoming GPS2_RAW messages and dispatches them to Redux store
gcs/src/components/dashboard/statusBar.jsx Displays secondary GPS fix type and satellite count with IconSatellite when GPS2 data is present

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread gcs/src/redux/middleware/socketMiddleware.js Outdated
Comment thread gcs/src/redux/slices/droneInfoSlice.js Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread gcs/src/redux/middleware/socketMiddleware.js Outdated
Comment thread gcs/src/redux/slices/droneInfoSlice.js Outdated
Copy link
Copy Markdown
Member

@1Blademaster 1Blademaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one last change, rest looks good. Don't think we should calculate GPS tracking heading based on info from second GPS, only use the first GPS for that.

@Matthew-Dobson Matthew-Dobson merged commit 1de3bea into main Nov 27, 2025
8 checks passed
@Matthew-Dobson Matthew-Dobson deleted the 866-add-support-for-dual-gps branch November 27, 2025 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for dual GPS

3 participants