Hello,
I've encountered a weird issue and I thought that it would be better to check with you. What we do is, before a drive, we calculate the route between points A -> B and we save the polyline and the total distance/time. After the drive has started, we recalculate the route every 10 minutes using A -> CarPosition -> B as waypoints and, if the difference to the initial route is bigger than a set threshold, we save the new route (polyline, distance and time). At this point, we do not overwrite the initial polyline, we just save the new one separately.
What happened: at some point, the calculated route had a 36 minute/37 km difference, which triggered the save. When we looked over the saved result, the polyline was identical, but the time and distance differed. The CarPosition point was 100% on the route indicated by the first route.
To summarize:
1) A -> B : 187 km, ~2.42h
2) A -> CarPosition -> B : 223 km, 2.9h
Car position point was on the route given by 1) and 2) has the same polyline as 1).
Also, this only happened a couple of times and does not reproduce anymore.
Are we missing something?
Thanks,
John
Different distance for identical polyline
-
- Posts: 25
- Joined: Tue Dec 03, 2019 11:27 am
- Bernd Welter
- Site Admin
- Posts: 2695
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: Different distance for identical polyline
Hello John,
quite difficult to give a precise answer if I just have some few generic statements. Anyhow, maybe I found the cause for this. How about "GPS coordinate drift"?
Bernd
quite difficult to give a precise answer if I just have some few generic statements. Anyhow, maybe I found the cause for this. How about "GPS coordinate drift"?
- Imagine the route SOUTH to NORTH is the original one: travel time is 1:07 for a distance of 69.9km
- Now while the truck is driving from SOUTH to NORTH you gather coordinates. Most times on the highway or east of it
- In my example the coordinate is drifted to the WEST
- The route SOUTH-WEST-NORTH is 84.6km with a travel time of 1:20. At a first glance in the global map it looks like the route is the same as SOUTH-NORTH.
- If you zoom close you see that SOUTH-WEST needs to return towards SOUTH to reach WEST. Furthermore the part from WEST to NORTH starts heading towards the south.
Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany
Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning...
Technical Partner Manager Developer Components
PTV Logistics - Germany
Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning...
-
- Posts: 25
- Joined: Tue Dec 03, 2019 11:27 am
Re: Different distance for identical polyline
Hello,
That seems plausible, we'll take a closer look to the polyline to see if we missed the "detour" because of overlapping.
Thank you,
John
That seems plausible, we'll take a closer look to the polyline to see if we missed the "detour" because of overlapping.
Thank you,
John
- Bernd Welter
- Site Admin
- Posts: 2695
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: Different distance for identical polyline
Hi John,
if my message above isn't the solution please return to me 1:1 so I can create a custom ticket and we can exchange your requests.
But hopefully this isn't necessary.
PS: in xServer1 the WaypointDesc class offers a parameter "heading":
There's no such parameter available in xServer2.20 so far.
Best regards,
Bernd
if my message above isn't the solution please return to me 1:1 so I can create a custom ticket and we can exchange your requests.
But hopefully this isn't necessary.
PS: in xServer1 the WaypointDesc class offers a parameter "heading":
I'd expect that aplpying this parameter with the value "0" (driving to th north) the LINKING step would assign the current vehicle position to the proper highway lane in the EAST even if the coordinate is located in the WEST.The angle which specifies an additional constraint when linking a certain location to the road network. This means that the location will be linked to the geographically nearest segment which has approximately the same orientation as described in the heading. The tolerance can be given in the profile.
Legal angle values are 0 to 360 related to north in [deg] (clockwise).
This parameter is optional and has only an effect when using LinkType NEXT_SEGMENT, AUTO_LINKING or TI_LINKING and headingTolerance being configured in the profile.
There's no such parameter available in xServer2.20 so far.
Best regards,
Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany
Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning...
Technical Partner Manager Developer Components
PTV Logistics - Germany
Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning...
- Bernd Welter
- Site Admin
- Posts: 2695
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: Different distance for identical polyline
By the way:
please take a look at this approach: With xRoute2 we provide access to an ETA calculation based on an initial route and the current vechicle position.
In short terms:
- compute the initial route and request it as EncodedPath
- whenever you get a position update send the path and the new position
- you get a EtaCalculationReport in the response
Best regards,
Bernd
please take a look at this approach: With xRoute2 we provide access to an ETA calculation based on an initial route and the current vechicle position.
In short terms:
- compute the initial route and request it as EncodedPath
- whenever you get a position update send the path and the new position
- you get a EtaCalculationReport in the response
Best regards,
Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany
Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning...
Technical Partner Manager Developer Components
PTV Logistics - Germany
Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning...