ETA at last Waypoint (xRoute2)
Posted: Thu Sep 05, 2024 3:49 pm
Hi guys,
I've been asked for a proper ETA calculation in the context of xRoute2 based on the routeResponse.
com.ptvgroup.xserver.xroute.RouteResponse. The sample calcutales a simple route is based on
I've been asked for a proper ETA calculation in the context of xRoute2 based on the routeResponse.
com.ptvgroup.xserver.xroute.RouteResponse. The sample calcutales a simple route is based on
- 4 waypoints, each with 3600 seconds service duration.
- No break- and rest rules (not relevant for the story)
- First remark: the subsequence of "TourEvent/Service" and "Waypoint" is
- For the last waypoint the waypoint is listed AFTER the corresponding service.
- For all other waypoints the Service appears in the array AFTER the Waypoint.
- But what I don't get: Why is the last service event's "startsAt" given with a value BEFORE the arrival? Or is the definition of the last waypoint's event more like a "the last thing that happens on a route is the last waypoint" and therefore the "Arrival time" is supposed to be derived via "LastWaypoint.StartsAt - LastService.Duration"?
- Sidenode: the node index of the last waypoint event and it's service event are different. Shouldn't they be equal?