Skip to main content

Advanced ETA

Contents

Available in CoPilot 10.9 and Later

The Advanced ETA feature allows you to compute arrival times with greater accuracy to help keep drivers on schedule and to provide better delivery estimates for customers. Advanced ETA lets you incorporate more information about each stop when generating a route, including:

  • Custom display information on the driver’s device. You can provide the driver with a custom note about the stop and a unique company ID and icon to identify the stop. You can also display custom information under the chevron that shows the driver where they are on the map.

  • Specialized routing settings. You can set side-of-street routing to ensure the route generated by CoPilot takes the driver to the stop on the same side of the street as the direction of travel.

  • Time-window settings. You can set a time window for the earliest and latest time a stop should be reached as well as a planned duration (dwell time) for the stop to enhance ETA for the following stop.

Create a Stop with StopBuilder

Advanced ETA settings are available through additional, optional methods when a stop is created via a StopBuilder object. The added methods include:

Method Name Return Type Description
setID(String)
StopBuilder
Sets a custom ID for the stop.
setNote(String)
StopBuilder
Sets a custom note against the stop that will be shown on the stop details screen within the CoPilot UI.
setEarliestArrivalTime (ArrivalTimeWindowInfo)
StopBuilder
Sets the earliest acceptable arrival time when the stop can be reached. If no date is given, the current date will be used. (There will be a callback notification if the ETA is outside of that time window.) This method is optional but, if used, setLatestArrivalTime and setPlannedDuration need to be used also.
setLatestArrivalTime (ArrivalTimeWindowInfo)
StopBuilder
Sets the latest arrival time for the time window during which the stop should be reached. If no date is given, the current date will be used.
setPlannedDuration(int)
StopBuilder
Sets the planned duration for the stop. This should reflect all the non-driving (dwell) time at the stop.
setSideOfStreetAdherence(StopSideAdherenceLevel)
StopBuilder
Sets side-of-street adherence for the stop.
setCustomFields (HashMap<String,String> customFields)
StopBuilder
Sets custom fields for the stop.
setIcon
StopBuilder
Sets the stop icon image. Name of the image should be passed. An image with the matching name must be saved in the CoPilot directory under the “skin” folder.

Sample Code

StopBuilder latLonStop = StopBuilder.fromLatLon(new Coordinate(40.368420, -74.655036));
ArrivalTimeWindowInfo startWindow = new ArrivalTimeWindowInfo(22, 5, 2018, 780);
ArrivalTimeWindowInfo endWindow = new ArrivalTimeWindowInfo(22, 5, 2018, 840);
latLonStop.setEarliestArrivalTime(startWindow);
latLonStop.setLatestArrivalTime(endWindow);
latLonStop.setPlannedDurationMinutes(12);
latLonStop.setSideOfStreetAdherence(StopSideAdherenceLevel.MODERATE);
latLonStop.setID("This is ID");
latLonStop.setNote("This is note");
HashMap<String,String> customFields = new HashMap<String,String>();
customFields.put("CUSTOMCHEVRONDISPLAY", "This is custom chevron message");
latLonStop.setCustomFields(customFields);
latLonStop.setIcon("myStopIcon");
try {
  Stop sampleStopA = latLonStop.setName("Trimble Maps").geocode(GeocodeSearchType.BEST_MATCH).get(0);
} catch (GeocodingException e)
{
  e.printStackTrace();
}
NSError *error = nil;
Coordinate *coordinate =
[[Coordinate alloc] initWithLatLon:40.368420 withLon:74.655036];
StopBuilder *stopBuilder = [StopBuilder fromLatLon:coordinate];
ArrivalTimeWindowInfo* startWindow = [[ArrivalTimeWindowInfo alloc] initWith:22 withMonth:5 withYear:2018 withMinutesFromMidnight:780];
ArrivalTimeWindowInfo* endWindow = [[ArrivalTimeWindowInfo alloc] initWith:22 withMonth:5 withYear:2018 withMinutesFromMidnight:840];
stopBuilder.arrivalWindowStart = startWindow;
stopBuilder.arrivalWindowEnd = endWindow;
stopBuilder.plannedDuration = 12;
stopBuilder.ssal = CP_SSAL_MODERATE;
stopBuilder.stopid = @"This is ID";
stopBuilder.note = @"This is note";
NSMutableDictionary* customFields = [[NSMutableDictionary alloc] init];
[customFields setObject:@"CUSTOMCHEVRONDISPLAY" forKey:@"This is custom chevron message"];
stopBuilder.customFields = customFields;
stopBuilder.icon = @"myStopIcon";
NSArray *stop = [stopBuilder geocode:BEST_MATCH withError:&error];

Get Stop Information

The current ETA for the stop can be retrieved via additional methods in a Stop object. You can also get information entered about the stop, as well as additional information, such as the side of the street the stop is on. These methods include:

Method Name Return Type Description
getID()
String
Gets the Stop ID for the the stop object.
getNote()
String
Gets the note associated with the stop object.
getEarliestArrivalTime()
ArrivalTimeWindowInfo
Gets the optional early time for the time window where a stop should be reached.
getLatestArrivalTime()
ArrivalTimeWindowInfo
Gets the latest time for the time window where a stop should be reached.
getPlanned DurationMinutes()
int
Gets the expected Dwell/Wait time that is added to a stop.
getSideOfStreet()
StopSide
Gets the side of the street that the stop is on.
getSideOfStreetAdherence()
StopSideAdherenceLevel
Gets the side of street adherence level that the routing uses to calculate its route to this stop.
getETA()
String
Gets the current ETA for this stop.
getCustomFields()
Hashmap<String,String>
Gets a Hashmap of the optional custom fields for this stop.
getIcon()
String
Get the stop icon image name for the stop object.
getTimeZoneOffset()
int
Get time zone offset for the stop object.

Stay Informed About Arrival Times

With the additional stop information, Advanced ETA can calculate whether a driver is early, on time, late or at risk of being late for a stop. It can then create a callback when the driver’s stop status changes for a particular stop—for example, from “on time” to “at risk” of being late. The callback is also called when a new trip containing advanced ETA information is sent to CoPilot. CoPilot returns the status of each stop, and you should wait for this callback before retrieving the ETA from a stop.

The onStopArrivalStatusChange callback returns a list of stops who status have been changed.

If you would like to optimize your stop order to better meet all time windows, we recommend using our Advanced Route Optimization add-on feature.

Last updated July 2, 2024.
Contents