QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GcsPositionStatus.qml
Go to the documentation of this file.
1pragma ComponentBehavior: Bound
2
3import QtQuick
4import QtPositioning
5
6import QGroundControl
7import QGroundControl.Controls
8import QGroundControl.FactControls
9
10SettingsGroupLayout {
11 id: root
12 heading: qsTr("GCS Position")
13
14 /// Offer the source selector; read-only summaries show only the source in use.
15 property bool sourceEditable: true
16 property bool showCoordinates: true
17
18 property geoCoordinate gcsPosition: root._positionManager.gcsPosition
19 /// In meters; unknown when negative or not finite.
20 property real horizontalAccuracy: root._positionManager.gcsPositionHorizontalAccuracy
21
22 readonly property PositionManager _positionManager: QGroundControl.positionManager
23
24 LabelledFactComboBox {
25 objectName: "gcsPositionSource"
26 visible: root.sourceEditable
27 label: qsTr("Source")
28 fact: QGroundControl.settingsManager.rtkSettings.gcsPositionSource
29 }
30
31 LabelledLabel {
32 objectName: "gcsPositionSelectedSource"
33 label: qsTr("Using")
34 labelText: root._positionManager.selectedSourceName
35 }
36
37 LabelledLabel {
38 objectName: "gcsPositionSourceStatus"
39 label: qsTr("Status")
40 labelText: root._positionManager.sourceStatusText
41 }
42
43 LabelledLabel {
44 visible: root.showCoordinates && root.gcsPosition.isValid
45 label: qsTr("Latitude")
46 labelText: root.gcsPosition.latitude.toFixed(7)
47 }
48
49 LabelledLabel {
50 visible: root.showCoordinates && root.gcsPosition.isValid
51 label: qsTr("Longitude")
52 labelText: root.gcsPosition.longitude.toFixed(7)
53 }
54
55 LabelledLabel {
56 objectName: "gcsHorizontalAccuracy"
57 visible: root.showCoordinates && root.gcsPosition.isValid
58 && Number.isFinite(root.horizontalAccuracy) && root.horizontalAccuracy >= 0
59 label: qsTr("Horizontal accuracy")
60 labelText: QGroundControl.unitsConversion.metersToAppSettingsHorizontalDistanceUnitsString(root.horizontalAccuracy, 1)
61 }
62}