QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
UBX::Plan Namespace Reference

Classes

struct  ValsetItem
struct  ValsetBatch
struct  UnexpectedOutput
 Messages a protocol 27+ receiver can send unasked and their CFG-MSGOUT keys, which a message ID does not imply. More...
struct  MessageRate
 CFG-MSG output rate of one message, as a divisor of the measurement rate. More...
struct  RTCMOutput

Enumerations

enum class  NakPolicy : uint8_t { Fail , Tolerate , Warn , WriteOnly }
 What a batch that is rejected, unanswered or not written means for configuration. More...
enum class  RTCMContent : uint8_t { StationPosition , Observations , Optional }

Functions

ValsetBatch uart1Protocols ()
 Protocol 27+ port setup at the detected baud rate: UBX only on UART1, 8N1.
ValsetBatch uart1Baudrate (uint32_t baudrate)
std::vector< ValsetBatch > portsAndNavigation (const ReceiverProfile &profile)
 Protocol 27+ configuration before jamming detection: ports, navigation, odometer and RTK.
ValsetBatch jammingDetection ()
 Probes CFG-SEC-JAMDET, which F9 HPG 1.50+, F9 L1L5 and X20 have instead of CFG-ITFM.
ValsetBatch interferenceMonitor ()
 Enables the interference monitor of firmware without CFG-SEC-JAMDET.
std::vector< ValsetBatch > messageOutput (const ReceiverProfile &profile)
 Protocol 27+ configuration after jamming detection: message output and receiver-specific extras.
ValsetBatch disableRTCMOutput ()
 Stops RTCM output, including observations a previous session left in the other MSM format.
ValsetBatch disableTimeMode ()
ValsetBatch surveyIn (const GPSBaseStationConfig::SurveyIn &survey)
ValsetBatch fixedBase (const GPSBaseStationConfig::Fixed &fixed)
ValsetBatch rtcmOutput (bool compactObservations)
 Base output at 1 Hz: station position, observations in the selected MSM format and GLONASS biases.
ValsetBatch disableMessage (MsgOutKey key)
 Disables unexpected output; the reply is not awaited.
std::array< uint8_t, 2 *WIRE_SIZE< CfgPrt > > legacyPorts (uint32_t baudrate)
std::array< MessageRate, 5 > legacyMessageOutput ()
 NAV-PVT, status, satellite and MON-HW (antenna and jamming) rates during the survey.
std::array< MessageRate, 10 > legacyDisableRTCMOutput ()
 Written without waiting for acknowledgements.
std::array< MessageRate, 2 > legacyBaseStatus ()
 Survey status and satellite rates for the 1 Hz base; rejections are ignored.
std::array< RTCMOutput, 6 > legacyRTCMOutput (bool compactObservations)
CfgTmode3 legacySurveyIn (const GPSBaseStationConfig::SurveyIn &survey)
CfgTmode3 legacyFixedBase (const GPSBaseStationConfig::Fixed &fixed)

Variables

constexpr std::chrono::milliseconds CONFIG_TIMEOUT {250}
 Acknowledgement timeout of one configuration command.
constexpr std::chrono::milliseconds LEGACY_REPLY_TIMEOUT {1000}
 The u-blox 8 protocol has CFG commands acknowledged within one second.
constexpr std::chrono::milliseconds IDENTITY_TIMEOUT {2000}
 Slow factory NMEA output can delay a MON-VER response by over a second.
constexpr std::chrono::milliseconds PORT_TIMEOUT {2000}
constexpr std::chrono::milliseconds BAUD_PROBE_DRAIN {20}
 Traffic the baud probe drains before polling MON-VER.
constexpr std::chrono::milliseconds SURVEY_STOP_TIMEOUT {3000}
constexpr std::chrono::milliseconds SURVEY_STOP_POLL {100}
constexpr std::chrono::microseconds DISABLE_MESSAGE_INTERVAL = std::chrono::seconds(1)
 An unwanted message is disabled at most this often; some cannot be disabled.
constexpr std::array BAUD_RATES {38400u, 57600u, 9600u, 115200u, 230400u, 460800u, 921600u}
 Probing order of the automatic baud detection.
constexpr unsigned BASE_BAUD = 115200
 The link rate a base is moved to when no rate is selected.
constexpr size_t VALSET_CAPACITY = 256
 Bounds a CFG-VALSET independently of received message sizes.
constexpr uint8_t NO_OUTPUT = 0
constexpr uint8_t STATIONARY_DYNAMIC_MODEL = 2
 Base stations always use the stationary navigation model.
constexpr uint8_t SURVEY_SATELLITE_RATE = 10
 NAV-SAT every tenth survey epoch.
constexpr uint8_t BASE_SATELLITE_INFO_RATE = 2
constexpr uint8_t SURVEY_STATUS_RATE = 5
constexpr uint16_t BASE_MEASUREMENT_PERIOD_MS = 1000
 RTCM output only needs 1 Hz; the survey keeps the faster navigation rate because it converges faster.
constexpr std::array< UnexpectedOutput, 3 > UNEXPECTED_OUTPUT
constexpr uint16_t LEGACY_PORT_UART1 = 1
constexpr uint16_t LEGACY_PORT_USB = 3
constexpr CfgRate LEGACY_SURVEY_RATE {.measRate = 200, .navRate = 1, .timeRef = 0}
 5 Hz, UTC-aligned.
constexpr CfgRate LEGACY_BASE_RATE {.measRate = BASE_MEASUREMENT_PERIOD_MS, .navRate = 1, .timeRef = 0}
constexpr CfgNav5 LEGACY_NAVIGATION {.mask = 0x0005, .dynModel = STATIONARY_DYNAMIC_MODEL, .fixMode = 2}
 Updates only the dynamic model and the fix mode (3D only).
constexpr MessageRate LEGACY_SURVEY_STATUS {Msg::NAV_SVIN, SURVEY_STATUS_RATE}

Detailed Description

u-blox receiver configuration as data: the CFG-VALSET batches of protocol 27 and later, the CFG-PRT, CFG-RATE, CFG-NAV5, CFG-MSG and CFG-TMODE3 commands of older receivers, and the timeouts and values they use. Every VALSET batch is one message on the wire, so its boundaries are part of the configuration.

Enumeration Type Documentation

◆ NakPolicy

enum class UBX::Plan::NakPolicy : uint8_t
strong

What a batch that is rejected, unanswered or not written means for configuration.

Enumerator
Fail 

Required: configuration stops.

Tolerate 

Optional: firmware without these keys rejects them, or the configuration flow decides.

Warn 

Optional, but worth a warning.

WriteOnly 

Required, but written without awaiting the reply.

Definition at line 169 of file UBXPlan.h.

◆ RTCMContent

enum class UBX::Plan::RTCMContent : uint8_t
strong

What a legacy RTCM output gives a rover. A base needs the station position and the observations of at least one constellation; M8P firmware versions differ in the RTCM messages they support, so the others may be rejected.

Enumerator
StationPosition 
Observations 
Optional 

Definition at line 251 of file UBXPlan.h.

Function Documentation

◆ disableMessage()

ValsetBatch UBX::Plan::disableMessage ( MsgOutKey key)
nodiscard

Disables unexpected output; the reply is not awaited.

Definition at line 208 of file UBXPlan.cc.

References NO_OUTPUT, and WriteOnly.

◆ disableRTCMOutput()

ValsetBatch UBX::Plan::disableRTCMOutput ( )
nodiscard

Stops RTCM output, including observations a previous session left in the other MSM format.

Definition at line 146 of file UBXPlan.cc.

References UBX::Cfg::MSGOUT_RTCM_3X_TYPE1005, UBX::Cfg::MSGOUT_RTCM_3X_TYPE1230, NO_OUTPUT, and Tolerate.

◆ disableTimeMode()

ValsetBatch UBX::Plan::disableTimeMode ( )
nodiscard

Definition at line 161 of file UBXPlan.cc.

References UBX::Cfg::TMODE_MODE.

◆ fixedBase()

◆ interferenceMonitor()

ValsetBatch UBX::Plan::interferenceMonitor ( )
nodiscard

Enables the interference monitor of firmware without CFG-SEC-JAMDET.

Definition at line 111 of file UBXPlan.cc.

References UBX::Cfg::ITFM_ENABLE, and Warn.

◆ jammingDetection()

ValsetBatch UBX::Plan::jammingDetection ( )
nodiscard

Probes CFG-SEC-JAMDET, which F9 HPG 1.50+, F9 L1L5 and X20 have instead of CFG-ITFM.

Definition at line 106 of file UBXPlan.cc.

References UBX::Cfg::SEC_JAMDET_SENSITIVITY_HI, and Tolerate.

◆ legacyBaseStatus()

std::array< MessageRate, 2 > UBX::Plan::legacyBaseStatus ( )
nodiscard

Survey status and satellite rates for the 1 Hz base; rejections are ignored.

Definition at line 249 of file UBXPlan.cc.

References BASE_SATELLITE_INFO_RATE, UBX::Msg::NAV_SVIN, UBX::Msg::NAV_SVINFO, and NO_OUTPUT.

◆ legacyDisableRTCMOutput()

std::array< MessageRate, 10 > UBX::Plan::legacyDisableRTCMOutput ( )
nodiscard

Written without waiting for acknowledgements.

Definition at line 235 of file UBXPlan.cc.

References NO_OUTPUT, UBX::Msg::RTCM3_1005, and UBX::Msg::RTCM3_1230.

◆ legacyFixedBase()

CfgTmode3 UBX::Plan::legacyFixedBase ( const GPSBaseStationConfig::Fixed & fixed)
nodiscard

◆ legacyMessageOutput()

std::array< MessageRate, 5 > UBX::Plan::legacyMessageOutput ( )
nodiscard

NAV-PVT, status, satellite and MON-HW (antenna and jamming) rates during the survey.

Definition at line 230 of file UBXPlan.cc.

References UBX::Msg::MON_HW, UBX::Msg::NAV_DOP, UBX::Msg::NAV_PVT, UBX::Msg::NAV_STATUS, and UBX::Msg::NAV_SVINFO.

◆ legacyPorts()

std::array< uint8_t, 2 *WIRE_SIZE< CfgPrt > > UBX::Plan::legacyPorts ( uint32_t baudrate)
nodiscard

CFG-PRT of UART1 and USB as one message, which older receivers take: UBX in, UBX and RTCM3 out, and NMEA out on USB as the protocol 27+ configuration keeps it.

Definition at line 213 of file UBXPlan.cc.

References Wire::encode(), LEGACY_PORT_UART1, and LEGACY_PORT_USB.

◆ legacyRTCMOutput()

std::array< RTCMOutput, 6 > UBX::Plan::legacyRTCMOutput ( bool compactObservations)
nodiscard

◆ legacySurveyIn()

CfgTmode3 UBX::Plan::legacySurveyIn ( const GPSBaseStationConfig::SurveyIn & survey)
nodiscard

◆ messageOutput()

◆ portsAndNavigation()

◆ rtcmOutput()

ValsetBatch UBX::Plan::rtcmOutput ( bool compactObservations)
nodiscard

Base output at 1 Hz: station position, observations in the selected MSM format and GLONASS biases.

Definition at line 188 of file UBXPlan.cc.

References BASE_MEASUREMENT_PERIOD_MS, BASE_SATELLITE_INFO_RATE, UBX::Cfg::MSGOUT_RTCM_3X_TYPE1005, UBX::Cfg::MSGOUT_RTCM_3X_TYPE1230, UBX::Cfg::MSGOUT_UBX_NAV_SAT, UBX::Cfg::MSGOUT_UBX_NAV_SVIN, NO_OUTPUT, UBX::Cfg::RATE_MEAS, and Tolerate.

◆ surveyIn()

◆ uart1Baudrate()

ValsetBatch UBX::Plan::uart1Baudrate ( uint32_t baudrate)
nodiscard

Definition at line 72 of file UBXPlan.cc.

References Tolerate, and UBX::Cfg::UART1_BAUDRATE.

◆ uart1Protocols()

ValsetBatch UBX::Plan::uart1Protocols ( )
nodiscard

Variable Documentation

◆ BASE_BAUD

unsigned UBX::Plan::BASE_BAUD = 115200
inlineconstexpr

The link rate a base is moved to when no rate is selected.

Definition at line 126 of file UBXPlan.h.

Referenced by UBX::Protocol::configure().

◆ BASE_MEASUREMENT_PERIOD_MS

uint16_t UBX::Plan::BASE_MEASUREMENT_PERIOD_MS = 1000
inlineconstexpr

RTCM output only needs 1 Hz; the survey keeps the faster navigation rate because it converges faster.

Definition at line 141 of file UBXPlan.h.

Referenced by rtcmOutput().

◆ BASE_SATELLITE_INFO_RATE

uint8_t UBX::Plan::BASE_SATELLITE_INFO_RATE = 2
inlineconstexpr

Satellites every 2 s at the 1 Hz base rate, as during a 5 Hz survey; the survey divisor would exceed the 5 s freshness of satellite reports.

Definition at line 138 of file UBXPlan.h.

Referenced by legacyBaseStatus(), and rtcmOutput().

◆ BAUD_PROBE_DRAIN

std::chrono::milliseconds UBX::Plan::BAUD_PROBE_DRAIN {20}
inlineconstexpr

Traffic the baud probe drains before polling MON-VER.

Definition at line 117 of file UBXPlan.h.

Referenced by UBX::Protocol::configure().

◆ BAUD_RATES

std::array UBX::Plan::BAUD_RATES {38400u, 57600u, 9600u, 115200u, 230400u, 460800u, 921600u}
inlineconstexpr

Probing order of the automatic baud detection.

Definition at line 124 of file UBXPlan.h.

Referenced by UBX::Protocol::configure().

◆ CONFIG_TIMEOUT

std::chrono::milliseconds UBX::Plan::CONFIG_TIMEOUT {250}
inlineconstexpr

Acknowledgement timeout of one configuration command.

Definition at line 110 of file UBXPlan.h.

◆ DISABLE_MESSAGE_INTERVAL

std::chrono::microseconds UBX::Plan::DISABLE_MESSAGE_INTERVAL = std::chrono::seconds(1)
inlineconstexpr

An unwanted message is disabled at most this often; some cannot be disabled.

Definition at line 121 of file UBXPlan.h.

◆ IDENTITY_TIMEOUT

std::chrono::milliseconds UBX::Plan::IDENTITY_TIMEOUT {2000}
inlineconstexpr

Slow factory NMEA output can delay a MON-VER response by over a second.

Definition at line 114 of file UBXPlan.h.

Referenced by UBX::Protocol::probe().

◆ LEGACY_BASE_RATE

CfgRate UBX::Plan::LEGACY_BASE_RATE {.measRate = BASE_MEASUREMENT_PERIOD_MS, .navRate = 1, .timeRef = 0}
inlineconstexpr

Definition at line 238 of file UBXPlan.h.

◆ LEGACY_NAVIGATION

CfgNav5 UBX::Plan::LEGACY_NAVIGATION {.mask = 0x0005, .dynModel = STATIONARY_DYNAMIC_MODEL, .fixMode = 2}
inlineconstexpr

Updates only the dynamic model and the fix mode (3D only).

Definition at line 240 of file UBXPlan.h.

◆ LEGACY_PORT_UART1

uint16_t UBX::Plan::LEGACY_PORT_UART1 = 1
inlineconstexpr

Definition at line 229 of file UBXPlan.h.

Referenced by legacyPorts().

◆ LEGACY_PORT_USB

uint16_t UBX::Plan::LEGACY_PORT_USB = 3
inlineconstexpr

Definition at line 230 of file UBXPlan.h.

Referenced by legacyPorts().

◆ LEGACY_REPLY_TIMEOUT

std::chrono::milliseconds UBX::Plan::LEGACY_REPLY_TIMEOUT {1000}
inlineconstexpr

The u-blox 8 protocol has CFG commands acknowledged within one second.

Definition at line 112 of file UBXPlan.h.

◆ LEGACY_SURVEY_RATE

CfgRate UBX::Plan::LEGACY_SURVEY_RATE {.measRate = 200, .navRate = 1, .timeRef = 0}
inlineconstexpr

5 Hz, UTC-aligned.

Definition at line 237 of file UBXPlan.h.

◆ LEGACY_SURVEY_STATUS

MessageRate UBX::Plan::LEGACY_SURVEY_STATUS {Msg::NAV_SVIN, SURVEY_STATUS_RATE}
inlineconstexpr

Definition at line 243 of file UBXPlan.h.

◆ NO_OUTPUT

uint8_t UBX::Plan::NO_OUTPUT = 0
inlineconstexpr

◆ PORT_TIMEOUT

std::chrono::milliseconds UBX::Plan::PORT_TIMEOUT {2000}
inlineconstexpr

Definition at line 115 of file UBXPlan.h.

Referenced by uart1Protocols().

◆ STATIONARY_DYNAMIC_MODEL

uint8_t UBX::Plan::STATIONARY_DYNAMIC_MODEL = 2
inlineconstexpr

Base stations always use the stationary navigation model.

Definition at line 133 of file UBXPlan.h.

Referenced by portsAndNavigation().

◆ SURVEY_SATELLITE_RATE

uint8_t UBX::Plan::SURVEY_SATELLITE_RATE = 10
inlineconstexpr

NAV-SAT every tenth survey epoch.

Definition at line 135 of file UBXPlan.h.

Referenced by messageOutput().

◆ SURVEY_STATUS_RATE

uint8_t UBX::Plan::SURVEY_STATUS_RATE = 5
inlineconstexpr

Definition at line 139 of file UBXPlan.h.

Referenced by surveyIn().

◆ SURVEY_STOP_POLL

std::chrono::milliseconds UBX::Plan::SURVEY_STOP_POLL {100}
inlineconstexpr

Definition at line 119 of file UBXPlan.h.

◆ SURVEY_STOP_TIMEOUT

std::chrono::milliseconds UBX::Plan::SURVEY_STOP_TIMEOUT {3000}
inlineconstexpr

Definition at line 118 of file UBXPlan.h.

◆ UNEXPECTED_OUTPUT

std::array<UnexpectedOutput, 3> UBX::Plan::UNEXPECTED_OUTPUT
inlineconstexpr
Initial value:
constexpr MsgOutKey MSGOUT_UBX_RXM_SFRBX
constexpr MsgOutKey MSGOUT_UBX_RXM_RAWX
constexpr MsgOutKey MSGOUT_UBX_NAV_TIMEGPS
constexpr MessageId RXM_SFRBX
Definition UBXFrame.h:53
constexpr MessageId NAV_TIMEGPS
Definition UBXFrame.h:48
constexpr MessageId RXM_RAWX
Definition UBXFrame.h:54

Definition at line 215 of file UBXPlan.h.

◆ VALSET_CAPACITY

size_t UBX::Plan::VALSET_CAPACITY = 256
inlineconstexpr

Bounds a CFG-VALSET independently of received message sizes.

Definition at line 129 of file UBXPlan.h.