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.windowPanel
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 function _topLayerAltText() {
45 return QGroundControl.unitsConversion.metersToAppSettingsVerticalDistanceUnitsString(missionItem.topFlightAlt)
48 function _bottomLayerAltText() {
49 return QGroundControl.unitsConversion.metersToAppSettingsVerticalDistanceUnitsString(missionItem.bottomFlightAlt)
52 QGCPalette { id: qgcPal; colorGroupEnabled: true }
56 anchors.margins: _margin
57 anchors.top: parent.top
58 anchors.left: parent.left
59 anchors.right: parent.right
63 Layout.fillWidth: true
64 wrapMode: Text.WordWrap
65 horizontalAlignment: Text.AlignHCenter
66 text: qsTr("Use the Polygon Tools to create the polygon which outlines the structure.")
67 visible: !missionItem.structurePolygon.isValid || missionItem.wizardMode
71 Layout.fillWidth: true
72 contentSpacing: _margin
74 visible: !wizardLabel.visible
80 Layout.fillWidth: true
81 text: qsTr("Note: Polygon respresents structure surface not vehicle flight path.")
82 wrapMode: Text.WordWrap
83 font.pointSize: ScreenTools.smallFontPointSize
87 Layout.fillWidth: true
88 text: qsTr("WARNING: Photo interval is below minimum interval (%1 secs) supported by camera.").arg(_cameraMinTriggerInterval.toFixed(1))
89 wrapMode: Text.WordWrap
90 color: qgcPal.warningText
91 visible: missionItem.cameraShots > 0 && _cameraMinTriggerInterval !== 0 && _cameraMinTriggerInterval > missionItem.timeBetweenShots
95 Layout.fillWidth: true
96 cameraCalc: missionItem.cameraCalc
97 vehicleFlightIsFrontal: false
98 distanceToSurfaceLabel: qsTr("Scan Distance")
99 frontalDistanceLabel: qsTr("Layer Height")
100 sideDistanceLabel: qsTr("Trigger Distance")
105 Layout.fillWidth: true
110 Layout.fillWidth: true
112 visible: scanHeader.checked
115 Layout.fillWidth: true
116 columnSpacing: _margin
121 fact: missionItem.startFromTop
123 model: [ qsTr("Start Scan From Bottom"), qsTr("Start Scan From Top") ]
125 Layout.fillWidth: true
129 text: qsTr("Structure Height")
132 fact: missionItem.structureHeight
133 Layout.fillWidth: true
136 QGCLabel { text: qsTr("Scan Bottom Alt") }
137 AltitudeFactTextField {
138 fact: missionItem.scanBottomAlt
139 altitudeFrame: QGroundControl.AltitudeFrameRelative
140 Layout.fillWidth: true
143 QGCLabel { text: qsTr("Entrance/Exit Alt") }
144 AltitudeFactTextField {
145 fact: missionItem.entranceAlt
146 altitudeFrame: QGroundControl.AltitudeFrameRelative
147 Layout.fillWidth: true
151 text: qsTr("Gimbal Pitch")
152 visible: missionItem.cameraCalc.isManualCamera
155 fact: missionItem.gimbalPitch
156 Layout.fillWidth: true
157 visible: missionItem.cameraCalc.isManualCamera
162 height: ScreenTools.defaultFontPixelHeight / 2
167 text: qsTr("Rotate entry point")
168 onClicked: missionItem.rotateEntryPoint()
174 Layout.fillWidth: true
175 text: qsTr("Statistics")
180 columnSpacing: ScreenTools.defaultFontPixelWidth
181 visible: statsHeader.checked
183 QGCLabel { text: qsTr("Layers") }
184 QGCLabel { text: missionItem.layers.valueString }
186 QGCLabel { text: qsTr("Layer Height") }
187 QGCLabel { text: missionItem.cameraCalc.adjustedFootprintFrontal.valueString + " " + QGroundControl.unitsConversion.appSettingsHorizontalDistanceUnitsString }
189 QGCLabel { text: qsTr("Top Layer Alt") }
190 QGCLabel { id: topLayerAltLabel; text: _topLayerAltText() }
192 QGCLabel { text: qsTr("Bottom Layer Alt") }
193 QGCLabel { id: bottomLayerAltLabel; text: _bottomLayerAltText() }
195 QGCLabel { text: qsTr("Photo Count") }
196 QGCLabel { text: missionItem.cameraShots }
198 QGCLabel { text: qsTr("Photo Interval") }
199 QGCLabel { text: missionItem.timeBetweenShots.toFixed(1) + " " + qsTr("secs") }
201 QGCLabel { text: qsTr("Trigger Distance") }
202 QGCLabel { text: missionItem.cameraCalc.adjustedFootprintSide.valueString + " " + QGroundControl.unitsConversion.appSettingsHorizontalDistanceUnitsString }
207 title: qsTr("Camera")
210 Layout.fillWidth: true
211 cameraCalc: missionItem.cameraCalc
218 target: QGroundControl.unitsConversion
220 function onUnitsChanged() {
221 topLayerAltLabel.text = Qt.binding(_topLayerAltText)
222 bottomLayerAltLabel.text = Qt.binding(_bottomLayerAltText)