Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
f30d265c
Commit
f30d265c
authored
Feb 05, 2017
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tidying up Mission Settings and Survey Settings
parent
8a3ee28d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
221 additions
and
146 deletions
+221
-146
MissionSettingsEditor.qml
src/MissionEditor/MissionSettingsEditor.qml
+44
-29
SurveyItemEditor.qml
src/MissionEditor/SurveyItemEditor.qml
+177
-117
No files found.
src/MissionEditor/MissionSettingsEditor.qml
View file @
f30d265c
...
@@ -38,6 +38,7 @@ Rectangle {
...
@@ -38,6 +38,7 @@ Rectangle {
property
bool
_showCruiseSpeed
:
!
_missionVehicle
.
multiRotor
property
bool
_showCruiseSpeed
:
!
_missionVehicle
.
multiRotor
property
bool
_showHoverSpeed
:
_missionVehicle
.
multiRotor
||
missionController
.
vehicle
.
vtol
property
bool
_showHoverSpeed
:
_missionVehicle
.
multiRotor
||
missionController
.
vehicle
.
vtol
property
bool
_multipleFirmware
:
QGroundControl
.
supportedFirmwareCount
>
2
property
bool
_multipleFirmware
:
QGroundControl
.
supportedFirmwareCount
>
2
property
real
_fieldWidth
:
ScreenTools
.
defaultFontPixelWidth
*
16
readonly
property
string
_firmwareLabel
:
qsTr
(
"
Firmware:
"
)
readonly
property
string
_firmwareLabel
:
qsTr
(
"
Firmware:
"
)
readonly
property
string
_vehicleLabel
:
qsTr
(
"
Vehicle:
"
)
readonly
property
string
_vehicleLabel
:
qsTr
(
"
Vehicle:
"
)
...
@@ -53,6 +54,7 @@ Rectangle {
...
@@ -53,6 +54,7 @@ Rectangle {
QGCLabel
{
QGCLabel
{
text
:
qsTr
(
"
Planned Home Position
"
)
text
:
qsTr
(
"
Planned Home Position
"
)
color
:
qgcPal
.
buttonHighlight
}
}
Rectangle
{
Rectangle
{
...
@@ -64,31 +66,21 @@ Rectangle {
...
@@ -64,31 +66,21 @@ Rectangle {
Repeater
{
Repeater
{
model
:
missionItem
.
textFieldFacts
model
:
missionItem
.
textFieldFacts
RowLayout
{
Item
{
anchors.left
:
parent
.
left
width
:
valuesColumn
.
width
anchors.right
:
parent
.
right
height
:
textField
.
height
spacing
:
_margin
QGCLabel
{
text
:
object
.
name
;
Layout.fillWidth
:
true
}
QGCLabel
{
id
:
textFieldLabel
anchors.baseline
:
textField
.
baseline
text
:
object
.
name
}
FactTextField
{
FactTextField
{
id
:
textField
Layout.preferredWidth
:
_fieldWidth
anchors.right
:
parent
.
right
showUnits
:
true
width
:
_editFieldWidth
fact
:
object
showUnits
:
true
visible
:
!
_root
.
readOnly
fact
:
object
visible
:
!
_root
.
readOnly
}
}
FactLabel
{
FactLabel
{
anchors.baseline
:
textFieldLabel
.
baseline
Layout.preferredWidth
:
_fieldWidth
anchors.right
:
parent
.
right
fact
:
object
fact
:
object
visible
:
_root
.
readOnly
visible
:
_root
.
readOnly
}
}
}
}
}
}
...
@@ -102,7 +94,8 @@ Rectangle {
...
@@ -102,7 +94,8 @@ Rectangle {
}
}
QGCLabel
{
QGCLabel
{
text
:
qsTr
(
"
Vehicle Info:
"
)
text
:
qsTr
(
"
Vehicle Info
"
)
color
:
qgcPal
.
buttonHighlight
visible
:
_multipleFirmware
visible
:
_multipleFirmware
}
}
...
@@ -125,72 +118,93 @@ Rectangle {
...
@@ -125,72 +118,93 @@ Rectangle {
QGCLabel
{
QGCLabel
{
text
:
_firmwareLabel
text
:
_firmwareLabel
visible
:
_showOfflineEditingCombos
visible
:
_showOfflineEditingCombos
Layout.fillWidth
:
true
}
}
FactComboBox
{
FactComboBox
{
Layout.fillWidth
:
true
fact
:
QGroundControl
.
offlineEditingFirmwareType
fact
:
QGroundControl
.
offlineEditingFirmwareType
indexModel
:
false
indexModel
:
false
visible
:
_showOfflineEditingCombos
visible
:
_showOfflineEditingCombos
Layout.preferredWidth
:
_fieldWidth
}
}
QGCLabel
{
QGCLabel
{
text
:
_firmwareLabel
text
:
_firmwareLabel
visible
:
!
_showOfflineEditingCombos
visible
:
!
_showOfflineEditingCombos
Layout.fillWidth
:
true
}
}
QGCLabel
{
QGCLabel
{
text
:
_missionVehicle
.
firmwareTypeString
text
:
_missionVehicle
.
firmwareTypeString
visible
:
!
_showOfflineEditingCombos
visible
:
!
_showOfflineEditingCombos
Layout.preferredWidth
:
_fieldWidth
}
}
QGCLabel
{
QGCLabel
{
text
:
_vehicleLabel
text
:
_vehicleLabel
visible
:
_showOfflineEditingCombos
visible
:
_showOfflineEditingCombos
Layout.fillWidth
:
true
}
}
FactComboBox
{
FactComboBox
{
id
:
offlineVehicleCombo
id
:
offlineVehicleCombo
Layout.fillWidth
:
true
fact
:
QGroundControl
.
offlineEditingVehicleType
fact
:
QGroundControl
.
offlineEditingVehicleType
indexModel
:
false
indexModel
:
false
visible
:
_showOfflineEditingCombos
visible
:
_showOfflineEditingCombos
Layout.preferredWidth
:
_fieldWidth
}
}
QGCLabel
{
QGCLabel
{
text
:
_vehicleLabel
text
:
_vehicleLabel
visible
:
!
_showOfflineEditingCombos
visible
:
!
_showOfflineEditingCombos
Layout.fillWidth
:
true
}
}
QGCLabel
{
QGCLabel
{
text
:
_missionVehicle
.
vehicleTypeString
text
:
_missionVehicle
.
vehicleTypeString
visible
:
!
_showOfflineEditingCombos
visible
:
!
_showOfflineEditingCombos
Layout.preferredWidth
:
_fieldWidth
}
}
QGCLabel
{
QGCLabel
{
Layout.row
:
2
Layout.row
:
2
text
:
qsTr
(
"
Cruise speed:
"
)
text
:
qsTr
(
"
Cruise speed:
"
)
visible
:
_showCruiseSpeed
visible
:
_showCruiseSpeed
Layout.fillWidth
:
true
}
}
FactTextField
{
FactTextField
{
Layout.fillWidth
:
true
fact
:
QGroundControl
.
offlineEditingCruiseSpeed
fact
:
QGroundControl
.
offlineEditingCruiseSpeed
visible
:
_showCruiseSpeed
visible
:
_showCruiseSpeed
Layout.preferredWidth
:
_fieldWidth
}
}
QGCLabel
{
QGCLabel
{
Layout.row
:
3
Layout.row
:
3
text
:
qsTr
(
"
Hover speed:
"
)
text
:
qsTr
(
"
Hover speed:
"
)
visible
:
_showHoverSpeed
visible
:
_showHoverSpeed
Layout.fillWidth
:
true
}
}
FactTextField
{
FactTextField
{
Layout.fillWidth
:
true
fact
:
QGroundControl
.
offlineEditingHoverSpeed
fact
:
QGroundControl
.
offlineEditingHoverSpeed
visible
:
_showHoverSpeed
visible
:
_showHoverSpeed
Layout.preferredWidth
:
_fieldWidth
}
}
}
// GridLayout
}
// GridLayout
RowLayout
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
spacing
:
_margin
visible
:
!
_multipleFirmware
QGCLabel
{
text
:
qsTr
(
"
Hover speed:
"
);
Layout.fillWidth
:
true
}
FactTextField
{
Layout.preferredWidth
:
_fieldWidth
fact
:
QGroundControl
.
offlineEditingHoverSpeed
}
}
QGCLabel
{
QGCLabel
{
width
:
parent
.
width
width
:
parent
.
width
wrapMode
:
Text
.
WordWrap
wrapMode
:
Text
.
WordWrap
font.pointSize
:
ScreenTools
.
smallFontPointSize
font.pointSize
:
ScreenTools
.
smallFontPointSize
visible
:
_multipleFirmware
text
:
qsTr
(
"
Speeds are only used for time calculations. Actual vehicle speed will not be affected.
"
)
text
:
qsTr
(
"
Speeds are only for time calculations. Actual vehicle will not be affected.
"
)
horizontalAlignment
:
Text
.
AlignHCenter
}
}
Rectangle
{
Rectangle
{
...
@@ -201,6 +215,7 @@ Rectangle {
...
@@ -201,6 +215,7 @@ Rectangle {
}
}
QGCButton
{
QGCButton
{
width
:
parent
.
width
*
0.9
text
:
qsTr
(
"
Set Home To Map Center
"
)
text
:
qsTr
(
"
Set Home To Map Center
"
)
onClicked
:
editorRoot
.
moveHomeToMapCenter
()
onClicked
:
editorRoot
.
moveHomeToMapCenter
()
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
...
...
src/MissionEditor/SurveyItemEditor.qml
View file @
f30d265c
...
@@ -22,8 +22,9 @@ Rectangle {
...
@@ -22,8 +22,9 @@ Rectangle {
//property real availableWidth ///< Width for control
//property real availableWidth ///< Width for control
//property var missionItem ///< Mission Item for editor
//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
int
_cameraIndex
:
1
property
real
_fieldWidth
:
ScreenTools
.
defaultFontPixelWidth
*
10.5
readonly
property
int
_gridTypeManual
:
0
readonly
property
int
_gridTypeManual
:
0
readonly
property
int
_gridTypeCustomCamera
:
1
readonly
property
int
_gridTypeCustomCamera
:
1
...
@@ -33,11 +34,11 @@ Rectangle {
...
@@ -33,11 +34,11 @@ Rectangle {
id
:
cameraModelList
id
:
cameraModelList
Component.onCompleted
:
{
Component.onCompleted
:
{
cameraModelList
.
setProperty
(
_gridTypeCustomCamera
,
"
sensorWidth
"
,
missionItem
.
cameraSensorWidth
.
rawValue
)
cameraModelList
.
setProperty
(
_gridTypeCustomCamera
,
"
sensorWidth
"
,
missionItem
.
cameraSensorWidth
.
rawValue
)
cameraModelList
.
setProperty
(
_gridTypeCustomCamera
,
"
sensorHeight
"
,
missionItem
.
cameraSensorHeight
.
rawValue
)
cameraModelList
.
setProperty
(
_gridTypeCustomCamera
,
"
sensorHeight
"
,
missionItem
.
cameraSensorHeight
.
rawValue
)
cameraModelList
.
setProperty
(
_gridTypeCustomCamera
,
"
imageWidth
"
,
missionItem
.
cameraResolutionWidth
.
rawValue
)
cameraModelList
.
setProperty
(
_gridTypeCustomCamera
,
"
imageWidth
"
,
missionItem
.
cameraResolutionWidth
.
rawValue
)
cameraModelList
.
setProperty
(
_gridTypeCustomCamera
,
"
imageHeight
"
,
missionItem
.
cameraResolutionHeight
.
rawValue
)
cameraModelList
.
setProperty
(
_gridTypeCustomCamera
,
"
imageHeight
"
,
missionItem
.
cameraResolutionHeight
.
rawValue
)
cameraModelList
.
setProperty
(
_gridTypeCustomCamera
,
"
focalLength
"
,
missionItem
.
cameraFocalLength
.
rawValue
)
cameraModelList
.
setProperty
(
_gridTypeCustomCamera
,
"
focalLength
"
,
missionItem
.
cameraFocalLength
.
rawValue
)
}
}
ListElement
{
ListElement
{
...
@@ -46,6 +47,14 @@ Rectangle {
...
@@ -46,6 +47,14 @@ Rectangle {
ListElement
{
ListElement
{
text
:
qsTr
(
"
Custom Camera Grid
"
)
text
:
qsTr
(
"
Custom Camera Grid
"
)
}
}
ListElement
{
text
:
qsTr
(
"
Typhoon H CGO3+
"
)
sensorWidth
:
6.264
sensorHeight
:
4.698
imageWidth
:
4000
imageHeight
:
3000
focalLength
:
14
}
ListElement
{
ListElement
{
text
:
qsTr
(
"
Sony ILCE-QX1
"
)
//http://www.sony.co.uk/electronics/interchangeable-lens-cameras/ilce-qx1-body-kit/specifications
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
sensorWidth
:
23.2
//http://www.sony.com/electronics/camera-lenses/sel16f28/specifications
...
@@ -89,16 +98,16 @@ Rectangle {
...
@@ -89,16 +98,16 @@ Rectangle {
}
}
function
recalcFromCameraValues
()
{
function
recalcFromCameraValues
()
{
var
focalLength
=
missionItem
.
cameraFocalLength
.
rawValue
var
focalLength
=
missionItem
.
cameraFocalLength
.
rawValue
var
sensorWidth
=
missionItem
.
cameraSensorWidth
.
rawValue
var
sensorWidth
=
missionItem
.
cameraSensorWidth
.
rawValue
var
sensorHeight
=
missionItem
.
cameraSensorHeight
.
rawValue
var
sensorHeight
=
missionItem
.
cameraSensorHeight
.
rawValue
var
imageWidth
=
missionItem
.
cameraResolutionWidth
.
rawValue
var
imageWidth
=
missionItem
.
cameraResolutionWidth
.
rawValue
var
imageHeight
=
missionItem
.
cameraResolutionHeight
.
rawValue
var
imageHeight
=
missionItem
.
cameraResolutionHeight
.
rawValue
var
altitude
=
missionItem
.
gridAltitude
.
rawValue
var
altitude
=
missionItem
.
gridAltitude
.
rawValue
var
groundResolution
=
missionItem
.
groundResolution
.
rawValue
var
groundResolution
=
missionItem
.
groundResolution
.
rawValue
var
frontalOverlap
=
missionItem
.
frontalOverlap
.
rawValue
var
frontalOverlap
=
missionItem
.
frontalOverlap
.
rawValue
var
sideOverlap
=
missionItem
.
sideOverlap
.
rawValue
var
sideOverlap
=
missionItem
.
sideOverlap
.
rawValue
if
(
focalLength
<=
0
||
sensorWidth
<=
0
||
sensorHeight
<=
0
||
imageWidth
<=
0
||
imageHeight
<=
0
||
groundResolution
<=
0
)
{
if
(
focalLength
<=
0
||
sensorWidth
<=
0
||
sensorHeight
<=
0
||
imageWidth
<=
0
||
imageHeight
<=
0
||
groundResolution
<=
0
)
{
return
return
...
@@ -110,17 +119,17 @@ Rectangle {
...
@@ -110,17 +119,17 @@ Rectangle {
var
cameraTriggerDistance
var
cameraTriggerDistance
if
(
missionItem
.
fixedValueIsAltitude
)
{
if
(
missionItem
.
fixedValueIsAltitude
)
{
groundResolution
=
(
altitude
*
sensorWidth
*
100
)
/
(
imageWidth
*
focalLength
)
groundResolution
=
(
altitude
*
sensorWidth
*
100
)
/
(
imageWidth
*
focalLength
)
}
else
{
}
else
{
altitude
=
(
imageWidth
*
groundResolution
*
focalLength
)
/
(
sensorWidth
*
100
)
altitude
=
(
imageWidth
*
groundResolution
*
focalLength
)
/
(
sensorWidth
*
100
)
}
}
if
(
cameraOrientationLandscape
.
checked
)
{
if
(
cameraOrientationLandscape
.
checked
)
{
imageSizeSideGround
=
(
imageWidth
*
groundResolution
)
/
100
imageSizeSideGround
=
(
imageWidth
*
groundResolution
)
/
100
imageSizeFrontGround
=
(
imageHeight
*
groundResolution
)
/
100
imageSizeFrontGround
=
(
imageHeight
*
groundResolution
)
/
100
}
else
{
}
else
{
imageSizeSideGround
=
(
imageHeight
*
groundResolution
)
/
100
imageSizeSideGround
=
(
imageHeight
*
groundResolution
)
/
100
imageSizeFrontGround
=
(
imageWidth
*
groundResolution
)
/
100
imageSizeFrontGround
=
(
imageWidth
*
groundResolution
)
/
100
}
}
gridSpacing
=
imageSizeSideGround
*
(
(
100
-
sideOverlap
)
/
100
)
gridSpacing
=
imageSizeSideGround
*
(
(
100
-
sideOverlap
)
/
100
)
...
@@ -238,25 +247,6 @@ Rectangle {
...
@@ -238,25 +247,6 @@ Rectangle {
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
spacing
:
_margin
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
{
QGCComboBox
{
id
:
gridTypeCombo
id
:
gridTypeCombo
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
...
@@ -285,17 +275,27 @@ Rectangle {
...
@@ -285,17 +275,27 @@ Rectangle {
missionItem
.
manualGrid
=
false
missionItem
.
manualGrid
=
false
missionItem
.
camera
=
gridTypeCombo
.
textAt
(
index
)
missionItem
.
camera
=
gridTypeCombo
.
textAt
(
index
)
_noCameraValueRecalc
=
true
_noCameraValueRecalc
=
true
missionItem
.
cameraSensorWidth
.
rawValue
=
cameraModelList
.
get
(
index
).
sensorWidth
missionItem
.
cameraSensorWidth
.
rawValue
=
cameraModelList
.
get
(
index
).
sensorWidth
missionItem
.
cameraSensorHeight
.
rawValue
=
cameraModelList
.
get
(
index
).
sensorHeight
missionItem
.
cameraSensorHeight
.
rawValue
=
cameraModelList
.
get
(
index
).
sensorHeight
missionItem
.
cameraResolutionWidth
.
rawValue
=
cameraModelList
.
get
(
index
).
imageWidth
missionItem
.
cameraResolutionWidth
.
rawValue
=
cameraModelList
.
get
(
index
).
imageWidth
missionItem
.
cameraResolutionHeight
.
rawValue
=
cameraModelList
.
get
(
index
).
imageHeight
missionItem
.
cameraResolutionHeight
.
rawValue
=
cameraModelList
.
get
(
index
).
imageHeight
missionItem
.
cameraFocalLength
.
rawValue
=
cameraModelList
.
get
(
index
).
focalLength
missionItem
.
cameraFocalLength
.
rawValue
=
cameraModelList
.
get
(
index
).
focalLength
_noCameraValueRecalc
=
false
_noCameraValueRecalc
=
false
recalcFromCameraValues
()
recalcFromCameraValues
()
}
}
}
}
}
}
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
// Camera based grid ui
Column
{
Column
{
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
...
@@ -305,6 +305,7 @@ Rectangle {
...
@@ -305,6 +305,7 @@ Rectangle {
Row
{
Row
{
spacing
:
_margin
spacing
:
_margin
anchors.horizontalCenter
:
parent
.
horizontalCenter
QGCRadioButton
{
QGCRadioButton
{
id
:
cameraOrientationLandscape
id
:
cameraOrientationLandscape
...
@@ -322,82 +323,104 @@ Rectangle {
...
@@ -322,82 +323,104 @@ Rectangle {
}
}
Column
{
Column
{
id
:
custCameraCol
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
spacing
:
_margin
spacing
:
_margin
visible
:
gridTypeCombo
.
currentIndex
==
_gridTypeCustomCamera
visible
:
gridTypeCombo
.
currentIndex
===
_gridTypeCustomCamera
GridLayout
{
RowLayout
{
columns
:
3
anchors.left
:
parent
.
left
columnSpacing
:
_margin
anchors.right
:
parent
.
right
rowSpacing
:
_margin
spacing
:
_margin
Item
{
Layout.fillWidth
:
true
}
property
real
_fieldWidth
:
ScreenTools
.
defaultFontPixelWidth
*
10
QGCLabel
{
Layout.preferredWidth
:
_root
.
_fieldWidth
QGCLabel
{
}
text
:
qsTr
(
"
Width
"
)
QGCLabel
{
text
:
qsTr
(
"
Width
"
)
}
}
QGCLabel
{
text
:
qsTr
(
"
Height
"
)
}
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
{
FactTextField
{
Layout.preferredWidth
:
paren
t
.
_fieldWidth
Layout.preferredWidth
:
_roo
t
.
_fieldWidth
fact
:
missionItem
.
cameraSensorWidth
fact
:
missionItem
.
cameraSensorWidth
}
}
FactTextField
{
FactTextField
{
Layout.preferredWidth
:
paren
t
.
_fieldWidth
Layout.preferredWidth
:
_roo
t
.
_fieldWidth
fact
:
missionItem
.
cameraSensorHeight
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
{
FactTextField
{
Layout.preferredWidth
:
paren
t
.
_fieldWidth
Layout.preferredWidth
:
_roo
t
.
_fieldWidth
fact
:
missionItem
.
cameraResolutionWidth
fact
:
missionItem
.
cameraResolutionWidth
}
}
FactTextField
{
FactTextField
{
Layout.preferredWidth
:
paren
t
.
_fieldWidth
Layout.preferredWidth
:
_roo
t
.
_fieldWidth
fact
:
missionItem
.
cameraResolutionHeight
fact
:
missionItem
.
cameraResolutionHeight
}
}
}
}
FactTextFieldRow
{
RowLayout
{
spacing
:
_margin
anchors.left
:
parent
.
left
fact
:
missionItem
.
cameraFocalLength
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
spacing
:
_margin
Item
{
Layout.fillWidth
:
true
}
Item
{
QGCLabel
{
width
:
ScreenTools
.
defaultFontPixelWidth
*
2
Layout.preferredWidth
:
_root
.
_fieldWidth
height
:
1
text
:
qsTr
(
"
Frontal
"
)
}
}
QGCLabel
{
QGCLabel
{
anchors.baseline
:
frontalOverlapField
.
baseline
Layout.preferredWidth
:
_root
.
_fieldWidth
text
:
qsTr
(
"
Frontal:
"
)
text
:
qsTr
(
"
Side
"
)
}
}
}
RowLayout
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
spacing
:
_margin
QGCLabel
{
text
:
qsTr
(
"
Overlap:
"
);
Layout.fillWidth
:
true
}
FactTextField
{
FactTextField
{
id
:
frontalOverlapField
Layout.preferredWidth
:
_root
.
_fieldWidth
width
:
ScreenTools
.
defaultFontPixelWidth
*
7
fact
:
missionItem
.
frontalOverlap
fact
:
missionItem
.
frontalOverlap
}
QGCLabel
{
anchors.baseline
:
frontalOverlapField
.
baseline
text
:
qsTr
(
"
Side:
"
)
}
}
FactTextField
{
FactTextField
{
width
:
frontalOverlapField
.
w
idth
Layout.preferredWidth
:
_root
.
_fieldW
idth
fact
:
missionItem
.
sideOverlap
fact
:
missionItem
.
sideOverlap
}
}
}
}
QGCLabel
{
text
:
qsTr
(
"
Grid
:
"
)
}
QGCLabel
{
text
:
qsTr
(
"
Grid
"
);
color
:
qgcPal
.
buttonHighlight
;
}
Rectangle
{
Rectangle
{
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
...
@@ -406,12 +429,36 @@ Rectangle {
...
@@ -406,12 +429,36 @@ Rectangle {
color
:
qgcPal
.
text
color
:
qgcPal
.
text
}
}
FactTextFieldGrid
{
RowLayout
{
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
columnSpacing
:
_margin
spacing
:
_margin
rowSpacing
:
_margin
QGCLabel
{
factList
:
[
missionItem
.
gridAngle
,
missionItem
.
turnaroundDist
]
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
{
QGCLabel
{
...
@@ -428,19 +475,20 @@ Rectangle {
...
@@ -428,19 +475,20 @@ Rectangle {
spacing
:
_margin
spacing
:
_margin
QGCRadioButton
{
QGCRadioButton
{
id
:
fixedAltitudeRadio
id
:
fixedAltitudeRadio
anchors.baseline
:
gridAltitudeField
.
baseline
text
:
qsTr
(
"
Altitude:
"
)
text
:
qsTr
(
"
Altitude:
"
)
checked
:
missionItem
.
fixedValueIsAltitude
checked
:
missionItem
.
fixedValueIsAltitude
exclusiveGroup
:
fixedValueGroup
exclusiveGroup
:
fixedValueGroup
onClicked
:
missionItem
.
fixedValueIsAltitude
=
true
onClicked
:
missionItem
.
fixedValueIsAltitude
=
true
Layout.fillWidth
:
true
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
FactTextField
{
FactTextField
{
id
:
gridAltitudeField
fact
:
missionItem
.
gridAltitude
Layout.fillWidth
:
true
enabled
:
fixedAltitudeRadio
.
checked
fact
:
missionItem
.
gridAltitude
Layout.preferredWidth
:
_root
.
_fieldWidth
enabled
:
fixedAltitudeRadio
.
checked
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
}
}
...
@@ -450,19 +498,20 @@ Rectangle {
...
@@ -450,19 +498,20 @@ Rectangle {
spacing
:
_margin
spacing
:
_margin
QGCRadioButton
{
QGCRadioButton
{
id
:
fixedGroundResolutionRadio
id
:
fixedGroundResolutionRadio
anchors.baseline
:
groundResolutionField
.
baseline
text
:
qsTr
(
"
Ground res:
"
)
text
:
qsTr
(
"
Ground res:
"
)
checked
:
!
missionItem
.
fixedValueIsAltitude
checked
:
!
missionItem
.
fixedValueIsAltitude
exclusiveGroup
:
fixedValueGroup
exclusiveGroup
:
fixedValueGroup
onClicked
:
missionItem
.
fixedValueIsAltitude
=
false
onClicked
:
missionItem
.
fixedValueIsAltitude
=
false
Layout.fillWidth
:
true
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
FactTextField
{
FactTextField
{
id
:
groundResolutionField
fact
:
missionItem
.
groundResolution
Layout.fillWidth
:
true
enabled
:
fixedGroundResolutionRadio
.
checked
fact
:
missionItem
.
groundResolution
Layout.preferredWidth
:
_root
.
_fieldWidth
enabled
:
fixedGroundResolutionRadio
.
checked
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
}
}
}
}
...
@@ -474,7 +523,7 @@ Rectangle {
...
@@ -474,7 +523,7 @@ Rectangle {
spacing
:
_margin
spacing
:
_margin
visible
:
gridTypeCombo
.
currentIndex
==
_gridTypeManual
visible
:
gridTypeCombo
.
currentIndex
==
_gridTypeManual
QGCLabel
{
text
:
qsTr
(
"
Grid
:
"
)
}
QGCLabel
{
text
:
qsTr
(
"
Grid
"
);
color
:
qgcPal
.
buttonHighlight
;
}
Rectangle
{
Rectangle
{
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
...
@@ -486,7 +535,7 @@ Rectangle {
...
@@ -486,7 +535,7 @@ Rectangle {
FactTextFieldGrid
{
FactTextFieldGrid
{
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
columnSpacing
:
_margin
columnSpacing
:
_margin
*
10
rowSpacing
:
_margin
rowSpacing
:
_margin
factList
:
[
missionItem
.
gridAngle
,
missionItem
.
gridSpacing
,
missionItem
.
gridAltitude
,
missionItem
.
turnaroundDist
]
factList
:
[
missionItem
.
gridAngle
,
missionItem
.
gridSpacing
,
missionItem
.
gridAltitude
,
missionItem
.
turnaroundDist
]
}
}
...
@@ -498,7 +547,7 @@ Rectangle {
...
@@ -498,7 +547,7 @@ Rectangle {
onClicked
:
missionItem
.
gridAltitudeRelative
=
checked
onClicked
:
missionItem
.
gridAltitudeRelative
=
checked
}
}
QGCLabel
{
text
:
qsTr
(
"
Camera
:
"
)
}
QGCLabel
{
text
:
qsTr
(
"
Camera
"
);
color
:
qgcPal
.
buttonHighlight
;
}
Rectangle
{
Rectangle
{
anchors.left
:
parent
.
left
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
{
Rectangle
{
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
...
@@ -540,8 +589,10 @@ Rectangle {
...
@@ -540,8 +589,10 @@ Rectangle {
Row
{
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
spacing
:
ScreenTools
.
defaultFontPixelWidth
anchors.horizontalCenter
:
parent
.
horizontalCenter
QGCButton
{
QGCButton
{
width
:
_root
.
width
*
0.45
text
:
editorMap
.
polygonDraw
.
drawingPolygon
?
qsTr
(
"
Finish Draw
"
)
:
qsTr
(
"
Draw
"
)
text
:
editorMap
.
polygonDraw
.
drawingPolygon
?
qsTr
(
"
Finish Draw
"
)
:
qsTr
(
"
Draw
"
)
visible
:
!
editorMap
.
polygonDraw
.
adjustingPolygon
visible
:
!
editorMap
.
polygonDraw
.
adjustingPolygon
enabled
:
((
editorMap
.
polygonDraw
.
drawingPolygon
&&
editorMap
.
polygonDraw
.
polygonReady
)
||
!
editorMap
.
polygonDraw
.
drawingPolygon
)
enabled
:
((
editorMap
.
polygonDraw
.
drawingPolygon
&&
editorMap
.
polygonDraw
.
polygonReady
)
||
!
editorMap
.
polygonDraw
.
drawingPolygon
)
...
@@ -556,6 +607,7 @@ Rectangle {
...
@@ -556,6 +607,7 @@ Rectangle {
}
}
QGCButton
{
QGCButton
{
width
:
_root
.
width
*
0.4
text
:
editorMap
.
polygonDraw
.
adjustingPolygon
?
qsTr
(
"
Finish Adjust
"
)
:
qsTr
(
"
Adjust
"
)
text
:
editorMap
.
polygonDraw
.
adjustingPolygon
?
qsTr
(
"
Finish Adjust
"
)
:
qsTr
(
"
Adjust
"
)
visible
:
missionItem
.
polygonPath
.
length
>
0
&&
!
editorMap
.
polygonDraw
.
drawingPolygon
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
{
Rectangle
{
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
...
@@ -585,11 +637,19 @@ Rectangle {
...
@@ -585,11 +637,19 @@ Rectangle {
QGCLabel
{
text
:
qsTr
(
"
Survey area:
"
)
}
QGCLabel
{
text
:
qsTr
(
"
Survey area:
"
)
}
QGCLabel
{
text
:
QGroundControl
.
squareMetersToAppSettingsAreaUnits
(
missionItem
.
coveredArea
).
toFixed
(
2
)
+
"
"
+
QGroundControl
.
appSettingsAreaUnitsString
}
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
:
missionItem
.
cameraShots
}
QGCLabel
{
text
:
qsTr
(
"
Shot interval:
"
)
}
QGCLabel
{
text
:
qsTr
(
"
Photo interval:
"
)
}
QGCLabel
{
text
:
missionItem
.
timeBetweenShots
.
toFixed
(
1
)
+
"
"
+
qsTr
(
"
secs
"
)}
QGCLabel
{
text
:
{
var
timeVal
=
missionItem
.
timeBetweenShots
if
(
!
isFinite
(
timeVal
)
||
missionItem
.
cameraShots
===
0
)
{
return
qsTr
(
"
N/A
"
)
}
return
timeVal
.
toFixed
(
1
)
+
"
"
+
qsTr
(
"
secs
"
)
}
}
}
}
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment