|
|
|
@ -22,8 +22,9 @@ Rectangle {
@@ -22,8 +22,9 @@ Rectangle {
|
|
|
|
|
//property real availableWidth ///< Width for control |
|
|
|
|
//property var missionItem ///< Mission Item for editor |
|
|
|
|
|
|
|
|
|
property real _margin: ScreenTools.defaultFontPixelWidth / 2 |
|
|
|
|
property real _margin: ScreenTools.defaultFontPixelWidth * 0.25 |
|
|
|
|
property int _cameraIndex: 1 |
|
|
|
|
property real _fieldWidth: ScreenTools.defaultFontPixelWidth * 10.5 |
|
|
|
|
|
|
|
|
|
readonly property int _gridTypeManual: 0 |
|
|
|
|
readonly property int _gridTypeCustomCamera: 1 |
|
|
|
@ -47,6 +48,14 @@ Rectangle {
@@ -47,6 +48,14 @@ Rectangle {
|
|
|
|
|
text: qsTr("Custom Camera Grid") |
|
|
|
|
} |
|
|
|
|
ListElement { |
|
|
|
|
text: qsTr("Typhoon H CGO3+") |
|
|
|
|
sensorWidth: 6.264 |
|
|
|
|
sensorHeight: 4.698 |
|
|
|
|
imageWidth: 4000 |
|
|
|
|
imageHeight: 3000 |
|
|
|
|
focalLength: 14 |
|
|
|
|
} |
|
|
|
|
ListElement { |
|
|
|
|
text: qsTr("Sony ILCE-QX1") //http://www.sony.co.uk/electronics/interchangeable-lens-cameras/ilce-qx1-body-kit/specifications |
|
|
|
|
sensorWidth: 23.2 //http://www.sony.com/electronics/camera-lenses/sel16f28/specifications |
|
|
|
|
sensorHeight: 15.4 |
|
|
|
@ -238,25 +247,6 @@ Rectangle {
@@ -238,25 +247,6 @@ Rectangle {
|
|
|
|
|
anchors.right: parent.right |
|
|
|
|
spacing: _margin |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
wrapMode: Text.WordWrap |
|
|
|
|
font.pointSize: ScreenTools.smallFontPointSize |
|
|
|
|
text: gridTypeCombo.currentIndex == 0 ? |
|
|
|
|
qsTr("Create a flight path which covers a polygonal area by specifying all grid parameters.") : |
|
|
|
|
qsTr("Create a flight path which fully covers a polygonal area using camera specifications.") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { text: qsTr("Camera:") } |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
height: 1 |
|
|
|
|
color: qgcPal.text |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCComboBox { |
|
|
|
|
id: gridTypeCombo |
|
|
|
|
anchors.left: parent.left |
|
|
|
@ -296,6 +286,16 @@ Rectangle {
@@ -296,6 +286,16 @@ Rectangle {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { text: qsTr("Camera"); color: qgcPal.buttonHighlight; visible: gridTypeCombo.currentIndex !== _gridTypeManual} |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
height: 1 |
|
|
|
|
color: qgcPal.text |
|
|
|
|
visible: gridTypeCombo.currentIndex !== _gridTypeManual |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Camera based grid ui |
|
|
|
|
Column { |
|
|
|
|
anchors.left: parent.left |
|
|
|
@ -305,6 +305,7 @@ Rectangle {
@@ -305,6 +305,7 @@ Rectangle {
|
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
spacing: _margin |
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
|
|
|
|
|
QGCRadioButton { |
|
|
|
|
id: cameraOrientationLandscape |
|
|
|
@ -322,82 +323,104 @@ Rectangle {
@@ -322,82 +323,104 @@ Rectangle {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Column { |
|
|
|
|
id: custCameraCol |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
spacing: _margin |
|
|
|
|
visible: gridTypeCombo.currentIndex == _gridTypeCustomCamera |
|
|
|
|
|
|
|
|
|
GridLayout { |
|
|
|
|
columns: 3 |
|
|
|
|
columnSpacing: _margin |
|
|
|
|
rowSpacing: _margin |
|
|
|
|
|
|
|
|
|
property real _fieldWidth: ScreenTools.defaultFontPixelWidth * 10 |
|
|
|
|
visible: gridTypeCombo.currentIndex === _gridTypeCustomCamera |
|
|
|
|
|
|
|
|
|
QGCLabel { } |
|
|
|
|
QGCLabel { text: qsTr("Width") } |
|
|
|
|
QGCLabel { text: qsTr("Height") } |
|
|
|
|
RowLayout { |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
spacing: _margin |
|
|
|
|
Item { Layout.fillWidth: true } |
|
|
|
|
QGCLabel { |
|
|
|
|
Layout.preferredWidth: _root._fieldWidth |
|
|
|
|
text: qsTr("Width") |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
Layout.preferredWidth: _root._fieldWidth |
|
|
|
|
text: qsTr("Height") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { text: qsTr("Sensor:") } |
|
|
|
|
RowLayout { |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
spacing: _margin |
|
|
|
|
QGCLabel { text: qsTr("Sensor:"); Layout.fillWidth: true } |
|
|
|
|
FactTextField { |
|
|
|
|
Layout.preferredWidth: parent._fieldWidth |
|
|
|
|
Layout.preferredWidth: _root._fieldWidth |
|
|
|
|
fact: missionItem.cameraSensorWidth |
|
|
|
|
} |
|
|
|
|
FactTextField { |
|
|
|
|
Layout.preferredWidth: parent._fieldWidth |
|
|
|
|
Layout.preferredWidth: _root._fieldWidth |
|
|
|
|
fact: missionItem.cameraSensorHeight |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { text: qsTr("Image:") } |
|
|
|
|
RowLayout { |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
spacing: _margin |
|
|
|
|
QGCLabel { text: qsTr("Image:"); Layout.fillWidth: true } |
|
|
|
|
FactTextField { |
|
|
|
|
Layout.preferredWidth: parent._fieldWidth |
|
|
|
|
Layout.preferredWidth: _root._fieldWidth |
|
|
|
|
fact: missionItem.cameraResolutionWidth |
|
|
|
|
} |
|
|
|
|
FactTextField { |
|
|
|
|
Layout.preferredWidth: parent._fieldWidth |
|
|
|
|
Layout.preferredWidth: _root._fieldWidth |
|
|
|
|
fact: missionItem.cameraResolutionHeight |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FactTextFieldRow { |
|
|
|
|
RowLayout { |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
spacing: _margin |
|
|
|
|
QGCLabel { |
|
|
|
|
text: missionItem.cameraFocalLength.name + ":" |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
} |
|
|
|
|
FactTextField { |
|
|
|
|
Layout.preferredWidth: _root._fieldWidth |
|
|
|
|
fact: missionItem.cameraFocalLength |
|
|
|
|
} |
|
|
|
|
} // Column - custom camera |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { text: qsTr("Image Overlap") } |
|
|
|
|
} // Column - custom camera |
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
RowLayout { |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
spacing: _margin |
|
|
|
|
|
|
|
|
|
Item { |
|
|
|
|
width: ScreenTools.defaultFontPixelWidth * 2 |
|
|
|
|
height: 1 |
|
|
|
|
Item { Layout.fillWidth: true } |
|
|
|
|
QGCLabel { |
|
|
|
|
Layout.preferredWidth: _root._fieldWidth |
|
|
|
|
text: qsTr("Frontal") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
anchors.baseline: frontalOverlapField.baseline |
|
|
|
|
text: qsTr("Frontal:") |
|
|
|
|
Layout.preferredWidth: _root._fieldWidth |
|
|
|
|
text: qsTr("Side") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
RowLayout { |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
spacing: _margin |
|
|
|
|
QGCLabel { text: qsTr("Overlap:"); Layout.fillWidth: true } |
|
|
|
|
FactTextField { |
|
|
|
|
id: frontalOverlapField |
|
|
|
|
width: ScreenTools.defaultFontPixelWidth * 7 |
|
|
|
|
Layout.preferredWidth: _root._fieldWidth |
|
|
|
|
fact: missionItem.frontalOverlap |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
anchors.baseline: frontalOverlapField.baseline |
|
|
|
|
text: qsTr("Side:") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FactTextField { |
|
|
|
|
width: frontalOverlapField.width |
|
|
|
|
Layout.preferredWidth: _root._fieldWidth |
|
|
|
|
fact: missionItem.sideOverlap |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { text: qsTr("Grid:") } |
|
|
|
|
QGCLabel { text: qsTr("Grid"); color: qgcPal.buttonHighlight;} |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
anchors.left: parent.left |
|
|
|
@ -406,12 +429,36 @@ Rectangle {
@@ -406,12 +429,36 @@ Rectangle {
|
|
|
|
|
color: qgcPal.text |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FactTextFieldGrid { |
|
|
|
|
RowLayout { |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
columnSpacing: _margin |
|
|
|
|
rowSpacing: _margin |
|
|
|
|
factList: [ missionItem.gridAngle, missionItem.turnaroundDist ] |
|
|
|
|
spacing: _margin |
|
|
|
|
QGCLabel { |
|
|
|
|
text: missionItem.gridAngle.name + ":" |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
} |
|
|
|
|
FactTextField { |
|
|
|
|
fact: missionItem.gridAngle |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
Layout.preferredWidth: _root._fieldWidth |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
RowLayout { |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
spacing: _margin |
|
|
|
|
QGCLabel { |
|
|
|
|
text: missionItem.turnaroundDist.name + ":" |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
} |
|
|
|
|
FactTextField { |
|
|
|
|
fact: missionItem.turnaroundDist |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
Layout.preferredWidth: _root._fieldWidth |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
@ -429,18 +476,19 @@ Rectangle {
@@ -429,18 +476,19 @@ Rectangle {
|
|
|
|
|
|
|
|
|
|
QGCRadioButton { |
|
|
|
|
id: fixedAltitudeRadio |
|
|
|
|
anchors.baseline: gridAltitudeField.baseline |
|
|
|
|
text: qsTr("Altitude:") |
|
|
|
|
checked: missionItem.fixedValueIsAltitude |
|
|
|
|
exclusiveGroup: fixedValueGroup |
|
|
|
|
onClicked: missionItem.fixedValueIsAltitude = true |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FactTextField { |
|
|
|
|
id: gridAltitudeField |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
fact: missionItem.gridAltitude |
|
|
|
|
enabled: fixedAltitudeRadio.checked |
|
|
|
|
Layout.preferredWidth: _root._fieldWidth |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -451,18 +499,19 @@ Rectangle {
@@ -451,18 +499,19 @@ Rectangle {
|
|
|
|
|
|
|
|
|
|
QGCRadioButton { |
|
|
|
|
id: fixedGroundResolutionRadio |
|
|
|
|
anchors.baseline: groundResolutionField.baseline |
|
|
|
|
text: qsTr("Ground res:") |
|
|
|
|
checked: !missionItem.fixedValueIsAltitude |
|
|
|
|
exclusiveGroup: fixedValueGroup |
|
|
|
|
onClicked: missionItem.fixedValueIsAltitude = false |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FactTextField { |
|
|
|
|
id: groundResolutionField |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
fact: missionItem.groundResolution |
|
|
|
|
enabled: fixedGroundResolutionRadio.checked |
|
|
|
|
Layout.preferredWidth: _root._fieldWidth |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -474,7 +523,7 @@ Rectangle {
@@ -474,7 +523,7 @@ Rectangle {
|
|
|
|
|
spacing: _margin |
|
|
|
|
visible: gridTypeCombo.currentIndex == _gridTypeManual |
|
|
|
|
|
|
|
|
|
QGCLabel { text: qsTr("Grid:") } |
|
|
|
|
QGCLabel { text: qsTr("Grid"); color: qgcPal.buttonHighlight;} |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
anchors.left: parent.left |
|
|
|
@ -486,7 +535,7 @@ Rectangle {
@@ -486,7 +535,7 @@ Rectangle {
|
|
|
|
|
FactTextFieldGrid { |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
columnSpacing: _margin |
|
|
|
|
columnSpacing: _margin * 10 |
|
|
|
|
rowSpacing: _margin |
|
|
|
|
factList: [ missionItem.gridAngle, missionItem.gridSpacing, missionItem.gridAltitude, missionItem.turnaroundDist ] |
|
|
|
|
} |
|
|
|
@ -498,7 +547,7 @@ Rectangle {
@@ -498,7 +547,7 @@ Rectangle {
|
|
|
|
|
onClicked: missionItem.gridAltitudeRelative = checked |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { text: qsTr("Camera:") } |
|
|
|
|
QGCLabel { text: qsTr("Camera"); color: qgcPal.buttonHighlight;} |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
anchors.left: parent.left |
|
|
|
@ -529,7 +578,7 @@ Rectangle {
@@ -529,7 +578,7 @@ Rectangle {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { text: qsTr("Polygon:") } |
|
|
|
|
QGCLabel { text: qsTr("Polygon"); color: qgcPal.buttonHighlight;} |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
anchors.left: parent.left |
|
|
|
@ -540,8 +589,10 @@ Rectangle {
@@ -540,8 +589,10 @@ Rectangle {
|
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
width: _root.width * 0.45 |
|
|
|
|
text: editorMap.polygonDraw.drawingPolygon ? qsTr("Finish Draw") : qsTr("Draw") |
|
|
|
|
visible: !editorMap.polygonDraw.adjustingPolygon |
|
|
|
|
enabled: ((editorMap.polygonDraw.drawingPolygon && editorMap.polygonDraw.polygonReady) || !editorMap.polygonDraw.drawingPolygon) |
|
|
|
@ -556,6 +607,7 @@ Rectangle {
@@ -556,6 +607,7 @@ Rectangle {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
width: _root.width * 0.4 |
|
|
|
|
text: editorMap.polygonDraw.adjustingPolygon ? qsTr("Finish Adjust") : qsTr("Adjust") |
|
|
|
|
visible: missionItem.polygonPath.length > 0 && !editorMap.polygonDraw.drawingPolygon |
|
|
|
|
|
|
|
|
@ -569,7 +621,7 @@ Rectangle {
@@ -569,7 +621,7 @@ Rectangle {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { text: qsTr("Statistics:") } |
|
|
|
|
QGCLabel { text: qsTr("Statistics"); color: qgcPal.buttonHighlight;} |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
anchors.left: parent.left |
|
|
|
@ -585,11 +637,19 @@ Rectangle {
@@ -585,11 +637,19 @@ Rectangle {
|
|
|
|
|
QGCLabel { text: qsTr("Survey area:") } |
|
|
|
|
QGCLabel { text: QGroundControl.squareMetersToAppSettingsAreaUnits(missionItem.coveredArea).toFixed(2) + " " + QGroundControl.appSettingsAreaUnitsString } |
|
|
|
|
|
|
|
|
|
QGCLabel { text: qsTr("# shots:") } |
|
|
|
|
QGCLabel { text: qsTr("Photo count:") } |
|
|
|
|
QGCLabel { text: missionItem.cameraShots } |
|
|
|
|
|
|
|
|
|
QGCLabel { text: qsTr("Shot interval:") } |
|
|
|
|
QGCLabel { text: missionItem.timeBetweenShots.toFixed(1) + " " + qsTr("secs")} |
|
|
|
|
QGCLabel { text: qsTr("Photo interval:") } |
|
|
|
|
QGCLabel { |
|
|
|
|
text: { |
|
|
|
|
var timeVal = missionItem.timeBetweenShots |
|
|
|
|
if(!isFinite(timeVal) || missionItem.cameraShots === 0) { |
|
|
|
|
return qsTr("N/A") |
|
|
|
|
} |
|
|
|
|
return timeVal.toFixed(1) + " " + qsTr("secs") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|