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
9574328f
Commit
9574328f
authored
Mar 10, 2020
by
DoinLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
a2c9eb95
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
178 additions
and
107 deletions
+178
-107
CorridorScanComplexItem.cc
src/MissionManager/CorridorScanComplexItem.cc
+3
-3
MavCmdInfoCommon.json
src/MissionManager/MavCmdInfoCommon.json
+30
-0
SurveyComplexItem.cc
src/MissionManager/SurveyComplexItem.cc
+134
-101
SurveyComplexItem.h
src/MissionManager/SurveyComplexItem.h
+5
-1
TransectStyleComplexItem.h
src/MissionManager/TransectStyleComplexItem.h
+6
-2
No files found.
src/MissionManager/CorridorScanComplexItem.cc
View file @
9574328f
...
...
@@ -217,7 +217,7 @@ void CorridorScanComplexItem::_buildAndAppendMissionItems(QList<MissionItem*>& i
firstOverallPoint
=
false
;
// Possibly add trigger start/stop to survey area entrance/exit
if
(
triggerCamera
()
&&
transectCoordInfo
.
coordType
==
TransectStyleComplexItem
::
CoordTypeSurveyEdge
)
{
if
(
triggerCamera
()
&&
(
transectCoordInfo
.
coordType
==
TransectStyleComplexItem
::
CoordTypeSurveyEntry
||
transectCoordInfo
.
coordType
==
TransectStyleComplexItem
::
CoordTypeSurveyExit
)
)
{
if
(
transectEntry
)
{
// Start of transect, always start triggering. We do this even if we are taking images everywhere.
// This allows a restart of the mission in mid-air without losing images from the entire mission.
...
...
@@ -370,9 +370,9 @@ void CorridorScanComplexItem::_rebuildTransectsPhase1(void)
TransectStyleComplexItem
::
CoordInfo_t
coordInfo
=
{
transectCoords
[
j
],
CoordTypeInterior
};
transect
.
append
(
coordInfo
);
}
TransectStyleComplexItem
::
CoordInfo_t
coordInfo
=
{
transectCoords
.
first
(),
CoordTypeSurveyE
dge
};
TransectStyleComplexItem
::
CoordInfo_t
coordInfo
=
{
transectCoords
.
first
(),
CoordTypeSurveyE
ntry
};
transect
.
prepend
(
coordInfo
);
coordInfo
=
{
transectCoords
.
last
(),
CoordTypeSurveyE
dge
};
coordInfo
=
{
transectCoords
.
last
(),
CoordTypeSurveyE
xit
};
transect
.
append
(
coordInfo
);
// Extend the transect ends for turnaround
...
...
src/MissionManager/MavCmdInfoCommon.json
View file @
9574328f
...
...
@@ -858,6 +858,20 @@
"default"
:
25
,
"units"
:
"m"
,
"decimalPlaces"
:
2
},
"param2"
:
{
"label"
:
"Shutter"
,
"default"
:
0
,
"units"
:
"msecs"
,
"decimalPlaces"
:
0
},
"param3"
:
{
"label"
:
"Trigger"
,
"default"
:
25
,
"enumStrings"
:
"No Trigger,Once Immediately"
,
"enumValues"
:
"0,1"
,
"default"
:
0
,
"decimalPlaces"
:
0
}
},
{
...
...
@@ -1063,6 +1077,22 @@
"enumValues"
:
"3,4"
}
},
{
"id"
:
4501
,
"rawName"
:
"MAV_CMD_CONDITION_GATE"
,
"friendlyName"
:
"Condition Gate"
,
"description"
:
"Delay mission state machine until gate has been reached."
,
"specifiesCoordinate"
:
true
,
"friendlyEdit"
:
true
,
"category"
:
"Conditionals"
,
"param2"
:
{
"label"
:
"Ignore Alt"
,
"enumStrings"
:
"False,True"
,
"enumValues"
:
"0,1"
,
"default"
:
1
,
"decimalPlaces"
:
0
}
},
{
"id"
:
30001
,
"rawName"
:
"MAV_CMD_PAYLOAD_PREPARE_DEPLOY", "friendlyName"
:
"Payload prepare deploy"
},
{
"id"
:
30002
,
"rawName"
:
"MAV_CMD_PAYLOAD_CONTROL_DEPLOY", "friendlyName"
:
"Payload control deploy"
}
]
...
...
src/MissionManager/SurveyComplexItem.cc
View file @
9574328f
This diff is collapsed.
Click to expand it.
src/MissionManager/SurveyComplexItem.h
View file @
9574328f
...
...
@@ -98,7 +98,6 @@ private:
void
_intersectLinesWithRect
(
const
QList
<
QLineF
>&
lineList
,
const
QRectF
&
boundRect
,
QList
<
QLineF
>&
resultLines
);
void
_intersectLinesWithPolygon
(
const
QList
<
QLineF
>&
lineList
,
const
QPolygonF
&
polygon
,
QList
<
QLineF
>&
resultLines
);
void
_adjustLineDirection
(
const
QList
<
QLineF
>&
lineList
,
QList
<
QLineF
>&
resultLines
);
int
_appendWaypointToMission
(
QList
<
MissionItem
*>&
items
,
int
seqNum
,
QGeoCoordinate
&
coord
,
CameraTriggerCode
cameraTrigger
,
QObject
*
missionItemParent
);
bool
_nextTransectCoord
(
const
QList
<
QGeoCoordinate
>&
transectPoints
,
int
pointIndex
,
QGeoCoordinate
&
coord
);
bool
_appendMissionItemsWorker
(
QList
<
MissionItem
*>&
items
,
QObject
*
missionItemParent
,
int
&
seqNum
,
bool
hasRefly
,
bool
buildRefly
);
void
_optimizeTransectsForShortestDistance
(
const
QGeoCoordinate
&
distanceCoord
,
QList
<
QList
<
QGeoCoordinate
>>&
transects
);
...
...
@@ -130,6 +129,11 @@ private:
// return true if vertex a can see vertex b
bool
_VertexCanSeeOther
(
const
QPolygonF
&
polygon
,
const
QPointF
*
vertexA
,
const
QPointF
*
vertexB
);
bool
_VertexIsReflex
(
const
QPolygonF
&
polygon
,
const
QPointF
*
vertex
);
void
_appendWaypoint
(
QList
<
MissionItem
*>&
items
,
QObject
*
missionItemParent
,
int
&
seqNum
,
MAV_FRAME
mavFrame
,
float
holdTime
,
const
QGeoCoordinate
&
coordinate
);
void
_appendSinglePhotoCapture
(
QList
<
MissionItem
*>&
items
,
QObject
*
missionItemParent
,
int
&
seqNum
);
void
_appendConditionGate
(
QList
<
MissionItem
*>&
items
,
QObject
*
missionItemParent
,
int
&
seqNum
,
MAV_FRAME
mavFrame
,
const
QGeoCoordinate
&
coordinate
);
void
_appendCameraTriggerDistance
(
QList
<
MissionItem
*>&
items
,
QObject
*
missionItemParent
,
int
&
seqNum
,
float
triggerDistance
);
void
_appendCameraTriggerDistanceUpdatePoint
(
QList
<
MissionItem
*>&
items
,
QObject
*
missionItemParent
,
int
&
seqNum
,
MAV_FRAME
mavFrame
,
const
QGeoCoordinate
&
coordinate
,
bool
useConditionGate
,
float
triggerDistance
);
QMap
<
QString
,
FactMetaData
*>
_metaDataMap
;
...
...
src/MissionManager/TransectStyleComplexItem.h
View file @
9574328f
...
...
@@ -74,6 +74,9 @@ public:
bool
hoverAndCaptureEnabled
(
void
)
const
{
return
hoverAndCapture
()
->
rawValue
().
toBool
();
}
bool
triggerCamera
(
void
)
const
{
return
triggerDistance
()
!=
0
;
}
// Used internally only by unit tests
int
_transectCount
(
void
)
{
return
_transects
.
count
();
}
// Overrides from ComplexMissionItem
int
lastSequenceNumber
(
void
)
const
final
;
...
...
@@ -159,8 +162,9 @@ protected:
CoordTypeInterior
,
///< Interior waypoint for flight path only
CoordTypeInteriorHoverTrigger
,
///< Interior waypoint for hover and capture trigger
CoordTypeInteriorTerrainAdded
,
///< Interior waypoint added for terrain
CoordTypeSurveyEdge
,
///< Waypoint at edge of survey polygon
CoordTypeTurnaround
///< Waypoint outside of survey polygon for turnaround
CoordTypeSurveyEntry
,
///< Waypoint at entry edge of survey polygon
CoordTypeSurveyExit
,
///< Waypoint at exit edge of survey polygon
CoordTypeTurnaround
,
///< First turnaround waypoint
};
typedef
struct
{
...
...
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