6import QGroundControl.Controls
7import QGroundControl.FactControls
10 property real _availableHeight: availableHeight
11 property real _availableWidth: availableWidth
12 property Fact _mcPosMode: controller.getParameterFact(-1, "MPC_POS_MODE", false)
18 text: qsTr("Position control mode (set this to 'simple' during tuning):")
30 availableWidth: _availableWidth
31 availableHeight: _availableHeight - pidTuning.y
33 property var horizontal: QtObject {
34 property string name: qsTr("Horizontal")
35 property string plotTitle: qsTr("Horizontal (Y direction, sidewards)")
37 { name: "Response", value: globals.activeVehicle.localPosition.vy.value },
38 { name: "Setpoint", value: globals.activeVehicle.localPositionSetpoint.vy.value }
40 property var params: ListModel {
42 title: qsTr("Proportional gain (MPC_XY_VEL_P_ACC)")
43 description: qsTr("Increase for more responsiveness, reduce if the velocity overshoots (and increasing D does not help).")
44 param: "MPC_XY_VEL_P_ACC"
50 title: qsTr("Integral gain (MPC_XY_VEL_I_ACC)")
51 description: qsTr("Increase to reduce steady-state error (e.g. wind)")
52 param: "MPC_XY_VEL_I_ACC"
58 title: qsTr("Differential gain (MPC_XY_VEL_D_ACC)")
59 description: qsTr("Damping: increase to reduce overshoots and oscillations, but not higher than really needed.")
60 param: "MPC_XY_VEL_D_ACC"
67 property var vertical: QtObject {
68 property string name: qsTr("Vertical")
70 { name: "Response", value: globals.activeVehicle.localPosition.vz.value },
71 { name: "Setpoint", value: globals.activeVehicle.localPositionSetpoint.vz.value }
73 property var params: ListModel {
75 title: qsTr("Proportional gain (MPC_Z_VEL_P_ACC)")
76 description: qsTr("Increase for more responsiveness, reduce if the velocity overshoots (and increasing D does not help).")
77 param: "MPC_Z_VEL_P_ACC"
83 title: qsTr("Integral gain (MPC_Z_VEL_I_ACC)")
84 description: qsTr("Increase to reduce steady-state error")
85 param: "MPC_Z_VEL_I_ACC"
91 title: qsTr("Differential gain (MPC_Z_VEL_D_ACC)")
92 description: qsTr("Damping: increase to reduce overshoots and oscillations, but not higher than really needed.")
93 param: "MPC_Z_VEL_D_ACC"
101 tuningMode: Vehicle.ModeVelocityAndPosition
103 axis: [ horizontal, vertical ]