1pragma ComponentBehavior: Bound
6import QGroundControl.Controls
7import QGroundControl.GPS
9/// The correction stream vehicles receive, shared by the GPS indicator and the RTK Corrections settings page.
13 property GPSCorrectionManager corrections: QGroundControl.gpsManager.corrections
14 /// Keep the group visible while no correction source is configured.
15 property bool showWhenInactive: true
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
23 heading: qsTr("Corrections Status")
24 visible: root.showWhenInactive || root._active || root._udpInputError !== "" || root._udpOutputError !== ""
27 objectName: "correctionsSelectedSource"
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")
34 // Stream endpoints can be long URLs, so they wrap anywhere.
36 objectName: "correctionsSelectedStream"
37 visible: root._fresh && root._selected.instanceId.length > 0
38 text: root._selected.instanceId
39 wrapMode: Text.WrapAnywhere
43 objectName: "correctionsDataRate"
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))
50 // Why the UDP RTCM input cannot listen, such as a port another program uses; the input keeps retrying.
52 objectName: "correctionsUdpInputError"
53 visible: root._udpInputError !== ""
54 text: root._udpInputError
58 // Why the enabled UDP output forwards nothing, such as an invalid address or a loop into the UDP input.
60 objectName: "correctionsUdpOutputError"
61 visible: root._udpOutputError !== ""
62 text: root._udpOutputError