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
cf5385cf
Commit
cf5385cf
authored
Sep 11, 2019
by
Valentin Platzgummer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update altitude problem inside wima view solved
parent
5303a227
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
33 additions
and
128 deletions
+33
-128
MissionController.cc
src/MissionManager/MissionController.cc
+9
-3
MissionItem.h
src/MissionManager/MissionItem.h
+2
-0
CircularSurveyItemEditor.qml
src/PlanView/CircularSurveyItemEditor.qml
+7
-7
CircularSurvey.SettingsGroup.json
src/Wima/CircularSurvey.SettingsGroup.json
+2
-2
CircularSurveyComplexItem.cc
src/Wima/CircularSurveyComplexItem.cc
+0
-1
SphericalSurveyComplexItem.cc
src/Wima/SphericalSurveyComplexItem.cc
+0
-72
SphericalSurveyComplexItem.h
src/Wima/SphericalSurveyComplexItem.h
+0
-43
WimaView.qml
src/WimaView/WimaView.qml
+13
-0
No files found.
src/MissionManager/MissionController.cc
View file @
cf5385cf
...
...
@@ -458,7 +458,9 @@ int MissionController::insertComplexMissionItemFromKMLOrSHP(QString itemName, QS
int
MissionController
::
_insertComplexMissionItemWorker
(
ComplexMissionItem
*
complexItem
,
int
i
)
{
int
sequenceNumber
=
_nextSequenceNumber
();
bool
surveyStyleItem
=
qobject_cast
<
SurveyComplexItem
*>
(
complexItem
)
||
qobject_cast
<
CorridorScanComplexItem
*>
(
complexItem
);
bool
surveyStyleItem
=
qobject_cast
<
SurveyComplexItem
*>
(
complexItem
)
||
qobject_cast
<
CorridorScanComplexItem
*>
(
complexItem
)
||
qobject_cast
<
CircularSurveyComplexItem
*>
(
complexItem
);
if
(
surveyStyleItem
)
{
bool
rollSupported
=
false
;
...
...
@@ -511,7 +513,9 @@ void MissionController::removeMissionItem(int index)
return
;
}
bool
removeSurveyStyle
=
_visualItems
->
value
<
SurveyComplexItem
*>
(
index
)
||
_visualItems
->
value
<
CorridorScanComplexItem
*>
(
index
);
bool
removeSurveyStyle
=
_visualItems
->
value
<
SurveyComplexItem
*>
(
index
)
||
_visualItems
->
value
<
CorridorScanComplexItem
*>
(
index
)
||
_visualItems
->
value
<
CircularSurveyComplexItem
*>
(
index
);
VisualMissionItem
*
item
=
qobject_cast
<
VisualMissionItem
*>
(
_visualItems
->
removeAt
(
index
));
_deinitVisualItem
(
item
);
...
...
@@ -521,7 +525,9 @@ void MissionController::removeMissionItem(int index)
// Determine if the mission still has another survey style item in it
bool
foundSurvey
=
false
;
for
(
int
i
=
1
;
i
<
_visualItems
->
count
();
i
++
)
{
if
(
_visualItems
->
value
<
SurveyComplexItem
*>
(
i
)
||
_visualItems
->
value
<
CorridorScanComplexItem
*>
(
i
))
{
if
(
_visualItems
->
value
<
SurveyComplexItem
*>
(
i
)
||
_visualItems
->
value
<
CorridorScanComplexItem
*>
(
i
)
||
_visualItems
->
value
<
CircularSurveyComplexItem
*>
(
i
))
{
foundSurvey
=
true
;
break
;
}
...
...
src/MissionManager/MissionItem.h
View file @
cf5385cf
...
...
@@ -26,6 +26,7 @@
#include "QmlObjectListModel.h"
class
SurveyComplexItem
;
class
CircularSurveyComplexItem
;
class
SimpleMissionItem
;
class
MissionController
;
#ifdef UNITTEST_BUILD
...
...
@@ -151,6 +152,7 @@ private:
static
const
char
*
_jsonParam4Key
;
friend
class
SurveyComplexItem
;
friend
class
CircularSurveyComplexItem
;
friend
class
SimpleMissionItem
;
friend
class
MissionController
;
#ifdef UNITTEST_BUILD
...
...
src/PlanView/CircularSurveyItemEditor.qml
View file @
cf5385cf
...
...
@@ -79,12 +79,12 @@ Rectangle {
//onUpdated: rSlider.value = missionItem.deltaR.value
}
QGCLabel
{
text
:
qsTr
(
"
Delta R
"
)
}
FactTextField
{
fact
:
missionItem
.
deltaR
Layout.fillWidth
:
true
//onUpdated: rSlider.value = missionItem.deltaR.value
}
//
QGCLabel { text: qsTr("Delta R") }
//
FactTextField {
//
fact: missionItem.deltaR
//
Layout.fillWidth: true
//
//onUpdated: rSlider.value = missionItem.deltaR.value
//
}
/*QGCSlider {
id: rSlider
...
...
@@ -110,7 +110,7 @@ Rectangle {
QGCSlider
{
id
:
angleSlider
minimumValue
:
0.3
maximumValue
:
5
maximumValue
:
10
stepSize
:
0.1
tickmarksEnabled
:
false
Layout.fillWidth
:
true
...
...
src/Wima/CircularSurvey.SettingsGroup.json
View file @
cf5385cf
...
...
@@ -6,7 +6,7 @@
"units"
:
"m"
,
"min"
:
0.3
,
"decimalPlaces"
:
1
,
"defaultValue"
:
20
"defaultValue"
:
20
.0
},
{
"name"
:
"DeltaAlpha"
,
...
...
@@ -15,6 +15,6 @@
"units"
:
"Deg"
,
"min"
:
0.3
,
"decimalPlaces"
:
1
,
"defaultValue"
:
5
"defaultValue"
:
5
.0
}
]
src/Wima/CircularSurveyComplexItem.cc
View file @
cf5385cf
...
...
@@ -22,7 +22,6 @@ CircularSurveyComplexItem::CircularSurveyComplexItem(Vehicle *vehicle, bool flyV
,
_autoGenerated
(
false
)
{
_editorQml
=
"qrc:/qml/CircularSurveyItemEditor.qml"
;
connect
(
&
_deltaR
,
&
Fact
::
valueChanged
,
this
,
&
CircularSurveyComplexItem
::
_setDirty
);
connect
(
&
_deltaAlpha
,
&
Fact
::
valueChanged
,
this
,
&
CircularSurveyComplexItem
::
_setDirty
);
connect
(
this
,
&
CircularSurveyComplexItem
::
refPointChanged
,
this
,
&
CircularSurveyComplexItem
::
_setDirty
);
...
...
src/Wima/SphericalSurveyComplexItem.cc
deleted
100644 → 0
View file @
5303a227
#include "CircularSurveyComplexItem.h"
const
char
*
CircularSurveyComplexItem
::
settingsGroup
=
"Survey"
;
CircularSurveyComplexItem
::
CircularSurveyComplexItem
(
Vehicle
*
vehicle
,
bool
flyView
,
const
QString
&
kmlOrShpFile
,
QObject
*
parent
)
:
TransectStyleComplexItem
(
vehicle
,
flyView
,
settingsGroup
,
parent
)
{
}
bool
CircularSurveyComplexItem
::
load
(
const
QJsonObject
&
complexObject
,
int
sequenceNumber
,
QString
&
errorString
)
{
return
TransectStyleComplexItem
::
load
(
complexObject
,
sequenceNumber
,
errorString
);
}
void
CircularSurveyComplexItem
::
save
(
QJsonArray
&
planItems
)
{
TransectStyleComplexItem
::
save
(
planItems
);
}
void
CircularSurveyComplexItem
::
appendMissionItems
(
QList
<
MissionItem
*>
&
items
,
QObject
*
missionItemParent
)
{
}
void
CircularSurveyComplexItem
::
applyNewAltitude
(
double
newAltitude
)
{
}
double
CircularSurveyComplexItem
::
timeBetweenShots
()
{
return
1
;
}
bool
CircularSurveyComplexItem
::
readyForSave
()
const
{
return
false
;
}
double
CircularSurveyComplexItem
::
additionalTimeDelay
()
const
{
return
0
;
}
void
CircularSurveyComplexItem
::
_rebuildTransectsPhase1
()
{
}
void
CircularSurveyComplexItem
::
_recalcComplexDistance
()
{
}
void
CircularSurveyComplexItem
::
_recalcCameraShots
()
{
}
/*!
\class CircularSurveyComplexItem
\inmodule Wima
\brief The \c CircularSurveyComplexItem class provides a survey mission item with circular transects around a point of interest.
CircularSurveyComplexItem class provides a survey mission item with circular transects around a point of interest. Within the
\c Wima module it's used to scan a defined area with constant angle (circular transects) to the base station (point of interest).
\sa WimaArea
*/
src/Wima/SphericalSurveyComplexItem.h
deleted
100644 → 0
View file @
5303a227
# pragma once
#include "TransectStyleComplexItem.h"
class
CircularSurveyComplexItem
:
public
TransectStyleComplexItem
{
Q_OBJECT
public:
/// @param vehicle Vehicle which this is being contructed for
/// @param flyView true: Created for use in the Fly View, false: Created for use in the Plan View
/// @param kmlOrShpFile Polygon comes from this file, empty for default polygon
CircularSurveyComplexItem
(
Vehicle
*
vehicle
,
bool
flyView
,
const
QString
&
kmlOrShpFile
,
QObject
*
parent
);
// Overrides from ComplexMissionItem
bool
load
(
const
QJsonObject
&
complexObject
,
int
sequenceNumber
,
QString
&
errorString
)
final
;
QString
mapVisualQML
(
void
)
const
final
{
return
QStringLiteral
(
"SpericalSurveyMapVisual.qml"
);
}
// Overrides from TransectStyleComplexItem
void
save
(
QJsonArray
&
planItems
)
final
;
bool
specifiesCoordinate
(
void
)
const
final
{
return
true
;
}
void
appendMissionItems
(
QList
<
MissionItem
*>&
items
,
QObject
*
missionItemParent
)
final
;
void
applyNewAltitude
(
double
newAltitude
)
final
;
double
timeBetweenShots
(
void
)
final
;
// Overrides from VisualMissionionItem
QString
commandDescription
(
void
)
const
final
{
return
tr
(
"Spherical Survey"
);
}
QString
commandName
(
void
)
const
final
{
return
tr
(
"SphericalSurvey"
);
}
QString
abbreviation
(
void
)
const
final
{
return
tr
(
"Sph.S"
);
}
bool
readyForSave
(
void
)
const
final
;
double
additionalTimeDelay
(
void
)
const
final
;
static
const
char
*
settingsGroup
;
private
slots
:
// Overrides from TransectStyleComplexItem
void
_rebuildTransectsPhase1
(
void
)
final
;
void
_recalcComplexDistance
(
void
)
final
;
void
_recalcCameraShots
(
void
)
final
;
};
src/WimaView/WimaView.qml
View file @
cf5385cf
...
...
@@ -139,6 +139,19 @@ QGCView {
}
}
Component
{
id
:
applyNewAltitude
QGCViewMessage
{
message
:
qsTr
(
"
You have changed the default altitude for mission items. Would you like to apply that altitude to all the items in the current mission?
"
)
function
accept
()
{
hideDialog
()
_missionController
.
applyDefaultMissionAltitude
()
}
}
}
Component
{
id
:
activeMissionUploadDialogComponent
...
...
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