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.y.value },
38 { name: "Setpoint", value: globals.activeVehicle.localPositionSetpoint.y.value }
40 property var params: ListModel {
42 title: qsTr("Proportional gain (MPC_XY_P)")
43 description: qsTr("Increase for more responsiveness, reduce if the position overshoots (there is only a setpoint when hovering, i.e. when centering the stick).")
51 property var vertical: QtObject {
52 property string name: qsTr("Vertical")
54 { name: "Response", value: globals.activeVehicle.localPosition.z.value },
55 { name: "Setpoint", value: globals.activeVehicle.localPositionSetpoint.z.value }
57 property var params: ListModel {
59 title: qsTr("Proportional gain (MPC_Z_P)")
60 description: qsTr("Increase for more responsiveness, reduce if the position overshoots (there is only a setpoint when hovering, i.e. when centering the stick).")
69 tuningMode: Vehicle.ModeVelocityAndPosition
71 axis: [ horizontal, vertical ]