Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
728c1319
Commit
728c1319
authored
Jan 13, 2020
by
Valentin Platzgummer
Browse files
original dijkstra faster
parent
8d2e42c4
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Paths/benchmarkDijkstra.wima
0 → 100644
View file @
728c1319
This diff is collapsed.
Click to expand it.
src/Wima/WimaPlaner.cc
View file @
728c1319
...
...
@@ -672,12 +672,17 @@ bool WimaPlaner::calcShortestPath(const QGeoCoordinate &start, const QGeoCoordin
using
namespace
GeoUtilities
;
using
namespace
PolygonCalculus
;
QList
<
QPointF
>
path2D
;
auto
startTime
=
std
::
chrono
::
high_resolution_clock
::
now
();
bool
retVal
=
PolygonCalculus
::
shortestPath
(
toQPolygonF
(
toCartesian2D
(
_joinedArea
.
coordinateList
(),
/*origin*/
start
)),
/*start point*/
QPointF
(
0
,
0
),
/*destination*/
toCartesian2D
(
destination
,
start
),
/*shortest path*/
path2D
);
path
.
append
(
toGeo
(
path2D
,
/*origin*/
start
));
auto
duration
=
std
::
chrono
::
duration_cast
<
std
::
chrono
::
microseconds
>
(
std
::
chrono
::
high_resolution_clock
::
now
()
-
startTime
).
count
();
qWarning
()
<<
"WimaPlaner::calcShortestPath: time "
<<
duration
<<
" us"
;
return
retVal
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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