QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GPSReceiverConfig.h File Reference
#include <chrono>
#include <cstdint>
#include <limits>
#include <variant>
#include <QtCore/QString>
#include "GPSType.h"
+ Include dependency graph for GPSReceiverConfig.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GPSEllipsoidPosition
 WGS84 geodetic position with ellipsoid height, not mean-sea-level altitude. More...
 
struct  GPSBaseStationConfig
 Configuration used only by the RTK base-station role. More...
 
struct  GPSBaseStationConfig::SurveyIn
 
struct  GPSBaseStationConfig::Fixed
 
struct  GPSBaseStationConfig::ReceiverAveraging
 
struct  GPSReceiverConfig
 

Enumerations

enum class  GPSReceiverConfigError {
  None , UnknownReceiver , InvalidSurveyIn , InvalidFixedBase ,
  UnsupportedBaseMode , InvalidReceiverAveraging , InvalidBaudRate , UnsupportedPersistentConfiguration ,
  UnsupportedCompactObservations
}
 

Functions

constexpr bool gpsValidBaudRate (uint32_t baudRate, bool passive)
 
GPSReceiverConfigError gpsValidateBaseStationConfig (const GPSBaseStationConfig &config)
 Check the selected base mode against the existing receiver wire-unit limits.
 
GPSReceiverConfigError gpsValidateReceiverConfig (GPSType type, const GPSReceiverConfig &config)
 Precedence: recognized receiver, persistent permission, base mode, baud rate.
 
QString gpsReceiverConfigErrorText (GPSReceiverConfigError error)
 Translated diagnostic; empty for GPSReceiverConfigError::None.
 
QString gpsReceiverConfigError (GPSType type, const GPSReceiverConfig &config)
 An empty diagnostic means the receiver supports the role and all supplied settings.
 
GPSReceiverConfig gpsReceiverConfigForDetected (GPSType detected, GPSReceiverConfig config, bool *compactFallback=nullptr)
 
QString gpsDetectedReceiverConfigError (GPSType detected, const GPSReceiverConfig &config)
 

Enumeration Type Documentation

◆ GPSReceiverConfigError

enum class GPSReceiverConfigError
strong
Enumerator
None 
UnknownReceiver 
InvalidSurveyIn 
InvalidFixedBase 
UnsupportedBaseMode 
InvalidReceiverAveraging 
InvalidBaudRate 
UnsupportedPersistentConfiguration 
UnsupportedCompactObservations 

Definition at line 65 of file GPSReceiverConfig.h.

Function Documentation

◆ gpsDetectedReceiverConfigError()

QString gpsDetectedReceiverConfigError ( GPSType  detected,
const GPSReceiverConfig &  config 
)

Why the detected family cannot perform config, naming the family and the option, such as "Detected Septentrio receiver does not support receiver-managed averaging"; empty when it can.

Definition at line 133 of file GPSReceiverConfig.cc.

References config, error, gpsReceiverConfigErrorText(), gpsReceiverName(), gpsValidateReceiverConfig(), None, and UnsupportedBaseMode.

◆ gpsReceiverConfigError()

QString gpsReceiverConfigError ( GPSType  type,
const GPSReceiverConfig &  config 
)

An empty diagnostic means the receiver supports the role and all supplied settings.

Definition at line 114 of file GPSReceiverConfig.cc.

References config, gpsReceiverConfigErrorText(), and gpsValidateReceiverConfig().

Referenced by GPSDriver::configure(), and gpsReceiverConfigFor().

◆ gpsReceiverConfigErrorText()

◆ gpsReceiverConfigForDetected()

GPSReceiverConfig gpsReceiverConfigForDetected ( GPSType  detected,
GPSReceiverConfig  config,
bool *  compactFallback = nullptr 
)

Fits a GPSType::automatic request to the family detection found. Consent to persistent changes is a permission, so it lapses where the family has no persistent configuration; a compact-observation request lapses where the family has no compact option, which then sends its standard observations, and compactFallback, when given, reports that. Any other option the family lacks is kept, for gpsDetectedReceiverConfigError() to report.

Definition at line 119 of file GPSReceiverConfig.cc.

References GPSReceiverCapabilities::compactObservations, config, gpsReceiverCapabilities(), and GPSReceiverCapabilities::persistentConfiguration.

◆ gpsValidateBaseStationConfig()

GPSReceiverConfigError gpsValidateBaseStationConfig ( const GPSBaseStationConfig &  config)

Check the selected base mode against the existing receiver wire-unit limits.

Definition at line 11 of file GPSReceiverConfig.cc.

References config, InvalidFixedBase, InvalidReceiverAveraging, InvalidSurveyIn, None, and GPSProtocolMath::tenthMillimeters().

◆ gpsValidateReceiverConfig()

GPSReceiverConfigError gpsValidateReceiverConfig ( GPSType  type,
const GPSReceiverConfig &  config 
)

Precedence: recognized receiver, persistent permission, base mode, baud rate.

Definition at line 75 of file GPSReceiverConfig.cc.

References config, gpsReceiverCapabilities(), GPSReceiverCapabilities::recognized, and UnknownReceiver.

Referenced by gpsDetectedReceiverConfigError(), and gpsReceiverConfigError().

◆ gpsValidBaudRate()

constexpr bool gpsValidBaudRate ( uint32_t  baudRate,
bool  passive 
)
constexpr

An explicit serial rate within the receivers' range, or zero for a configurable receiver to detect the rate. A passive receiver is never configured, so it needs its existing rate.

Definition at line 80 of file GPSReceiverConfig.h.

Referenced by GPSReceiver::serialBaudRates().