QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GPSReceiverConfig.cc File Reference
#include "GPSReceiverConfig.h"
#include <cmath>
#include <limits>
#include <QtCore/QCoreApplication>
#include "GPSProtocolMath.h"
#include "GPSReceiverDescriptor.h"
+ Include dependency graph for GPSReceiverConfig.cc:

Go to the source code of this file.

Functions

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)
 
QString gpsDetectedReceiverConfigError (GPSType detected, const GPSReceiverConfig &config)
 

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