[Interest] Concepts behind Route and navigation
Marek.FloriaĆczyk
marek.florianczyk at gmail.com
Tue Jul 17 10:24:50 CEST 2018
Hi
I'm working on car navigation application, I'm using mapboxgl for that.
I have based my app on this example:
https://github.com/tmpsantos/qmapboxglapp/tree/tmpsantos-cheapruler
All is well when I calculate route from start point to end point at the beginning of the
journey. Problem occurs when user veers off the route and I need to recalculate, car is
moving ahead so I need to calculate new route in the direction the car is moving, cant really
do that in a RouteQuery so I'm setting additional Waypoint 10 meters ahead from current
position - Is there any better way to do that?
Worst of all, when I do that I have additional RouteSegment but Route.path does not include
all coordinates from RouteSegments.
In other words. First time I calculate the Route
Route.path.length==RoteSegment[0-n].path.length-n
(n-number of segments)
When I include additional Waypoint to have Route calculated in direction of driving
Route.path.length!=RoteSegment[0-n].path.length-n
In second case I can't calculate on which RouteSegment I'm currently, because Route.path
does not have all coordinates from RouteSegment, even If I exclude RouteSegment created
by Waypoint (btw it should have waypoint and waypoinValid properties but it does not have
it) it still does not agree with Route.path.
Can someone shed some light why this was designed in this way. I mean is there a better
way of calculating route along the car driving path and why Route.path does not include all
points from RouteSegment.path when additional waypoint is included.
Algorithm for calculating current RouteSegment index does not work in second case.
Best Regards
Marek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180717/16f06f91/attachment.html>
More information about the Interest
mailing list