QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
PX4TuningComponentSpacecraftRate.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
9ColumnLayout {
10 property real _availableHeight: availableHeight
11 property real _availableWidth: availableWidth
12 property Fact _airmode: controller.getParameterFact(-1, "MC_AIRMODE", false)
13 property Fact _thrustModelFactor: controller.getParameterFact(-1, "THR_MDL_FAC", false)
14
15 PIDTuning {
16 id: pidTuning
17 availableWidth: _availableWidth
18 availableHeight: _availableHeight - pidTuning.y
19 title: qsTr("Rate")
20 tuningMode: Vehicle.ModeRateAndAttitude
21 unit: qsTr("deg/s")
22 axis: [ roll, pitch, yaw ]
23 chartDisplaySec: 3
24 showAutoModeChange: false
25 showAutoTuning: false
26
27 property var roll: QtObject {
28 property string name: qsTr("Roll")
29 property var plot: [
30 { name: "Response", value: globals.activeVehicle.rollRate.value },
31 { name: "Setpoint", value: globals.activeVehicle.setpoint.rollRate.value }
32 ]
33 property var params: ListModel {
34 ListElement {
35 title: qsTr("Overall Multiplier (SC_ROLLRATE_K)")
36 description: qsTr("Multiplier for P, I and D gains: increase for more responsiveness, reduce if the rates overshoot (and increasing D does not help).")
37 param: "SC_ROLLRATE_K"
38 min: 0.0
39 max: 10.0
40 step: 0.005
41 }
42 ListElement {
43 title: qsTr("Differential Gain (SC_ROLLRATE_D)")
44 description: qsTr("Damping: increase to reduce overshoots and oscillations, but not higher than really needed.")
45 param: "SC_ROLLRATE_D"
46 min: 0.0000
47 max: 10.0
48 step: 0.005
49 }
50 ListElement {
51 title: qsTr("Integral Gain (SC_ROLLRATE_I)")
52 description: qsTr("Generally does not need much adjustment, reduce this when seeing slow oscillations.")
53 param: "SC_ROLLRATE_I"
54 min: 0.0
55 max: 10.0
56 step: 0.005
57 }
58 }
59 }
60 property var pitch: QtObject {
61 property string name: qsTr("Pitch")
62 property var plot: [
63 { name: "Response", value: globals.activeVehicle.pitchRate.value },
64 { name: "Setpoint", value: globals.activeVehicle.setpoint.pitchRate.value }
65 ]
66 property var params: ListModel {
67 ListElement {
68 title: qsTr("Overall Multiplier (SC_PITCHRATE_K)")
69 description: qsTr("Multiplier for P, I and D gains: increase for more responsiveness, reduce if the rates overshoot (and increasing D does not help).")
70 param: "SC_PITCHRATE_K"
71 min: 0.0
72 max: 10.0
73 step: 0.005
74 }
75 ListElement {
76 title: qsTr("Differential Gain (SC_PITCHRATE_D)")
77 description: qsTr("Damping: increase to reduce overshoots and oscillations, but not higher than really needed.")
78 param: "SC_PITCHRATE_D"
79 min: 0.0
80 max: 10.0
81 step: 0.005
82 }
83 ListElement {
84 title: qsTr("Integral Gain (SC_PITCHRATE_I)")
85 description: qsTr("Generally does not need much adjustment, reduce this when seeing slow oscillations.")
86 param: "SC_PITCHRATE_I"
87 min: 0.0
88 max: 10.0
89 step: 0.005
90 }
91 }
92 }
93 property var yaw: QtObject {
94 property string name: qsTr("Yaw")
95 property var plot: [
96 { name: "Response", value: globals.activeVehicle.yawRate.value },
97 { name: "Setpoint", value: globals.activeVehicle.setpoint.yawRate.value }
98 ]
99 property var params: ListModel {
100 ListElement {
101 title: qsTr("Overall Multiplier (SC_YAWRATE_K)")
102 description: qsTr("Multiplier for P, I and D gains: increase for more responsiveness, reduce if the rates overshoot (and increasing D does not help).")
103 param: "SC_YAWRATE_K"
104 min: 0.0
105 max: 10.0
106 step: 0.005
107 }
108 ListElement {
109 title: qsTr("Derivative Gain (SC_YAWRATE_D)")
110 description: qsTr("Damping: increase to reduce overshoots and oscillations, but not higher than really needed.")
111 param: "SC_YAWRATE_D"
112 min: 0.0
113 max: 10.0
114 step: 0.005
115 }
116 ListElement {
117 title: qsTr("Integral Gain (SC_YAWRATE_I)")
118 description: qsTr("Generally does not need much adjustment, reduce this when seeing slow oscillations.")
119 param: "SC_YAWRATE_I"
120 min: 0.0
121 max: 10.0
122 step: 0.005
123 }
124 ListElement {
125 title: qsTr("Integral Limit (SC_YR_INT_LIM)")
126 description: qsTr("Increase if the robot still has a steady-state error at maximum integral gain.")
127 param: "SC_YR_INT_LIM"
128 min: 0.0
129 max: 5.0
130 step: 0.005
131 }
132 }
133 }
134 }
135}