7import QGroundControl.FactControls
8import QGroundControl.Controls
12 pageComponent: pageComponent
13 pageDescription: qsTr("Analyze vibration associated with your vehicle.")
16 property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle ? QGroundControl.multiVehicleManager.activeVehicle : QGroundControl.multiVehicleManager.offlineEditingVehicle
17 property bool _available: !isNaN(_activeVehicle.vibration.xAxis.rawValue)
18 property real _margins: ScreenTools.defaultFontPixelWidth / 2
19 property real _barWidth: ScreenTools.defaultFontPixelWidth * 7
20 property real _barHeight: ScreenTools.defaultFontPixelHeight * 10
21 property real _xValue: _activeVehicle.vibration.xAxis.rawValue
22 property real _yValue: _activeVehicle.vibration.yAxis.rawValue
23 property real _zValue: _activeVehicle.vibration.zAxis.rawValue
25 readonly property real _barMinimum: 0.0
26 readonly property real _barMaximum: 90.0
27 readonly property real _barBadValue: 60.0
28 readonly property real _barMidValue: 30.0
30 QGCPalette { id:qgcPal; colorGroupEnabled: true }
36 width: childrenRect.width
37 height: childrenRect.height
41 spacing: ScreenTools.defaultFontPixelWidth * 2
48 Layout.alignment: Qt.AlignHCenter
51 border.color: qgcPal.text
54 anchors.bottom: parent.bottom
56 height: parent.height * (Math.min(_barMaximum, _xValue) / (_barMaximum - _barMinimum))
60 // Max vibe indication line at 60
62 anchors.topMargin: parent.height * (1.0 - ((_barBadValue - _barMinimum) / (_barMaximum - _barMinimum)))
63 anchors.top: parent.top
64 anchors.left: parent.left
65 anchors.right: parent.right
71 // Mid vibe indication line at 30
73 anchors.topMargin: parent.height * (1.0 - ((_barMidValue - _barMinimum) / (_barMaximum - _barMinimum)))
74 anchors.top: parent.top
75 anchors.left: parent.left
76 anchors.right: parent.right
84 Layout.alignment: Qt.AlignHCenter
85 text: qsTr("X (%1)").arg(_xValue.toFixed(0))
93 Layout.alignment: Qt.AlignHCenter
96 border.color: qgcPal.text
99 anchors.bottom: parent.bottom
101 height: parent.height * (Math.min(_barMaximum, _yValue) / (_barMaximum - _barMinimum))
105 // Max vibe indication line at 60
107 anchors.topMargin: parent.height * (1.0 - ((_barBadValue - _barMinimum) / (_barMaximum - _barMinimum)))
108 anchors.top: parent.top
109 anchors.left: parent.left
110 anchors.right: parent.right
116 // Mid vibe indication line at 30
118 anchors.topMargin: parent.height * (1.0 - ((_barMidValue - _barMinimum) / (_barMaximum - _barMinimum)))
119 anchors.top: parent.top
120 anchors.left: parent.left
121 anchors.right: parent.right
129 Layout.alignment: Qt.AlignHCenter
130 text: qsTr("Y (%1)").arg(_yValue.toFixed(0))
138 Layout.alignment: Qt.AlignHCenter
141 border.color: qgcPal.text
144 anchors.bottom: parent.bottom
146 height: parent.height * (Math.min(_barMaximum, _zValue) / (_barMaximum - _barMinimum))
150 // Max vibe indication line at 60
152 anchors.topMargin: parent.height * (1.0 - ((_barBadValue - _barMinimum) / (_barMaximum - _barMinimum)))
153 anchors.top: parent.top
154 anchors.left: parent.left
155 anchors.right: parent.right
161 // Mid vibe indication line at 30
163 anchors.topMargin: parent.height * (1.0 - ((_barMidValue - _barMinimum) / (_barMaximum - _barMinimum)))
164 anchors.top: parent.top
165 anchors.left: parent.left
166 anchors.right: parent.right
174 Layout.alignment: Qt.AlignHCenter
175 text: qsTr("Z (%1)").arg(_zValue.toFixed(0))
181 anchors.margins: ScreenTools.defaultFontPixelWidth
182 anchors.left: barRow.right
185 text: qsTr("Clip count")
189 text: qsTr("Accel 1: %1").arg(_activeVehicle.vibration.clipCount1.rawValue)
193 text: qsTr("Accel 2: %1").arg(_activeVehicle.vibration.clipCount2.rawValue)
197 text: qsTr("Accel 3: %1").arg(_activeVehicle.vibration.clipCount3.rawValue)
209 horizontalAlignment: Text.AlignHCenter
210 verticalAlignment: Text.AlignVCenter
211 text: qsTr("Not Available")