gps: ubx: add output rate parameter (#26388)

* gps: ubx: add parameter to configure module measurement rate (GPS_UBX_RATE)

* gps: update submodule

* submodule
This commit is contained in:
Jacob Dahl 2026-02-10 14:49:40 +09:00 committed by GitHub
parent fd9abf76fd
commit ee196fadb8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 27 additions and 0 deletions

View File

@ -786,6 +786,13 @@ GPS::run()
param_get(handle, &gps_ubx_min_elev);
}
int32_t gps_ubx_rate = 0;
handle = param_find("GPS_UBX_RATE");
if (handle != PARAM_INVALID) {
param_get(handle, &gps_ubx_rate);
}
handle = param_find("GPS_UBX_MODE");
GPSDriverUBX::UBXMode ubx_mode{GPSDriverUBX::UBXMode::Normal};
@ -945,6 +952,7 @@ GPS::run()
.dgnss_timeout = (uint8_t)gps_ubx_dgnss_to,
.min_cno = (uint8_t)gps_ubx_min_cno,
.min_elev = (int8_t)gps_ubx_min_elev,
.output_rate = (uint8_t)gps_ubx_rate,
.heading_offset = heading_offset,
.uart2_baudrate = f9p_uart2_baudrate,
.ppk_output = ppk_output > 0,

View File

@ -114,6 +114,25 @@ PARAM_DEFINE_INT32(GPS_UBX_MIN_CNO, 0);
*/
PARAM_DEFINE_INT32(GPS_UBX_MIN_ELEV, 0);
/**
* u-blox GPS output rate
*
* Configure the output rate of u-blox GPS receivers (protocol v27+).
* When set to 0, automatic rate selection is used based on the receiver model.
* Default rates: M9N=8Hz, F9P L1L2=5Hz, F9P L1L5=5Hz, Others=10Hz.
*
* Note: Higher rates reduce satellite count (e.g., >8Hz limits to 16 SVs on M9N).
* Max rates vary by model and RTK mode: F9P L1L2=5-7Hz, F9P L1L5=7-8Hz, X20=25Hz.
* High rates at 115200 baud may cause dropouts.
*
* @min 0
* @max 25
* @unit Hz
* @reboot_required true
* @group GPS
*/
PARAM_DEFINE_INT32(GPS_UBX_RATE, 0);
/**
* Enable sat info (if available)
*