7import QGroundControl.Controls
8import QGroundControl.FactControls
9import QGroundControl.FlightMap
11// Editor for Survery mission items
14 height: visible ? (editorColumn.height + (_margin * 2)) : 0
16 color: qgcPal.windowShadeDark
19 // The following properties must be available up the hierarchy chain
20 //property real availableWidth ///< Width for control
21 //property var missionItem ///< Mission Item for editor
23 property real _margin: ScreenTools.defaultFontPixelWidth / 2
24 property real _fieldWidth: ScreenTools.defaultFontPixelWidth * 10.5
25 property var _vehicle: QGroundControl.multiVehicleManager.activeVehicle ? QGroundControl.multiVehicleManager.activeVehicle : QGroundControl.multiVehicleManager.offlineEditingVehicle
26 property real _cameraMinTriggerInterval: missionItem.cameraCalc.minTriggerInterval.rawValue
28 function polygonCaptureStarted() {
29 missionItem.clearPolygon()
32 function polygonCaptureFinished(coordinates) {
33 for (var i=0; i<coordinates.length; i++) {
34 missionItem.addPolygonCoordinate(coordinates[i])
38 function polygonAdjustVertex(vertexIndex, vertexCoordinate) {
39 missionItem.adjustPolygonCoordinate(vertexIndex, vertexCoordinate)
42 function polygonAdjustStarted() { }
43 function polygonAdjustFinished() { }
45 QGCPalette { id: qgcPal; colorGroupEnabled: true }
49 anchors.margins: _margin
50 anchors.top: parent.top
51 anchors.left: parent.left
52 anchors.right: parent.right
56 Layout.fillWidth: true
57 wrapMode: Text.WordWrap
58 horizontalAlignment: Text.AlignHCenter
59 text: qsTr("Use the Polygon Tools to create the polygon which outlines the structure.")
60 visible: !missionItem.structurePolygon.isValid || missionItem.wizardMode
64 Layout.fillWidth: true
66 visible: !wizardLabel.visible
70 Layout.fillWidth: true
72 Component.onCompleted: currentIndex = 0
74 QGCTabButton { text: qsTr("Grid") }
75 QGCTabButton { text: qsTr("Camera") }
79 Layout.fillWidth: true
81 visible: tabBar.currentIndex == 0
84 Layout.fillWidth: true
85 text: qsTr("Note: Polygon respresents structure surface not vehicle flight path.")
86 wrapMode: Text.WordWrap
87 font.pointSize: ScreenTools.smallFontPointSize
91 Layout.fillWidth: true
92 text: qsTr("WARNING: Photo interval is below minimum interval (%1 secs) supported by camera.").arg(_cameraMinTriggerInterval.toFixed(1))
93 wrapMode: Text.WordWrap
94 color: qgcPal.warningText
95 visible: missionItem.cameraShots > 0 && _cameraMinTriggerInterval !== 0 && _cameraMinTriggerInterval > missionItem.timeBetweenShots
99 Layout.fillWidth: true
100 cameraCalc: missionItem.cameraCalc
101 vehicleFlightIsFrontal: false
102 distanceToSurfaceLabel: qsTr("Scan Distance")
103 frontalDistanceLabel: qsTr("Layer Height")
104 sideDistanceLabel: qsTr("Trigger Distance")
109 Layout.fillWidth: true
114 Layout.fillWidth: true
116 visible: scanHeader.checked
119 Layout.fillWidth: true
120 columnSpacing: _margin
125 fact: missionItem.startFromTop
127 model: [ qsTr("Start Scan From Bottom"), qsTr("Start Scan From Top") ]
129 Layout.fillWidth: true
133 text: qsTr("Structure Height")
136 fact: missionItem.structureHeight
137 Layout.fillWidth: true
140 QGCLabel { text: qsTr("Scan Bottom Alt") }
141 AltitudeFactTextField {
142 fact: missionItem.scanBottomAlt
143 altitudeMode: QGroundControl.AltitudeModeRelative
144 Layout.fillWidth: true
147 QGCLabel { text: qsTr("Entrance/Exit Alt") }
148 AltitudeFactTextField {
149 fact: missionItem.entranceAlt
150 altitudeMode: QGroundControl.AltitudeModeRelative
151 Layout.fillWidth: true
155 text: qsTr("Gimbal Pitch")
156 visible: missionItem.cameraCalc.isManualCamera
159 fact: missionItem.gimbalPitch
160 Layout.fillWidth: true
161 visible: missionItem.cameraCalc.isManualCamera
166 height: ScreenTools.defaultFontPixelHeight / 2
171 text: qsTr("Rotate entry point")
172 onClicked: missionItem.rotateEntryPoint()
178 Layout.fillWidth: true
179 text: qsTr("Statistics")
184 columnSpacing: ScreenTools.defaultFontPixelWidth
185 visible: statsHeader.checked
187 QGCLabel { text: qsTr("Layers") }
188 QGCLabel { text: missionItem.layers.valueString }
190 QGCLabel { text: qsTr("Layer Height") }
191 QGCLabel { text: missionItem.cameraCalc.adjustedFootprintFrontal.valueString + " " + QGroundControl.unitsConversion.appSettingsHorizontalDistanceUnitsString }
193 QGCLabel { text: qsTr("Top Layer Alt") }
194 QGCLabel { text: QGroundControl.unitsConversion.metersToAppSettingsVerticalDistanceUnits(missionItem.topFlightAlt).toFixed(1) + " " + QGroundControl.unitsConversion.appSettingsHorizontalDistanceUnitsString }
196 QGCLabel { text: qsTr("Bottom Layer Alt") }
197 QGCLabel { text: QGroundControl.unitsConversion.metersToAppSettingsVerticalDistanceUnits(missionItem.bottomFlightAlt).toFixed(1) + " " + QGroundControl.unitsConversion.appSettingsHorizontalDistanceUnitsString }
199 QGCLabel { text: qsTr("Photo Count") }
200 QGCLabel { text: missionItem.cameraShots }
202 QGCLabel { text: qsTr("Photo Interval") }
203 QGCLabel { text: missionItem.timeBetweenShots.toFixed(1) + " " + qsTr("secs") }
205 QGCLabel { text: qsTr("Trigger Distance") }
206 QGCLabel { text: missionItem.cameraCalc.adjustedFootprintSide.valueString + " " + QGroundControl.unitsConversion.appSettingsHorizontalDistanceUnitsString }
211 Layout.fillWidth: true
213 visible: tabBar.currentIndex == 1
216 Layout.fillWidth: true
217 cameraCalc: missionItem.cameraCalc