Advanced ETA
Contents
Available in CoPilot 10.9 and Later
The Advanced ETA feature enhances route planning by providing more accurate arrival times, helping drivers stay on schedule and improving delivery estimates for customers. This feature allows you to include additional details about each stop when generating a route, such as:
-
Custom display information on the driver’s device. Add a custom note, a unique company ID, and an icon to identify the stop. You can also display custom information under the chevron that shows the driver’s current location on the map.
-
Specialized routing settings. Enable side-of-street routing to ensure the CoPilot directs the driver to the correct side of the street for the stop.
-
Time-window settings. Define the earliest and latest acceptable arrival times for a stop, along with a planned duration (dwell time), to improve ETA calculations for subsequent stops.
Create a Stop with StopBuilder
Advanced ETA settings can be configured using additional methods when creating a stop via the StopBuilder object. These methods include:
Method Name | Return Type | Description |
---|---|---|
setID(String) |
StopBuilder | Sets a custom ID for the stop. |
setNote(String) |
StopBuilder | Adds a custom note to the stop, displayed on the stop details screen in the CoPilot UI. |
setEarliestArrivalTime (ArrivalTimeWindowInfo) |
StopBuilder | Sets the earliest acceptable arrival time for the stop. If no date is provided, the current date is used. This method is optional but must be used with setLatestArrivalTime and setPlannedDuration. |
setLatestArrivalTime (ArrivalTimeWindowInfo) |
StopBuilder | Sets the latest acceptable arrival time for the stop. If no date is provided, the current date is used. |
setPlannedDuration(int) |
StopBuilder | Specifies the planned duration (dwell time) for the stop. |
setSideOfStreetAdherence(StopSideAdherenceLevel) |
StopBuilder | Configures side-of-street adherence for the stop. |
setCustomFields (HashMap<String,String> customFields) |
StopBuilder | Adds custom fields to the stop. |
setIcon |
StopBuilder | Sets the stop icon image. The image name must match a file 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
Retrieve current ETA and other details about a stop using additional methods in the Stop object. These methods include:
Method Name | Return Type | Description |
---|---|---|
getID() |
String | Retrieves the Stop ID for the stop object. |
getNote() |
String | Retrieves the note associated with the stop object. |
getEarliestArrivalTime() |
ArrivalTimeWindowInfo | Retrieves the earliest acceptable arrival time for the stop. |
getLatestArrivalTime() |
ArrivalTimeWindowInfo | Retrieves the latest acceptable arrival time for the stop. |
getPlanned DurationMinutes() |
int | Retrieves the planned dwell time for the stop. |
getSideOfStreet() |
StopSide | Retrieves the side of the street where the stop is located. |
getSideOfStreetAdherence() |
StopSideAdherenceLevel | Retrieves the side-of-street adherence level used for routing to the stop. |
getETA() |
String | Retrieves the current ETA for the stop. |
getCustomFields() |
Hashmap<String,String> | Retrieves a HashMap of custom fields for the stop. |
getIcon() |
String | Retrieves the stop icon image name. |
getTimeZoneOffset() |
int | Retrieves the time zone offset for the stop object. |
Stay Informed About Arrival Times
Advanced ETA can determine whether a driver is early, on time, late, or at risk of being late for a stop. It triggers a callback when the stop status changes (e.g., from “on time” to “at risk”). This callback is also triggered when a new trip with advanced ETA information is sent to CoPilot. Wait for this callback before retrieving the ETA for a stop.
The onStopArrivalStatusChange callback returns a list of stops whose statuses have changed.
For optimizing stop order to meet all time windows, consider using the Advanced Route Optimization add-on feature.