Estimated Time of Arrival Calculation
Characteristic
Short description
Estimated Time of Arrival ETA (Estimated Time of Arrival) is the time when a ship, vehicle, aircraft, cargo or emergency service is expected to arrive at a certain place. (ETA ETA (Estimated Time of Arrival) is the time when a ship, vehicle, aircraft, cargo or emergency service is expected to arrive at a certain place.) is the time when a vehicle The term vehicle describes what is being routed or planned for. Vehicles are used in route calculation, distance matrix calculation and effectively also in tour planning. In route calculation, vehicle properties like overall size, weight and speed are in focus. In tour planning, it is vehicle properties like capacity and availability. Commonly a vehicle is motorized, like a truck - including its trailer or a car. However also a bike or even a pedestrian are included in this definition. is expected to arrive at a certain place. The PTV xRoute service offers the possibility to update all route-related information, in order to estimate more precisely the arrival time.
Use
ETA Calculation is not enabled by default. To activate it, the user have to send both a pathWaypoint and ETACalculationOptions.
Detailed Consideration
To update the time of arrival of a vehicle, The PTV xRoute service requires the current route A route corresponds to a path of a vehicle through the underlying transport network. The main attributes of a route are the distance and the time that the vehicle travels along the path. that the driver is following (contained in the pathWaypoint) and the current vehicle position (contained in the etaCalculationOptions).
Path Waypoint
PathWaypoint is a type of InputWaypoint that contain an EncodedPath. The encodedPath of a route can be requested with the encodedPath result field. It contains all route-related information previously calculated. It will be used to update arrival time according to the current vehicle position.
ETA Calculation Options
ETACalculationOptions is part of
RouteOptions.
It contains all data relevant to the calculation of the estimated time of arrival.
The VehiclePosition contains all vehicle-related information.
There are two types of vehicle positions that describe the actual state of the vehicle:
PositionEnRoute and
PositionAtStop.
Position en route
The PositionEnRoute describes states where vehicles are driving. It contains 4 fields:-
The
currentLocation field
is the current geographic location of the vehicle, for example the latitude and longitude that indicates the on-board GPS.
If the given position is away from the nearest segment of the previous computed route (contained in the given encodedPath) for more than 450 m, a new route is calculated.
This value is to be adapted according the GPS positioning precision and the vehicle speed. For example, in rural areas where GPS precision is low, it should be enlarged to reflect the uncertainty, while it can be reduced if the vehicle speed is relatively slow. Also, setting this value high enough will ensure that the vehicle will use the same EncodedPath that was precalculated, without a new route recalculation.
- The indexOfNextWaypoint field indicates what is the next waypoint A waypoint is a geographic location used to specify start, destination and possible stopovers for a route. that the truck serves. This field is required and is relevant for cases where the vehicle trip passes by a waypoint for more than once.
-
The
heading
is an optional parameter. If sent, it describes the absolute direction of the vehicle. For example, an on-board accelerometer can give this heading value.
It is used for a better linking to the road network with this pattern:
- A first search is performed around of the given vehicle position. The PTV xRoute service searches for the nearest pathwaypoint road segment that matches a tolerance of +- headingTolerance.
- If no segments match the headingTolerance within 450 m, a new route is computed, searching for the nearest road segment that matches the +/- heading tolerance.
- If no segments found, a new route is computed ignoring the heading. The result will contain a HeadingIgnoredLimitation.
-
The
headingTolerance
is an optional parameter that will be used only if the heading is set.
It describes the angle tolerance around the heading of the vehicle, to be considered while searching for the nearest road segment.
- If unset, the default value of 45 degrees will be used.
- If this field is defined, while the heading is not set, it will not be used and the result will contain a HeadingToleranceIgnoredLimitation.
Position at stop
The PositionAtStop describes the state where the vehicle is located on a waypoint. In this VehiclePosition, the vehicle does not drive and is performing service time. This way, it is required to specify the status of the service at this waypoint. In order to do that, the user must send one of the three ServiceStatus:- Arrived: Service not started yet but vehicle arrived at stop.
- ServiceStarted: Service at stop has started and is currently being performed. For this particular service status, the required field perfomedSeviceTime is mandatory to inform the PTV xRoute service about the actual state of the service. The remaining service time at this stop is the originally planned service time minus the parameter performedServiceTime. No service needs to be performed at this stop any more if performedServiceTime is greater than or equal to the originally planned service time.
- ServiceCompleted: Service at stop is completed.
Results
The vehicle position will be inserted as the first waypoint of the resulting route in the list of waypoints. Its name will be VEHICLE_POSITION. Even though it may be redundant for a position at a stop, but omitting it would result in a route with only one waypoint when being at the last waypoint. For consistency reasons there will also be a WAYPOINT_EVENT and a TOUR_EVENT in the list of route events, if requested. The service time will always be 0.Related Topics
Showcase | Calculate Estimated Time of Arrival |
Integration sample | Routing with Estimated Time of Arrival |