ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

AP_GPS_GSOF: Support GPS_RATE_MS for setting update rates of GSOF packets

Open Ryanf55 opened this issue 2 years ago • 0 comments

Feature request

Is your feature request related to a problem? Please describe.

Right now, there is no way to change the GSOF data rates on the PX1 GNSS because the API is only available over the ethernet web UI. Based on the user selected baud rates, they may want to change the update rates and make them as fast as possible

Describe the solution you'd like

Support 10Hz, 50Hz, and 100Hz. Reject other values of the parameter with a invalid parameter in the constructor of the gsof driver.

Describe alternatives you've considered

Only allow a single data rate (hard coded) which preserves the current behavior.

Platform [ ] All [ ] AntennaTracker [ ] Copter [ ] Plane [ ] Rover [ ] Submarine

Additional context

The parameter is already as an enum in the header file: https://github.com/ArduPilot/ardupilot/blob/c9a3cb13c1d4820eb7521e61d6d78d075a5b9940/libraries/AP_GPS/AP_GPS_GSOF.h#L53-L57

It is sent to the configuration here: https://github.com/ArduPilot/ardupilot/blob/c9a3cb13c1d4820eb7521e61d6d78d075a5b9940/libraries/AP_GPS/AP_GPS_GSOF.h#L68

It's hard coded 10Hz here: https://github.com/ArduPilot/ardupilot/blob/c9a3cb13c1d4820eb7521e61d6d78d075a5b9940/libraries/AP_GPS/AP_GPS_GSOF.cpp#L89

Ryanf55 avatar Nov 13 '23 23:11 Ryanf55