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

Classes

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

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)

Disables unexpected output; the reply is not awaited.

Definition at line 208 of file UBXPlan.cc.

References NO_OUTPUT, UBX::Plan::ValsetBatch::policy, and WriteOnly.

◆ disableRTCMOutput()

ValsetBatch UBX::Plan::disableRTCMOutput ( )

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, UBX::Plan::ValsetBatch::policy, and Tolerate.

◆ disableTimeMode()

ValsetBatch UBX::Plan::disableTimeMode ( )

Definition at line 161 of file UBXPlan.cc.

References UBX::Plan::ValsetBatch::items, and UBX::Cfg::TMODE_MODE.

◆ fixedBase()

◆ interferenceMonitor()

ValsetBatch UBX::Plan::interferenceMonitor ( )

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

Definition at line 111 of file UBXPlan.cc.

References UBX::Cfg::ITFM_ENABLE, UBX::Plan::ValsetBatch::policy, and Warn.

◆ jammingDetection()

ValsetBatch UBX::Plan::jammingDetection ( )

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::Plan::ValsetBatch::policy, UBX::Cfg::SEC_JAMDET_SENSITIVITY_HI, and Tolerate.

◆ legacyBaseStatus()

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

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 ( )

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)

◆ legacyMessageOutput()

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

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)

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, LEGACY_PORT_USB, and UBX::CfgPrt::portID.

◆ legacyRTCMOutput()

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

◆ legacySurveyIn()

◆ messageOutput()

◆ portsAndNavigation()

◆ rtcmOutput()

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

◆ surveyIn()

◆ uart1Baudrate()

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

Definition at line 72 of file UBXPlan.cc.

References UBX::Plan::ValsetBatch::policy, Tolerate, and UBX::Cfg::UART1_BAUDRATE.

◆ uart1Protocols()

Variable Documentation

◆ BASE_BAUD

constexpr 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.

◆ BASE_MEASUREMENT_PERIOD_MS

constexpr 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

constexpr 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

constexpr 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.

◆ BAUD_RATES

constexpr 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.

◆ CONFIG_TIMEOUT

constexpr 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

constexpr 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

constexpr 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.

◆ LEGACY_BASE_RATE

constexpr 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

constexpr 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

constexpr uint16_t UBX::Plan::LEGACY_PORT_UART1 = 1
inlineconstexpr

Definition at line 229 of file UBXPlan.h.

Referenced by legacyPorts().

◆ LEGACY_PORT_USB

constexpr uint16_t UBX::Plan::LEGACY_PORT_USB = 3
inlineconstexpr

Definition at line 230 of file UBXPlan.h.

Referenced by legacyPorts().

◆ LEGACY_REPLY_TIMEOUT

constexpr 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

constexpr 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

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

Definition at line 243 of file UBXPlan.h.

◆ NO_OUTPUT

constexpr uint8_t UBX::Plan::NO_OUTPUT = 0
inlineconstexpr

◆ PORT_TIMEOUT

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

Definition at line 115 of file UBXPlan.h.

Referenced by uart1Protocols().

◆ STATIONARY_DYNAMIC_MODEL

constexpr 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

constexpr 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

constexpr uint8_t UBX::Plan::SURVEY_STATUS_RATE = 5
inlineconstexpr

Definition at line 139 of file UBXPlan.h.

Referenced by surveyIn().

◆ SURVEY_STOP_POLL

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

Definition at line 119 of file UBXPlan.h.

◆ SURVEY_STOP_TIMEOUT

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

Definition at line 118 of file UBXPlan.h.

◆ UNEXPECTED_OUTPUT

constexpr 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

constexpr 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.