12 case GPSConnectionError::OpenFailed:
13 return detail.isEmpty()
14 ? GPSReceiver::tr(
"Failed to open the receiver. Reconnecting automatically.")
15 :
GPSReceiver::tr(
"Failed to open the receiver: %1. Reconnecting automatically.").arg(detail);
16 case GPSConnectionError::ConfigFailed:
17 case GPSConnectionError::ConsentRequired:
18 return detail.isEmpty()
19 ? GPSReceiver::tr(
"Receiver configuration failed. Reconnecting automatically.")
20 :
GPSReceiver::tr(
"Receiver configuration failed: %1. Reconnecting automatically.").arg(detail);
21 case GPSConnectionError::ProtocolError:
22 return detail.isEmpty()
23 ? GPSReceiver::tr(
"Receiver protocol error. Reconnecting automatically.")
24 :
GPSReceiver::tr(
"Receiver protocol error: %1. Reconnecting automatically.").arg(detail);
25 case GPSConnectionError::DeviceError:
26 case GPSConnectionError::None:
29 return detail.isEmpty() ? GPSReceiver::tr(
"Receiver connection lost. Reconnecting automatically.")
30 :
GPSReceiver::tr(
"Receiver connection lost: %1. Reconnecting automatically.").arg(detail);
42 return GPSReceiver::tr(
"Receiver unplugged.");
45 return reconnectingMessage(
error, detail);
47 return GPSReceiver::tr(
"Receiver unplugged. Reconnecting when it is plugged back in.");
52 return GPSReceiver::tr(
"Receiver unplugged. Select a device and reconnect.");
55 case GPSConnectionError::OpenFailed:
56 return detail.isEmpty() ? GPSReceiver::tr(
57 "Failed to open the receiver. Check the device or network "
58 "address, permissions, and other connections.")
59 : GPSReceiver::tr(
"Failed to open the receiver: %1.").arg(detail);
60 case GPSConnectionError::ConfigFailed:
61 case GPSConnectionError::ConsentRequired:
62 return detail.isEmpty()
64 "Receiver configuration failed. Check the receiver type, baud rate, and base mode.")
65 : GPSReceiver::tr(
"Receiver configuration failed: %1").arg(detail);
66 case GPSConnectionError::ProtocolError:
68 return detail.isEmpty()
69 ? GPSReceiver::tr(
"Receiver protocol error. Check the receiver type and reconnect.")
70 : GPSReceiver::tr(
"Receiver protocol error: %1. Check the receiver type and reconnect.")
72 case GPSConnectionError::DeviceError:
74 return detail.isEmpty()
75 ? GPSReceiver::tr(
"Receiver connection lost. Check the device and reconnect.")
76 : GPSReceiver::tr(
"Receiver connection lost: %1. Check the device and reconnect.").arg(detail);
77 case GPSConnectionError::None:
86 return GPSReceiver::tr(
87 "Receiver configuration failed: %1. Automatic connections never save settings to "
88 "the receiver's flash. To let QGroundControl save the %2 receiver's settings, "
89 "connect manually and allow flash save and restart.")
94 bool forwardingCorrections)
97 case GPSInputProblem::None:
99 case GPSInputProblem::NoData:
101 return GPSReceiver::tr(
102 "No data from the receiver on %1. Check the device and that no other program is using it.")
104 case GPSInputProblem::NotGNSS:
105 return GPSReceiver::tr(
"Receiving data that isn't GNSS output. Check the device and baud rate.");
106 case GPSInputProblem::NoPositions:
107 switch (detected.value_or(GPSType::passive)) {
109 return GPSReceiver::tr(
110 "Receiving u-blox UBX data without position messages. Enable NAV-PVT or NMEA output.");
111 case GPSType::septentrio:
112 return GPSReceiver::tr(
113 "Receiving Septentrio SBF data without position messages. Enable PVTGeodetic or NMEA "
116 return GPSReceiver::tr(
"Receiving NMEA data without position messages. Enable GGA output.");
118 case GPSInputProblem::CorrectionsOnly:
120 return forwardingCorrections ? QString()
122 "Receiving RTCM corrections without position messages. Turn on "
123 "Forward receiver RTCM to send them to vehicles.");
131 return GPSReceiver::tr(
132 "The receiver produces more output than the connection carries, so data is being lost. Use a "
133 "higher baud rate or reduce the receiver's output.");
135 if (compactObservations) {
136 return GPSReceiver::tr(
137 "The receiver produces more output than the connection carries, so corrections are being lost. "
138 "Use a higher baud rate.");
141 return GPSReceiver::tr(
142 "The receiver produces more output than the connection carries, so corrections are being lost. "
143 "Use a higher baud rate or turn on Compact RTCM corrections (MSM4).");
149 case GPSFixQuality::NoFix:
150 return GPSReceiver::tr(
"No fix");
151 case GPSFixQuality::Fix2D:
152 return GPSReceiver::tr(
"2D");
153 case GPSFixQuality::Fix3D:
154 return GPSReceiver::tr(
"3D");
155 case GPSFixQuality::Differential:
156 return GPSReceiver::tr(
"DGPS");
157 case GPSFixQuality::RTKFloat:
158 return GPSReceiver::tr(
"Float",
"RTK float fix");
159 case GPSFixQuality::RTKFixed:
160 return GPSReceiver::tr(
"Fixed",
"RTK fixed fix");
161 case GPSFixQuality::Extrapolated:
162 return GPSReceiver::tr(
"DR",
"Dead reckoning (extrapolated) fix");
163 case GPSFixQuality::Unknown:
174 return status.
identifying ? GPSReceiver::tr(
"Identifying receiver...")
175 : GPSReceiver::tr(
"Connecting to receiver...");
177 return status.
reconnecting ? GPSReceiver::tr(
"Connecting automatically...") : QString();
180 return status.
forwardingCorrections ? GPSReceiver::tr(
"Passive receiver connected; forwarding its RTCM")
181 : GPSReceiver::tr(
"Passive receiver connected; position only");
183 if (status.
baseMode ==
static_cast<int>(Mode::BaseReceiverAveraging)) {
184 return GPSReceiver::tr(
"Receiver-managed averaging — no accuracy guarantee");
186 if (status.
baseMode ==
static_cast<int>(Mode::BaseFixed)) {
187 return GPSReceiver::tr(
"Fixed position");
189 return status.
surveyActive ? GPSReceiver::tr(
"Survey-In active") : GPSReceiver::tr(
"Receiver connected");
GPSReceiverSessionOutcome
What the policy does after a receiver session ends; the receiver words the message for it.
@ Unplugged
A discovered receiver was unplugged; discovery connects it again when it returns.
@ None
Nothing reconnects; the receiver's own message for the error applies.
@ AutoRetrying
A discovered receiver failed or was lost; discovery retries it.
@ WaitingForPort
The saved receiver was unplugged; it reconnects when its port returns.
@ Retrying
The saved receiver's connection was lost; a retry is scheduled.
QString gpsReceiverName(GPSType type)
The name of type's receiver family as shown to users; empty when no descriptor exists.
ReceiverRole
Persisted values of receiverRole. The storage type keeps any saved value a valid enum value.
GPSInputProblem
Why a receiver that stays connected while silent reports no position.
The wording of GPSReceiver's errors, warnings and labels, translated in the GPSReceiver context.
QString consentRefused(const QString &detail, GPSType family)
The error of an automatic connection that the family receiver refused for lack of flash-save consent.
QString outputOverflow(RTKSettings::ReceiverRole role, bool compactObservations)
The warning that the receiver produces more output than its connection carries.
QString fixLabel(GPSFixQuality fixType)
The short label of a fix type; empty for an unknown one.
QString receiverStatus(const ReceiverStatus &status)
The receiver status sentence; empty when no receiver is connected or being connected.
QString sessionEnded(GPSReceiverSessionOutcome outcome, GPSConnectionError error, const QString &detail, bool portRemoved)
QString inputProblem(GPSInputProblem problem, std::optional< GPSType > detected, const QString &endpoint, bool forwardingCorrections)
What the receiver status sentence describes.
bool configured
The receiver finished configuration.
bool forwardingCorrections
bool identifying
An Automatic connection that has not identified the receiver yet.
RTKSettings::ReceiverRole role