QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GPSReceiverDescriptor.h
Go to the documentation of this file.
1#pragma once
2
3#include <optional>
4#include <span>
5
6#include <QtCore/QLatin1StringView>
7#include <QtCore/QObject>
8#include <QtCore/QString>
9
10#include "GPSType.h"
11
14{
15 bool recognized = false;
16 bool rtkBase = false;
17 bool surveyIn = false;
18 bool receiverAveraging = false;
19 bool passive = false;
21 bool compactObservations = false;
22};
23
26inline constexpr int GPS_AUTOMATIC_MANUFACTURER = 0;
27
59
60[[nodiscard]] std::span<const GPSReceiverDescriptor> gpsReceiverDescriptors();
61[[nodiscard]] const GPSReceiverDescriptor* gpsReceiverDescriptor(GPSType type);
62[[nodiscard]] const GPSReceiverDescriptor* gpsReceiverDescriptorForManufacturer(int manufacturer);
63
65[[nodiscard]] std::optional<GPSType> gpsReceiverTypeForManufacturer(int manufacturer);
67[[nodiscard]] int gpsReceiverManufacturerForType(GPSType type);
68
71
73[[nodiscard]] QString gpsReceiverName(GPSType type);
74
77[[nodiscard]] QString gpsInputProtocolName(GPSType type);
78
83{
84 Q_GADGET
85 Q_PROPERTY(bool specificReceiver MEMBER specificReceiver FINAL)
86 Q_PROPERTY(bool automatic MEMBER automatic FINAL)
87 Q_PROPERTY(bool rtkBase MEMBER rtkBase FINAL)
88 Q_PROPERTY(bool surveyIn MEMBER surveyIn FINAL)
89 Q_PROPERTY(bool receiverAveraging MEMBER receiverAveraging FINAL)
90 Q_PROPERTY(bool compactObservations MEMBER compactObservations FINAL)
91 Q_PROPERTY(bool passive MEMBER passive FINAL)
92 Q_PROPERTY(bool surveyAccuracy MEMBER surveyAccuracy FINAL)
93 Q_PROPERTY(bool surveyDuration MEMBER surveyDuration FINAL)
94 Q_PROPERTY(bool fixedBaseAccuracy MEMBER fixedBaseAccuracy FINAL)
95 Q_PROPERTY(bool observationAccuracyFilter MEMBER observationAccuracyFilter FINAL)
96 Q_PROPERTY(bool acceptedObservationTime MEMBER acceptedObservationTime FINAL)
97 Q_PROPERTY(bool reportsSurveyDuration MEMBER reportsSurveyDuration FINAL)
98 Q_PROPERTY(bool persistentConfiguration MEMBER persistentConfiguration FINAL)
99 Q_PROPERTY(bool restartOnConnect MEMBER restartOnConnect FINAL)
100 Q_PROPERTY(bool surveyMaySavePosition MEMBER surveyMaySavePosition FINAL)
101
102public:
103 bool specificReceiver = false;
105 bool automatic = false;
106 bool rtkBase = false;
107 bool surveyIn = false;
108 bool receiverAveraging = false;
110 bool passive = false;
111 bool surveyAccuracy = false;
112 bool surveyDuration = false;
113 bool fixedBaseAccuracy = false;
118 bool restartOnConnect = false;
120
121 bool operator==(const GPSReceiverPresentation&) const = default;
122};
123
124[[nodiscard]] const GPSReceiverPresentation& gpsReceiverPresentation(int manufacturer);
const GPSReceiverDescriptor * gpsReceiverDescriptorForManufacturer(int manufacturer)
std::span< const GPSReceiverDescriptor > gpsReceiverDescriptors()
QString gpsInputProtocolName(GPSType type)
int gpsReceiverManufacturerForType(GPSType type)
The persisted manufacturer of type, or GPS_AUTOMATIC_MANUFACTURER when it has none.
const GPSReceiverDescriptor * gpsReceiverDescriptor(GPSType type)
GPSReceiverCapabilities gpsReceiverCapabilities(GPSType type)
What type supports, for either role; unknown receiver families support nothing.
QString gpsReceiverName(GPSType type)
The name of type's receiver family as shown to users; empty when no descriptor exists.
constexpr int GPS_AUTOMATIC_MANUFACTURER
std::optional< GPSType > gpsReceiverTypeForManufacturer(int manufacturer)
The family a persisted manufacturer selects, GPSType::automatic for GPS_AUTOMATIC_MANUFACTURER; empty...
const GPSReceiverPresentation & gpsReceiverPresentation(int manufacturer)
Software request support, not a guarantee for every physical receiver model or firmware.
Persisted manufacturer IDs are distinct from GPSType values.
GPSReceiverCapabilities capabilities
QLatin1StringView protocol
The protocol a passive input decodes for this family, such as UBX; empty when it has none of its own.
QLatin1StringView name
Shown to users, such as in "Detected Septentrio receiver".
bool operator==(const GPSReceiverPresentation &) const =default
bool automatic
The family is detected when connecting.