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 required property var missionItem
20 required property real availableWidth
22 property real _margin: ScreenTools.defaultFontPixelWidth / 2
23 property real _fieldWidth: ScreenTools.defaultFontPixelWidth * 10.5
24 property var _vehicle: QGroundControl.multiVehicleManager.activeVehicle ? QGroundControl.multiVehicleManager.activeVehicle : QGroundControl.multiVehicleManager.offlineEditingVehicle
25 property real _cameraMinTriggerInterval: missionItem.cameraCalc.minTriggerInterval.rawValue
27 function polygonCaptureStarted() {
28 missionItem.clearPolygon()
31 function polygonCaptureFinished(coordinates) {
32 for (var i=0; i<coordinates.length; i++) {
33 missionItem.addPolygonCoordinate(coordinates[i])
37 function polygonAdjustVertex(vertexIndex, vertexCoordinate) {
38 missionItem.adjustPolygonCoordinate(vertexIndex, vertexCoordinate)
41 function polygonAdjustStarted() { }
42 function polygonAdjustFinished() { }
44 QGCPalette { id: qgcPal; colorGroupEnabled: true }
48 anchors.margins: _margin
49 anchors.top: parent.top
50 anchors.left: parent.left
51 anchors.right: parent.right
55 Layout.fillWidth: true
56 wrapMode: Text.WordWrap
57 horizontalAlignment: Text.AlignHCenter
58 text: qsTr("Use the Polygon Tools to create the polygon which outlines the structure.")
59 visible: !missionItem.structurePolygon.isValid || missionItem.wizardMode
63 Layout.fillWidth: true
65 visible: !wizardLabel.visible
69 Layout.fillWidth: true
71 Component.onCompleted: currentIndex = 0
73 QGCTabButton { text: qsTr("Grid") }
74 QGCTabButton { text: qsTr("Camera") }
78 Layout.fillWidth: true
80 visible: tabBar.currentIndex == 0
83 Layout.fillWidth: true
84 text: qsTr("Note: Polygon respresents structure surface not vehicle flight path.")
85 wrapMode: Text.WordWrap
86 font.pointSize: ScreenTools.smallFontPointSize
90 Layout.fillWidth: true
91 text: qsTr("WARNING: Photo interval is below minimum interval (%1 secs) supported by camera.").arg(_cameraMinTriggerInterval.toFixed(1))
92 wrapMode: Text.WordWrap
93 color: qgcPal.warningText
94 visible: missionItem.cameraShots > 0 && _cameraMinTriggerInterval !== 0 && _cameraMinTriggerInterval > missionItem.timeBetweenShots
98 Layout.fillWidth: true
99 cameraCalc: missionItem.cameraCalc
100 vehicleFlightIsFrontal: false
101 distanceToSurfaceLabel: qsTr("Scan Distance")
102 frontalDistanceLabel: qsTr("Layer Height")
103 sideDistanceLabel: qsTr("Trigger Distance")
108 Layout.fillWidth: true
113 Layout.fillWidth: true
115 visible: scanHeader.checked
118 Layout.fillWidth: true
119 columnSpacing: _margin
124 fact: missionItem.startFromTop
126 model: [ qsTr("Start Scan From Bottom"), qsTr("Start Scan From Top") ]
128 Layout.fillWidth: true
132 text: qsTr("Structure Height")
135 fact: missionItem.structureHeight
136 Layout.fillWidth: true
139 QGCLabel { text: qsTr("Scan Bottom Alt") }
140 AltitudeFactTextField {
141 fact: missionItem.scanBottomAlt
142 altitudeFrame: QGroundControl.AltitudeFrameRelative
143 Layout.fillWidth: true
146 QGCLabel { text: qsTr("Entrance/Exit Alt") }
147 AltitudeFactTextField {
148 fact: missionItem.entranceAlt
149 altitudeFrame: QGroundControl.AltitudeFrameRelative
150 Layout.fillWidth: true
154 text: qsTr("Gimbal Pitch")
155 visible: missionItem.cameraCalc.isManualCamera
158 fact: missionItem.gimbalPitch
159 Layout.fillWidth: true
160 visible: missionItem.cameraCalc.isManualCamera
165 height: ScreenTools.defaultFontPixelHeight / 2
170 text: qsTr("Rotate entry point")
171 onClicked: missionItem.rotateEntryPoint()
177 Layout.fillWidth: true
178 text: qsTr("Statistics")
183 columnSpacing: ScreenTools.defaultFontPixelWidth
184 visible: statsHeader.checked
186 QGCLabel { text: qsTr("Layers") }
187 QGCLabel { text: missionItem.layers.valueString }
189 QGCLabel { text: qsTr("Layer Height") }
190 QGCLabel { text: missionItem.cameraCalc.adjustedFootprintFrontal.valueString + " " + QGroundControl.unitsConversion.appSettingsHorizontalDistanceUnitsString }
192 QGCLabel { text: qsTr("Top Layer Alt") }
193 QGCLabel { text: QGroundControl.unitsConversion.metersToAppSettingsVerticalDistanceUnits(missionItem.topFlightAlt).toFixed(1) + " " + QGroundControl.unitsConversion.appSettingsHorizontalDistanceUnitsString }
195 QGCLabel { text: qsTr("Bottom Layer Alt") }
196 QGCLabel { text: QGroundControl.unitsConversion.metersToAppSettingsVerticalDistanceUnits(missionItem.bottomFlightAlt).toFixed(1) + " " + QGroundControl.unitsConversion.appSettingsHorizontalDistanceUnitsString }
198 QGCLabel { text: qsTr("Photo Count") }
199 QGCLabel { text: missionItem.cameraShots }
201 QGCLabel { text: qsTr("Photo Interval") }
202 QGCLabel { text: missionItem.timeBetweenShots.toFixed(1) + " " + qsTr("secs") }
204 QGCLabel { text: qsTr("Trigger Distance") }
205 QGCLabel { text: missionItem.cameraCalc.adjustedFootprintSide.valueString + " " + QGroundControl.unitsConversion.appSettingsHorizontalDistanceUnitsString }
210 Layout.fillWidth: true
212 visible: tabBar.currentIndex == 1
215 Layout.fillWidth: true
216 cameraCalc: missionItem.cameraCalc