QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
CorrectionsStatus.qml
Go to the documentation of this file.
1pragma ComponentBehavior: Bound
2
3import QtQuick
4
5import QGroundControl
6import QGroundControl.Controls
7import QGroundControl.GPS
8
9/// The correction stream vehicles receive, shared by the GPS indicator and the RTK Corrections settings page.
10SettingsGroupLayout {
11 id: root
12
13 property GPSCorrectionManager corrections: QGroundControl.gpsManager.corrections
14 /// Keep the group visible while no correction source is configured.
15 property bool showWhenInactive: true
16
17 readonly property gpsCorrectionStream _selected: root.corrections.selectedStream
18 readonly property bool _active: root.corrections.state !== GPSCorrectionManager.Inactive
19 readonly property bool _fresh: root.corrections.state === GPSCorrectionManager.Fresh
20 readonly property string _udpInputError: root.corrections.udpInputError
21 readonly property string _udpOutputError: root.corrections.udpOutputError
22
23 heading: qsTr("Corrections Status")
24 visible: root.showWhenInactive || root._active || root._udpInputError !== "" || root._udpOutputError !== ""
25
26 LabelledLabel {
27 objectName: "correctionsSelectedSource"
28 label: qsTr("Source")
29 labelText: root._fresh ? root.corrections.sourceName(root._selected.source)
30 //: No fresh correction stream is available yet
31 : root._active ? qsTr("Waiting") : qsTr("None")
32 }
33
34 // Stream endpoints can be long URLs, so they wrap anywhere.
35 GPSNoteLabel {
36 objectName: "correctionsSelectedStream"
37 visible: root._fresh && root._selected.instanceId.length > 0
38 text: root._selected.instanceId
39 wrapMode: Text.WrapAnywhere
40 }
41
42 LabelledLabel {
43 objectName: "correctionsDataRate"
44 visible: root._fresh
45 label: qsTr("Data rate")
46 //: %1 is a data size, such as 2.1KB; the label is a data rate per second
47 labelText: qsTr("%1/s").arg(QGroundControl.bigSizeToString(root.corrections.selectedBytesPerSecond))
48 }
49
50 // Why the UDP RTCM input cannot listen, such as a port another program uses; the input keeps retrying.
51 GPSNoteLabel {
52 objectName: "correctionsUdpInputError"
53 visible: root._udpInputError !== ""
54 text: root._udpInputError
55 warning: true
56 }
57
58 // Why the enabled UDP output forwards nothing, such as an invalid address or a loop into the UDP input.
59 GPSNoteLabel {
60 objectName: "correctionsUdpOutputError"
61 visible: root._udpOutputError !== ""
62 text: root._udpOutputError
63 warning: true
64 }
65}