mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Add parameter to select the set of used GNSS systems
This commit is contained in:
parent
917fef546a
commit
3834690c4b
@ -1 +1 @@
|
||||
Subproject commit 9282d3d73391859f51c759a343a052dfb1be02e0
|
||||
Subproject commit 52535dc2ebb41bc5c134d99a1b9ad2023ac0512b
|
||||
@ -697,6 +697,17 @@ GPS::run()
|
||||
}
|
||||
}
|
||||
|
||||
int32_t gnssSystemsParam = static_cast<int32_t>(GPSHelper::GNSSSystemsMask::RECEIVER_DEFAULTS);
|
||||
|
||||
if (_instance == Instance::Main) {
|
||||
handle = param_find("GPS_1_GNSS");
|
||||
param_get(handle, &gnssSystemsParam);
|
||||
|
||||
} else if (_instance == Instance::Secondary) {
|
||||
handle = param_find("GPS_2_GNSS");
|
||||
param_get(handle, &gnssSystemsParam);
|
||||
}
|
||||
|
||||
initializeCommunicationDump();
|
||||
|
||||
uint64_t last_rate_measurement = hrt_absolute_time();
|
||||
@ -769,8 +780,11 @@ GPS::run()
|
||||
}
|
||||
|
||||
_baudrate = _configured_baudrate;
|
||||
GPSHelper::GPSConfig gpsConfig{};
|
||||
gpsConfig.output_mode = GPSHelper::OutputMode::GPS;
|
||||
gpsConfig.gnss_systems = static_cast<GPSHelper::GNSSSystemsMask>(gnssSystemsParam);
|
||||
|
||||
if (_helper && _helper->configure(_baudrate, GPSHelper::OutputMode::GPS) == 0) {
|
||||
if (_helper && _helper->configure(_baudrate, gpsConfig) == 0) {
|
||||
|
||||
/* reset report */
|
||||
memset(&_report_gps_pos, 0, sizeof(_report_gps_pos));
|
||||
|
||||
@ -146,3 +146,63 @@ PARAM_DEFINE_INT32(GPS_1_PROTOCOL, 1);
|
||||
* @group GPS
|
||||
*/
|
||||
PARAM_DEFINE_INT32(GPS_2_PROTOCOL, 1);
|
||||
|
||||
/**
|
||||
* GNSS Systems for Primary GPS (integer bitmask)
|
||||
*
|
||||
* This integer bitmask controls the set of GNSS systems used by the receiver. Check your
|
||||
* receiver's documentation on how many systems are supported to be used in parallel.
|
||||
*
|
||||
* Currently this functionality is just implemented for u-blox receivers.
|
||||
*
|
||||
* When no bits are set, the receiver's default configuration should be used.
|
||||
*
|
||||
* Set bits true to enable:
|
||||
* 0 : Use GPS (with QZSS)
|
||||
* 1 : Use SBAS (multiple GPS augmentation systems)
|
||||
* 2 : Use Galileo
|
||||
* 3 : Use BeiDou
|
||||
* 4 : Use GLONASS
|
||||
*
|
||||
* @min 0
|
||||
* @max 31
|
||||
* @bit 0 GPS (with QZSS)
|
||||
* @bit 1 SBAS
|
||||
* @bit 2 Galileo
|
||||
* @bit 3 BeiDou
|
||||
* @bit 4 GLONASS
|
||||
*
|
||||
* @reboot_required true
|
||||
* @group GPS
|
||||
*/
|
||||
PARAM_DEFINE_INT32(GPS_1_GNSS, 0);
|
||||
|
||||
/**
|
||||
* GNSS Systems for Secondary GPS (integer bitmask)
|
||||
*
|
||||
* This integer bitmask controls the set of GNSS systems used by the receiver. Check your
|
||||
* receiver's documentation on how many systems are supported to be used in parallel.
|
||||
*
|
||||
* Currently this functionality is just implemented for u-blox receivers.
|
||||
*
|
||||
* When no bits are set, the receiver's default configuration should be used.
|
||||
*
|
||||
* Set bits true to enable:
|
||||
* 0 : Use GPS (with QZSS)
|
||||
* 1 : Use SBAS (multiple GPS augmentation systems)
|
||||
* 2 : Use Galileo
|
||||
* 3 : Use BeiDou
|
||||
* 4 : Use GLONASS
|
||||
*
|
||||
* @min 0
|
||||
* @max 31
|
||||
* @bit 0 GPS (with QZSS)
|
||||
* @bit 1 SBAS
|
||||
* @bit 2 Galileo
|
||||
* @bit 3 BeiDou
|
||||
* @bit 4 GLONASS
|
||||
*
|
||||
* @reboot_required true
|
||||
* @group GPS
|
||||
*/
|
||||
PARAM_DEFINE_INT32(GPS_2_GNSS, 0);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user