6import QGroundControl.Controls
10 pageComponent: pageComponent
12 property real _margins: ScreenTools.defaultFontPixelHeight
22 property Fact _sys_vehicle_resp: controller.getParameterFact(-1, "SYS_VEHICLE_RESP", false)
23 property Fact _mpc_xy_vel_all: controller.getParameterFact(-1, "MPC_XY_VEL_ALL", false)
24 property Fact _mpc_z_vel_all: controller.getParameterFact(-1, "MPC_Z_VEL_ALL", false)
30 width: Math.max(availableWidth, ScreenTools.defaultFontPixelWidth * 40)
34 Layout.fillWidth: true
35 visible: _sys_vehicle_resp
38 Layout.fillWidth: true
39 enabled: responsivenessCheckbox.checked
40 heading: qsTr("Responsiveness")
41 headingDescription: qsTr("A higher value makes the vehicle react faster. Be aware that this affects braking as well, and a combination of slow responsiveness with high maximum velocity will lead to long braking distances.")
43 // It's a bit tricky to handle the fact that the parameter goes negative to signal disabled.
44 // We can't allow the slider to go negative, hence all the hoops to jump through with value and loadComplete.
46 Layout.fillWidth: true
49 majorTickStepSize: 0.01
50 value: { value = _sys_vehicle_resp ? Math.abs(_sys_vehicle_resp.value) : (from + to) / 2 }
51 decimalPlaces: _sys_vehicle_resp ? _sys_vehicle_resp.decimalPlaces : 0
53 property bool loadComplete: false
55 Component.onCompleted: loadComplete = true
58 if (loadComplete && enabled) {
59 _sys_vehicle_resp.value = value
66 id: responsivenessCheckbox
67 Layout.fillWidth: true
68 text: qsTr("Enable responsiveness slider (if enabled, acceleration limit parameters and others are automatically set)")
69 checked: _sys_vehicle_resp && _sys_vehicle_resp.value >= 0
70 onClicked: _sys_vehicle_resp.value = checked ? Math.abs(_sys_vehicle_resp.value) : -Math.abs(_sys_vehicle_resp.value)
74 Layout.fillWidth: true
75 visible: _sys_vehicle_resp && _sys_vehicle_resp.value > 0.8
76 color: qgcPal.warningText
77 text: qsTr("Warning: a high responsiveness requires a vehicle with large thrust-to-weight ratio. The vehicle might lose altitude otherwise.")
82 Layout.fillWidth: true
83 visible: _mpc_xy_vel_all
86 Layout.fillWidth: true
87 enabled: xyVelCheckbox.checked
88 heading: qsTr("Horizontal velocity (m/s)")
89 headingDescription: qsTr("Limit the horizonal velocity (applies to all modes).")
91 // It's a bit tricky to handle the fact that the parameter goes negative to signal disabled.
92 // We can't allow the slider to go negative, hence all the hoops to jump through with value and loadComplete.
94 Layout.fillWidth: true
97 majorTickStepSize: 0.6
98 value: { value = _mpc_xy_vel_all ? Math.abs(_mpc_xy_vel_all.value) : (from + to) / 2 }
99 decimalPlaces: _mpc_xy_vel_all ? _mpc_xy_vel_all.decimalPlaces : 0
101 property bool loadComplete: false
103 Component.onCompleted: loadComplete = true
106 if (loadComplete && enabled) {
107 _mpc_xy_vel_all.value = value
115 Layout.fillWidth: true
116 text: qsTr("Enable horizontal velocity slider (if enabled, individual velocity limit parameters are automatically set)")
117 checked: _mpc_xy_vel_all ? (_mpc_xy_vel_all.value >= 0) : false
118 onClicked: mpc_xy_vel_all.value = checked ? Math.abs(_mpc_xy_vel_all.value) : -Math.abs(_mpc_xy_vel_all.value)
123 Layout.fillWidth: true
124 visible: _mpc_z_vel_all
126 SettingsGroupLayout {
127 Layout.fillWidth: true
128 enabled: zVelCheckbox.checked
129 heading: qsTr("Vertical velocity (m/s)")
130 headingDescription: qsTr("Limit the vertical velocity (applies to all modes).")
132 // It's a bit tricky to handle the fact that the parameter goes negative to signal disabled.
133 // We can't allow the slider to go negative, hence all the hoops to jump through with value and loadComplete.
135 Layout.fillWidth: true
138 majorTickStepSize: 0.2
139 value: { value = _mpc_z_vel_all ? Math.abs(_mpc_z_vel_all.value) : (from + to) / 2 }
140 decimalPlaces: _mpc_z_vel_all ? _mpc_z_vel_all.decimalPlaces : 0
142 property bool loadComplete: false
144 Component.onCompleted: loadComplete = true
147 if (loadComplete && enabled) {
148 _mpc_z_vel_all.value = value
156 Layout.fillWidth: true
157 text: qsTr("Enable vertical velocity slider (if enabled, individual velocity limit parameters are automatically set)")
158 checked: _mpc_z_vel_all && _mpc_z_vel_all.value >= 0
159 onClicked: mpc_z_vel_all.value = checked ? Math.abs(_mpc_z_vel_all.value) : -Math.abs(_mpc_z_vel_all.value)
163 SettingsGroupLayout {
164 Layout.fillWidth: true
165 heading: qsTr("Mission Turning Radius")
166 headingDescription: qsTr("Increasing this leads to rounder turns in missions (corner cutting). Use the minimum value for accurate corner tracking.")
169 Layout.fillWidth: true
170 from: QGroundControl.unitsConversion.metersToAppSettingsHorizontalDistanceUnits(2)
171 to: QGroundControl.unitsConversion.metersToAppSettingsHorizontalDistanceUnits(16)
172 majorTickStepSize: 0.5
173 fact: controller.getParameterFact(-1, "NAV_ACC_RAD")