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
ef3311f5
Commit
ef3311f5
authored
Nov 05, 2019
by
Valentin Platzgummer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
circular survey node distribiution for transects optimized (delta alpha ...)
parent
be94fe7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
Circle.cc
src/Wima/Circle.cc
+1
-1
CircularSurveyComplexItem.cc
src/Wima/CircularSurveyComplexItem.cc
+6
-3
No files found.
src/Wima/Circle.cc
View file @
ef3311f5
...
...
@@ -107,7 +107,7 @@ QList<QPointF> Circle::approximate(double angleDiscretisation) const
QList
<
QPointF
>
Circle
::
approximateSektor
(
int
numberOfCorners
,
double
alpha1
,
double
alpha2
)
const
{
if
(
numberOfCorners
<
3
)
if
(
numberOfCorners
<
2
)
return
QList
<
QPointF
>
();
return
approximateSektor
((
alpha2
-
alpha1
)
/
double
(
numberOfCorners
-
1
),
alpha1
,
alpha2
);
}
...
...
src/Wima/CircularSurveyComplexItem.cc
View file @
ef3311f5
...
...
@@ -481,15 +481,18 @@ void CircularSurveyComplexItem::_rebuildTransectsPhase1()
for
(
int
k
=
0
;
k
<
entryPoints
.
size
();
k
++
)
{
double
alpha1
=
angle
(
entryPoints
[
k
]);
double
alpha2
=
angle
(
exitPoints
[(
k
+
offset
)
%
entryPoints
.
size
()]);
double
dAlpha
=
alpha2
-
alpha1
;
int
numNodes
=
int
(
ceil
(
dAlpha
/
dalpha
))
+
1
;
QList
<
QPointF
>
sectorPath
=
circle
.
approximateSektor
(
double
(
dalpha
)
,
alpha1
,
alpha2
);
QList
<
QPointF
>
sectorPath
=
circle
.
approximateSektor
(
numNodes
,
alpha1
,
alpha2
);
// use shortestPath() here if necessary, could be a problem if dr >>
if
(
sectorPath
.
size
()
>
0
)
transectPath
.
append
(
sectorPath
);
}
}
else
if
(
originInside
)
{
// circle fully inside polygon
QList
<
QPointF
>
sectorPath
=
circle
.
approximateSektor
(
double
(
dalpha
),
0
,
2
*
M_PI
);
// circle fully inside polygon
int
numNodes
=
int
(
ceil
(
2
*
M_PI
/
dalpha
))
+
1
;
QList
<
QPointF
>
sectorPath
=
circle
.
approximateSektor
(
numNodes
,
0
,
2
*
M_PI
);
// use shortestPath() here if necessary, could be a problem if dr >>
transectPath
.
append
(
sectorPath
);
}
...
...
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