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

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 GPSReceiverConfig::base, gpsReceiverConfigErrorText(), gpsReceiverName(), gpsValidateReceiverConfig(), GPSBaseStationConfig::mode, None, and UnsupportedBaseMode.

◆ gpsReceiverConfigError()

QString gpsReceiverConfigError ( GPSType type,
const GPSReceiverConfig & config )
nodiscard

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

Definition at line 114 of file GPSReceiverConfig.cc.

References gpsReceiverConfigErrorText(), and gpsValidateReceiverConfig().

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

◆ gpsReceiverConfigErrorText()

◆ gpsReceiverConfigForDetected()

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

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 GPSReceiverConfig::allowPersistentChanges, GPSReceiverConfig::base, GPSBaseStationConfig::compactObservations, GPSReceiverCapabilities::compactObservations, gpsReceiverCapabilities(), and GPSReceiverCapabilities::persistentConfiguration.

◆ gpsValidateBaseStationConfig()

GPSReceiverConfigError gpsValidateBaseStationConfig ( const GPSBaseStationConfig & config)
nodiscard

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

Definition at line 11 of file GPSReceiverConfig.cc.

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

◆ gpsValidateReceiverConfig()

GPSReceiverConfigError gpsValidateReceiverConfig ( GPSType type,
const GPSReceiverConfig & config )
nodiscard

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

Definition at line 75 of file GPSReceiverConfig.cc.

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

Referenced by gpsDetectedReceiverConfigError(), and gpsReceiverConfigError().