Skip to content

Commit 55e0810

Browse files
wrsolichinjulianoesdakejahl
authored
Expose u-blox min elevation, min SNR and DGNSS timeout parameters RTK Fix Improvements (#25720)
* Exposing u-Blox min CNO, min elevation, and DGNSS timeout for RTK Fix Improvement * update gps submodule --------- Co-authored-by: Julian Oes <julian@oes.ch> Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com> Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
1 parent 4ac7853 commit 55e0810

File tree

5 files changed

+72
-3
lines changed

5 files changed

+72
-3
lines changed

src/drivers/gps/devices

src/drivers/gps/gps.cpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,27 @@ GPS::run()
761761
param_get(handle, &gps_ubx_dynmodel);
762762
}
763763

764+
int32_t gps_ubx_dgnss_to = 0;
765+
handle = param_find("GPS_UBX_DGNSS_TO");
766+
767+
if (handle != PARAM_INVALID) {
768+
param_get(handle, &gps_ubx_dgnss_to);
769+
}
770+
771+
int32_t gps_ubx_min_cno = 0;
772+
handle = param_find("GPS_UBX_MIN_CNO");
773+
774+
if (handle != PARAM_INVALID) {
775+
param_get(handle, &gps_ubx_min_cno);
776+
}
777+
778+
int32_t gps_ubx_min_elev = 0;
779+
handle = param_find("GPS_UBX_MIN_ELEV");
780+
781+
if (handle != PARAM_INVALID) {
782+
param_get(handle, &gps_ubx_min_elev);
783+
}
784+
764785
handle = param_find("GPS_UBX_MODE");
765786

766787
GPSDriverUBX::UBXMode ubx_mode{GPSDriverUBX::UBXMode::Normal};
@@ -910,6 +931,9 @@ GPS::run()
910931
case gps_driver_mode_t::UBX: {
911932
GPSDriverUBX::Settings settings = {
912933
.dynamic_model = (uint8_t)gps_ubx_dynmodel,
934+
.dgnss_timeout = (uint8_t)gps_ubx_dgnss_to,
935+
.min_cno = (uint8_t)gps_ubx_min_cno,
936+
.min_elev = (int8_t)gps_ubx_min_elev,
913937
.heading_offset = heading_offset,
914938
.uart2_baudrate = f9p_uart2_baudrate,
915939
.ppk_output = ppk_output > 0,

src/drivers/gps/params.c

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,51 @@ PARAM_DEFINE_INT32(GPS_DUMP_COMM, 0);
6969
*/
7070
PARAM_DEFINE_INT32(GPS_UBX_DYNMODEL, 7);
7171

72+
/**
73+
* u-blox GPS DGNSS timeout
74+
*
75+
* When set to 0 (default), default DGNSS timeout set by u-blox will be used.
76+
*
77+
* @min 0
78+
* @max 255
79+
* @unit s
80+
*
81+
* @reboot_required true
82+
*
83+
* @group GPS
84+
*/
85+
PARAM_DEFINE_INT32(GPS_UBX_DGNSS_TO, 0);
86+
87+
/**
88+
* u-blox GPS minimum satellite signal level for navigation
89+
*
90+
* When set to 0 (default), default minimum satellite signal level set by u-blox wll be used.
91+
*
92+
* @min 0
93+
* @max 255
94+
* @unit dBHz
95+
*
96+
* @reboot_required true
97+
*
98+
* @group GPS
99+
*/
100+
PARAM_DEFINE_INT32(GPS_UBX_MIN_CNO, 0);
101+
102+
/**
103+
* u-blox GPS minimum elevation for a GNSS satellite to be used in navigation
104+
*
105+
* When set to 0 (default), default minimum elevation set by u-blox will be used.
106+
*
107+
* @min 0
108+
* @max 127
109+
* @unit deg
110+
*
111+
* @reboot_required true
112+
*
113+
* @group GPS
114+
*/
115+
PARAM_DEFINE_INT32(GPS_UBX_MIN_ELEV, 0);
116+
72117
/**
73118
* Enable sat info (if available)
74119
*

src/lib/parameters/px4params/srcparser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def Validate(self):
363363
'm/s^3/sqrt(Hz)', 'm/s/sqrt(Hz)', 's/(1000*PWM)', '%m/s', 'min', 'us/C',
364364
'N/(m/s)', 'Nm/rad', 'Nm/(rad/s)', 'Nm', 'N',
365365
'rpm',
366-
'normalized_thrust/s', 'normalized_thrust', 'norm', 'SD',''])
366+
'normalized_thrust/s', 'normalized_thrust', 'norm', 'SD', 'dBHz', ''])
367367
for group in self.GetParamGroups():
368368
for param in group.GetParams():
369369
name = param.GetName()

validation/module_schema.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ parameters:
155155
'm/s^3/sqrt(Hz)', 'm/s/sqrt(Hz)', 's/(1000*PWM)', '%m/s', 'min', 'us/C',
156156
'N/(m/s)', 'Nm/(rad/s)', 'Nm', 'N',
157157
'rpm',
158-
'normalized_thrust/s', 'normalized_thrust', 'norm', 'SD']
158+
'normalized_thrust/s', 'normalized_thrust', 'norm', 'SD', 'dBHz']
159159
bit:
160160
# description of all bits for type bitmask.
161161
# The first bit is 0.

0 commit comments

Comments
 (0)