QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
APMAdvancedTuningCopterComponent.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Controls
3import QtQuick.Layouts
4
5import QGroundControl
6import QGroundControl.Controls
7import QGroundControl.FactControls
8
9SetupPage {
10 id: pidTuningPage
11 pageComponent: pidTuningComponent
12
13 Component {
14 id: pidTuningComponent
15
16 ColumnLayout {
17 width: availableWidth
18
19 FactPanelController { id: controller }
20
21 PIDTuning {
22 id: pidTuning
23 availableWidth: pidTuningPage.availableWidth
24 availableHeight: pidTuningPage.availableHeight - pidTuning.y
25
26 property var roll: QtObject {
27 property string name: qsTr("Roll")
28 property var plot: [
29 { name: "Response", value: globals.activeVehicle.rollRate.value },
30 { name: "Setpoint", value: globals.activeVehicle.setpoint.rollRate.value }
31 ]
32 property var params: ListModel {
33 ListElement {
34 title: qsTr("Roll axis angle controller P gain")
35 param: "ATC_ANG_RLL_P"
36 description: ""
37 min: 3
38 max: 12
39 step: 1
40 }
41 ListElement {
42 title: qsTr("Roll axis rate controller P gain")
43 param: "ATC_RAT_RLL_P"
44 description: ""
45 min: 0.001
46 max: 0.5
47 step: 0.025
48 }
49 ListElement {
50 title: qsTr("Roll axis rate controller I gain")
51 param: "ATC_RAT_RLL_I"
52 description: ""
53 min: 0.01
54 max: 2
55 step: 0.05
56 }
57 ListElement {
58 title: qsTr("Roll axis rate controller D gain")
59 param: "ATC_RAT_RLL_D"
60 description: ""
61 min: 0.0
62 max: 0.05
63 step: 0.001
64 }
65 }
66 }
67
68 property var pitch: QtObject {
69 property string name: qsTr("Pitch")
70 property var plot: [
71 { name: "Response", value: globals.activeVehicle.pitchRate.value },
72 { name: "Setpoint", value: globals.activeVehicle.setpoint.pitchRate.value }
73 ]
74 property var params: ListModel {
75 ListElement {
76 title: qsTr("Pitch axis angle controller P gain")
77 param: "ATC_ANG_PIT_P"
78 description: ""
79 min: 3
80 max: 12
81 step: 1
82 }
83 ListElement {
84 title: qsTr("Pitch axis rate controller P gain")
85 param: "ATC_RAT_PIT_P"
86 description: ""
87 min: 0.001
88 max: 0.5
89 step: 0.025
90 }
91 ListElement {
92 title: qsTr("Pitch axis rate controller I gain")
93 param: "ATC_RAT_PIT_I"
94 description: ""
95 min: 0.01
96 max: 2
97 step: 0.05
98 }
99 ListElement {
100 title: qsTr("Pitch axis rate controller D gain")
101 param: "ATC_RAT_PIT_D"
102 description: ""
103 min: 0.0
104 max: 0.05
105 step: 0.001
106 }
107 }
108 }
109
110 property var yaw: QtObject {
111 property string name: qsTr("Yaw")
112 property var plot: [
113 { name: "Response", value: globals.activeVehicle.yawRate.value },
114 { name: "Setpoint", value: globals.activeVehicle.setpoint.yawRate.value }
115 ]
116 property var params: ListModel {
117 ListElement {
118 title: qsTr("Yaw axis angle controller P gain")
119 param: "ATC_ANG_YAW_P"
120 description: ""
121 min: 3
122 max: 12
123 step: 1
124 }
125 ListElement {
126 title: qsTr("Yaw axis rate controller P gain")
127 param: "ATC_RAT_YAW_P"
128 description: ""
129 min: 0.1
130 max: 2.5
131 step: 0.05
132 }
133 ListElement {
134 title: qsTr("Yaw axis rate controller I gain")
135 param: "ATC_RAT_YAW_I"
136 description: ""
137 min: 0.01
138 max: 1
139 step: 0.05
140 }
141 }
142 }
143
144 title: "Rate"
145 tuningMode: Vehicle.ModeDisabled
146 unit: "deg/s"
147 axis: [ roll, pitch, yaw ]
148 chartDisplaySec: 3
149 }
150 }
151 }
152}