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
9fee8ee9
Commit
9fee8ee9
authored
Jul 06, 2017
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bounding extension was too short
Caused intersection failure in some cases
parent
5eb921e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
SurveyMissionItem.cc
src/MissionManager/SurveyMissionItem.cc
+8
-8
No files found.
src/MissionManager/SurveyMissionItem.cc
View file @
9fee8ee9
...
...
@@ -967,8 +967,8 @@ int SurveyMissionItem::_gridGenerator(const QList<QPointF>& polygonPoints, QLis
qCDebug
(
SurveyMissionItemLog
)
<<
"Generate left to right"
;
float
x
=
largeBoundRect
.
topLeft
().
x
()
-
(
gridSpacing
/
2
);
while
(
x
<
largeBoundRect
.
bottomRight
().
x
())
{
float
yTop
=
largeBoundRect
.
topLeft
().
y
()
-
100.0
;
float
yBottom
=
largeBoundRect
.
bottomRight
().
y
()
+
100.0
;
float
yTop
=
largeBoundRect
.
topLeft
().
y
()
-
100
00
.0
;
float
yBottom
=
largeBoundRect
.
bottomRight
().
y
()
+
100
00
.0
;
lineList
+=
QLineF
(
_rotatePoint
(
QPointF
(
x
,
yTop
),
boundingCenter
,
gridAngle
),
_rotatePoint
(
QPointF
(
x
,
yBottom
),
boundingCenter
,
gridAngle
));
qCDebug
(
SurveyMissionItemLog
)
<<
"line("
<<
lineList
.
last
().
x1
()
<<
", "
<<
lineList
.
last
().
y1
()
<<
")-("
<<
lineList
.
last
().
x2
()
<<
", "
<<
lineList
.
last
().
y2
()
<<
")"
;
...
...
@@ -980,8 +980,8 @@ int SurveyMissionItem::_gridGenerator(const QList<QPointF>& polygonPoints, QLis
qCDebug
(
SurveyMissionItemLog
)
<<
"Generate right to left"
;
float
x
=
largeBoundRect
.
topRight
().
x
()
+
(
gridSpacing
/
2
);
while
(
x
>
largeBoundRect
.
bottomLeft
().
x
())
{
float
yTop
=
largeBoundRect
.
topRight
().
y
()
-
100.0
;
float
yBottom
=
largeBoundRect
.
bottomLeft
().
y
()
+
100.0
;
float
yTop
=
largeBoundRect
.
topRight
().
y
()
-
100
00
.0
;
float
yBottom
=
largeBoundRect
.
bottomLeft
().
y
()
+
100
00
.0
;
lineList
+=
QLineF
(
_rotatePoint
(
QPointF
(
x
,
yTop
),
boundingCenter
,
gridAngle
),
_rotatePoint
(
QPointF
(
x
,
yBottom
),
boundingCenter
,
gridAngle
));
qCDebug
(
SurveyMissionItemLog
)
<<
"line("
<<
lineList
.
last
().
x1
()
<<
", "
<<
lineList
.
last
().
y1
()
<<
")-("
<<
lineList
.
last
().
x2
()
<<
", "
<<
lineList
.
last
().
y2
()
<<
")"
;
...
...
@@ -997,8 +997,8 @@ int SurveyMissionItem::_gridGenerator(const QList<QPointF>& polygonPoints, QLis
qCDebug
(
SurveyMissionItemLog
)
<<
"Generate top to bottom"
;
float
y
=
largeBoundRect
.
bottomLeft
().
y
()
+
(
gridSpacing
/
2
);
while
(
y
>
largeBoundRect
.
topRight
().
y
())
{
float
xLeft
=
largeBoundRect
.
bottomLeft
().
x
()
-
100.0
;
float
xRight
=
largeBoundRect
.
topRight
().
x
()
+
100.0
;
float
xLeft
=
largeBoundRect
.
bottomLeft
().
x
()
-
100
00
.0
;
float
xRight
=
largeBoundRect
.
topRight
().
x
()
+
100
00
.0
;
lineList
+=
QLineF
(
_rotatePoint
(
QPointF
(
xLeft
,
y
),
boundingCenter
,
gridAngle
),
_rotatePoint
(
QPointF
(
xRight
,
y
),
boundingCenter
,
gridAngle
));
qCDebug
(
SurveyMissionItemLog
)
<<
"y:xLeft:xRight"
<<
y
<<
xLeft
<<
xRight
<<
"line("
<<
lineList
.
last
().
x1
()
<<
", "
<<
lineList
.
last
().
y1
()
<<
")-("
<<
lineList
.
last
().
x2
()
<<
", "
<<
lineList
.
last
().
y2
()
<<
")"
;
...
...
@@ -1010,8 +1010,8 @@ int SurveyMissionItem::_gridGenerator(const QList<QPointF>& polygonPoints, QLis
qCDebug
(
SurveyMissionItemLog
)
<<
"Generate bottom to top"
;
float
y
=
largeBoundRect
.
topLeft
().
y
()
-
(
gridSpacing
/
2
);
while
(
y
<
largeBoundRect
.
bottomRight
().
y
())
{
float
xLeft
=
largeBoundRect
.
topLeft
().
x
()
-
100.0
;
float
xRight
=
largeBoundRect
.
bottomRight
().
x
()
+
100.0
;
float
xLeft
=
largeBoundRect
.
topLeft
().
x
()
-
100
00
.0
;
float
xRight
=
largeBoundRect
.
bottomRight
().
x
()
+
100
00
.0
;
lineList
+=
QLineF
(
_rotatePoint
(
QPointF
(
xLeft
,
y
),
boundingCenter
,
gridAngle
),
_rotatePoint
(
QPointF
(
xRight
,
y
),
boundingCenter
,
gridAngle
));
qCDebug
(
SurveyMissionItemLog
)
<<
"y:xLeft:xRight"
<<
y
<<
xLeft
<<
xRight
<<
"line("
<<
lineList
.
last
().
x1
()
<<
", "
<<
lineList
.
last
().
y1
()
<<
")-("
<<
lineList
.
last
().
x2
()
<<
", "
<<
lineList
.
last
().
y2
()
<<
")"
;
...
...
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