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
a07fe820
Unverified
Commit
a07fe820
authored
Oct 15, 2019
by
Don Gagne
Committed by
GitHub
Oct 15, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7894 from DonLakeFlyer/MinTransectSpacing
Plan Patterns: Minimum transect spacing of 0.5 meters
parents
84b5a3e6
aa73d2b5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
6 deletions
+25
-6
CorridorScanComplexItem.cc
src/MissionManager/CorridorScanComplexItem.cc
+15
-3
CorridorScanComplexItem.h
src/MissionManager/CorridorScanComplexItem.h
+4
-3
SurveyComplexItem.cc
src/MissionManager/SurveyComplexItem.cc
+6
-0
No files found.
src/MissionManager/CorridorScanComplexItem.cc
View file @
a07fe820
...
...
@@ -144,9 +144,8 @@ bool CorridorScanComplexItem::specifiesCoordinate(void) const
int
CorridorScanComplexItem
::
_transectCount
(
void
)
const
{
double
transectSpacing
=
_cameraCalc
.
adjustedFootprintSide
()
->
rawValue
().
toDouble
();
double
fullWidth
=
_corridorWidthFact
.
rawValue
().
toDouble
();
return
fullWidth
>
0.0
?
qCeil
(
fullWidth
/
transectSpacing
)
:
1
;
return
fullWidth
>
0.0
?
qCeil
(
fullWidth
/
_transectSpacing
()
)
:
1
;
}
void
CorridorScanComplexItem
::
_appendLoadedMissionItems
(
QList
<
MissionItem
*>&
items
,
QObject
*
missionItemParent
)
...
...
@@ -343,7 +342,7 @@ void CorridorScanComplexItem::_rebuildTransectsPhase1(void)
_transects
.
clear
();
_transectsPathHeightInfo
.
clear
();
double
transectSpacing
=
_
cameraCalc
.
adjustedFootprintSide
()
->
rawValue
().
toDouble
();
double
transectSpacing
=
_
transectSpacing
();
double
fullWidth
=
_corridorWidthFact
.
rawValue
().
toDouble
();
double
halfWidth
=
fullWidth
/
2.0
;
int
transectCount
=
_transectCount
();
...
...
@@ -501,3 +500,16 @@ double CorridorScanComplexItem::timeBetweenShots(void)
{
return
_cruiseSpeed
==
0
?
0
:
_cameraCalc
.
adjustedFootprintFrontal
()
->
rawValue
().
toDouble
()
/
_cruiseSpeed
;
}
double
CorridorScanComplexItem
::
_transectSpacing
(
void
)
const
{
double
transectSpacing
=
_cameraCalc
.
adjustedFootprintSide
()
->
rawValue
().
toDouble
();
if
(
transectSpacing
<
0.5
)
{
// We can't let spacing get too small otherwise we will end up with too many transects.
// So we limit to 0.5 meter spacing as min and set to huge value which will cause a single
// transect to be added.
transectSpacing
=
100000
;
}
return
transectSpacing
;
}
src/MissionManager/CorridorScanComplexItem.h
View file @
a07fe820
...
...
@@ -69,9 +69,10 @@ private slots:
void
_recalcCameraShots
(
void
)
final
;
private:
int
_transectCount
(
void
)
const
;
void
_buildAndAppendMissionItems
(
QList
<
MissionItem
*>&
items
,
QObject
*
missionItemParent
);
void
_appendLoadedMissionItems
(
QList
<
MissionItem
*>&
items
,
QObject
*
missionItemParent
);
double
_transectSpacing
(
void
)
const
;
int
_transectCount
(
void
)
const
;
void
_buildAndAppendMissionItems
(
QList
<
MissionItem
*>&
items
,
QObject
*
missionItemParent
);
void
_appendLoadedMissionItems
(
QList
<
MissionItem
*>&
items
,
QObject
*
missionItemParent
);
QGCMapPolyline
_corridorPolyline
;
QList
<
QList
<
QGeoCoordinate
>>
_transectSegments
;
///< Internal transect segments including grid exit, turnaround and internal camera points
...
...
src/MissionManager/SurveyComplexItem.cc
View file @
a07fe820
...
...
@@ -834,6 +834,12 @@ void SurveyComplexItem::_rebuildTransectsPhase1WorkerSinglePolygon(bool refly)
double
gridAngle
=
_gridAngleFact
.
rawValue
().
toDouble
();
double
gridSpacing
=
_cameraCalc
.
adjustedFootprintSide
()
->
rawValue
().
toDouble
();
if
(
gridSpacing
<
0.5
)
{
// We can't let gridSpacing get too small otherwise we will end up with too many transects.
// So we limit to 0.5 meter spacing as min and set to huge value which will cause a single
// transect to be added.
gridSpacing
=
100000
;
}
gridAngle
=
_clampGridAngle90
(
gridAngle
);
gridAngle
+=
refly
?
90
:
0
;
...
...
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