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
313a7b90
Commit
313a7b90
authored
Sep 06, 2019
by
Valentin Platzgummer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
12312
parent
4666c881
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
282 additions
and
9 deletions
+282
-9
MissionController.cc
src/MissionManager/MissionController.cc
+9
-0
CircularSurveyItemEditor.qml
src/PlanView/CircularSurveyItemEditor.qml
+7
-0
CircularSurveyComplexItem.cc
src/Wima/CircularSurveyComplexItem.cc
+240
-6
CircularSurveyComplexItem.h
src/Wima/CircularSurveyComplexItem.h
+12
-0
WimaPlaner.cc
src/Wima/WimaPlaner.cc
+14
-3
No files found.
src/MissionManager/MissionController.cc
View file @
313a7b90
...
...
@@ -781,6 +781,15 @@ bool MissionController::_loadJsonMissionFileV2(const QJsonObject& json, QmlObjec
nextSequenceNumber
=
corridorItem
->
lastSequenceNumber
()
+
1
;
qCDebug
(
MissionControllerLog
)
<<
"Corridor Scan load complete: nextSequenceNumber"
<<
nextSequenceNumber
;
visualItems
->
append
(
corridorItem
);
}
else
if
(
complexItemType
==
CircularSurveyComplexItem
::
jsonComplexItemTypeValue
)
{
qCDebug
(
MissionControllerLog
)
<<
"Loading Circular Survey: nextSequenceNumber"
<<
nextSequenceNumber
;
CircularSurveyComplexItem
*
circularSurvey
=
new
CircularSurveyComplexItem
(
_controllerVehicle
,
_flyView
,
QString
()
/* kmlFile */
,
visualItems
);
if
(
!
circularSurvey
->
load
(
itemObject
,
nextSequenceNumber
++
,
errorString
))
{
return
false
;
}
nextSequenceNumber
=
circularSurvey
->
lastSequenceNumber
()
+
1
;
qCDebug
(
MissionControllerLog
)
<<
"Circular Survey load complete: nextSequenceNumber"
<<
nextSequenceNumber
;
visualItems
->
append
(
circularSurvey
);
}
else
if
(
complexItemType
==
MissionSettingsItem
::
jsonComplexItemTypeValue
)
{
qCDebug
(
MissionControllerLog
)
<<
"Loading Mission Settings: nextSequenceNumber"
<<
nextSequenceNumber
;
MissionSettingsItem
*
settingsItem
=
new
MissionSettingsItem
(
_controllerVehicle
,
_flyView
,
visualItems
);
...
...
src/PlanView/CircularSurveyItemEditor.qml
View file @
313a7b90
...
...
@@ -72,6 +72,13 @@ Rectangle {
visible
:
transectsHeader
.
checked
QGCLabel
{
text
:
qsTr
(
"
Altitude
"
)
}
FactTextField
{
fact
:
missionItem
.
cameraCalc
.
distanceToSurface
Layout.fillWidth
:
true
//onUpdated: rSlider.value = missionItem.deltaR.value
}
QGCLabel
{
text
:
qsTr
(
"
Delta R
"
)
}
FactTextField
{
fact
:
missionItem
.
deltaR
...
...
src/Wima/CircularSurveyComplexItem.cc
View file @
313a7b90
This diff is collapsed.
Click to expand it.
src/Wima/CircularSurveyComplexItem.h
View file @
313a7b90
...
...
@@ -56,6 +56,13 @@ public:
static
const
char
*
deltaRName
;
static
const
char
*
deltaAlphaName
;
static
const
char
*
jsonComplexItemTypeValue
;
static
const
char
*
jsonDeltaRKey
;
static
const
char
*
jsonDeltaAlphaKey
;
static
const
char
*
jsonReferencePointLongKey
;
static
const
char
*
jsonReferencePointLatKey
;
static
const
char
*
jsonReferencePointAltKey
;
signals:
void
refPointChanged
();
void
autoGeneratedChanged
();
...
...
@@ -70,6 +77,11 @@ private slots:
signals:
private:
void
_appendLoadedMissionItems
(
QList
<
MissionItem
*>&
items
,
QObject
*
missionItemParent
);
void
_buildAndAppendMissionItems
(
QList
<
MissionItem
*>&
items
,
QObject
*
missionItemParent
);
QGeoCoordinate
_referencePoint
;
// center of the circular lanes, e.g. base station
QMap
<
QString
,
FactMetaData
*>
_metaDataMap
;
...
...
src/Wima/WimaPlaner.cc
View file @
313a7b90
...
...
@@ -497,9 +497,17 @@ bool WimaPlaner::loadFromFile(const QString &filename)
emit
currentFileChanged
();
//recalcJoinedArea();
// MissionItems
4
// MissionItems
// extrac MissionItems part
QJsonDocument
missionJsonDoc
=
QJsonDocument
(
json
[
missionItemsName
].
toObject
());
// bool ret = json.contains(missionItemsName);
// qWarning() << ret;
QJsonObject
missionObject
=
json
[
missionItemsName
].
toObject
();
//qWarning() << json[missionItemsName].type();
QJsonDocument
missionJsonDoc
=
QJsonDocument
(
missionObject
);
// create temporary file with missionItems
QFile
temporaryFile
;
QString
cropedFileName
=
filename
.
section
(
"/"
,
0
,
-
2
);
...
...
@@ -508,7 +516,8 @@ bool WimaPlaner::loadFromFile(const QString &filename)
#endif
QString
temporaryFileName
;
for
(
int
i
=
0
;
;
i
++
)
{
temporaryFileName
=
cropedFileName
.
append
(
"/temp%1.%2"
).
arg
(
i
).
arg
(
AppSettings
::
planFileExtension
);
temporaryFileName
=
cropedFileName
+
QString
(
"/temp%1.%2"
).
arg
(
i
).
arg
(
AppSettings
::
planFileExtension
);
// qWarning() << temporaryFileName;
if
(
!
QFile
::
exists
(
temporaryFileName
)
)
{
temporaryFile
.
setFileName
(
temporaryFileName
);
...
...
@@ -523,7 +532,9 @@ bool WimaPlaner::loadFromFile(const QString &filename)
}
}
// qWarning() << missionJsonDoc.toVariant().toString();
temporaryFile
.
write
(
missionJsonDoc
.
toJson
());
temporaryFile
.
close
();
// load from temporary file
_masterController
->
loadFromFile
(
temporaryFileName
);
...
...
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