Mission Events#
Fleet API provides mission events information for vehicles within a fleet. Mission events include any updates on the status of a Waypoint and on the status of Waypoint Actions.
Mission Events Object#
The Mission Events object contains only one event object and a Vehicle ID. vehicle_id
indicates the vehicle who this mission
event occurs to. The event can happen on Waypoint level or on Waypoint Action level and can be one of
these types:
In the example below, we show a mission events object with a picked up event.
{
"picked_up": {
"ride_id": "32dc4849-f9c0-44cd-b076-fc1744d77414",
"timestamp": {
"seconds": "1136214245",
"nanos": 999999999
}
},
"vehicle_id": "819f0cda-62dd-4251-9efd-9c4294b4f42d"
}
Event object#
The event object describes which specific event has happened that caused the mission event. Each type of event is caused by a specific action, with a set of prerequisites (if applicable).
Waypoint Reached#
Prerequisite: None
Cause: Vehicle is at Waypoint location.
Effect: Vehicle can start completing the Waypoint Actions.
{
"waypoint_reached": {
"waypoint_id": "5c92848b-1ce8-453a-992e-d0659d9fcc35",
"timestamp": {
"seconds": "1136214245",
"nanos": 999999999
}
},
"vehicle_id": "819f0cda-62dd-4251-9efd-9c4294b4f42d"
}
Boarding Preparation Started#
Prerequisite: Vehicle is at the pick-up location as indicated by a
Waypoint Reached
event.Cause: Vehicle started the boarding preparation process.
Effect: Vehicle is waiting for boarding preparation to be completed.
{
"boarding_preparation_started": {
"ride_id": "32dc4849-f9c0-44cd-b076-fc1744d77414",
"timestamp": {
"seconds": "1136214245",
"nanos": 999999999
}
},
"vehicle_id": "819f0cda-62dd-4251-9efd-9c4294b4f42d"
}
Boarding Preparation Completed#
Prerequisite: Passenger and Vehicle are at the pick-up location indicated by a
Waypoint Reached
event and Boarding Preparation has started indicated by aBoarding Preparation Started
event.Cause: Boarding Preparation is completed successfully.
Effect: The door opens.
{
"boarding_preparation_completed": {
"ride_id": "32dc4849-f9c0-44cd-b076-fc1744d77414",
"timestamp": {
"seconds": "1136214245",
"nanos": 999999999
}
},
"vehicle_id": "819f0cda-62dd-4251-9efd-9c4294b4f42d"
}
Picked Up#
Prerequisite: Passenger is at the pick-up location and boarding preparation is completed as indicated by a
Boarding Preparation Completed
event.Cause: Passenger has entered the vehicle.
Effect:
Picked Up
action is completed. If all actions at the Waypoint are completed, the Vehicle is ready to drive to next Waypoint with Passenger onboard.
{
"picked_up": {
"ride_id": "32dc4849-f9c0-44cd-b076-fc1744d77414",
"timestamp": {
"seconds": "1136214245",
"nanos": 999999999
}
},
"vehicle_id": "819f0cda-62dd-4251-9efd-9c4294b4f42d"
}
Dropped Off#
Prerequisite: Vehicle is at the drop-off location indicated by a
Waypoint Reached
event. The vehicle door is opened.Cause: Passenger has exited the Vehicle.
Effect:
Dropped Off
action is completed. If all actions at the Waypoint are completed, the Vehicle is ready to drive to next Waypoint.
{
"dropped_off": {
"ride_id": "32dc4849-f9c0-44cd-b076-fc1744d77414",
"timestamp": {
"seconds": "1136214245",
"nanos": 999999999
}
},
"vehicle_id": "819f0cda-62dd-4251-9efd-9c4294b4f42d"
}
Not Shown Up#
Prerequisite: Vehicle is at the pick-up location indicated by a
Waypoint Reached
event.Cause: Passenger did not show up at the pick-up location.
Effect: Actions with the same
ride_id
are discarded. Vehicle leaves without picking up the passenger.
{
"not_shown_up": {
"ride_id": "32dc4849-f9c0-44cd-b076-fc1744d77414",
"timestamp": {
"seconds": "1136214245",
"nanos": 999999999
}
},
"vehicle_id": "819f0cda-62dd-4251-9efd-9c4294b4f42d"
}
Waypoint Completed#
Prerequisite: Vehicle is at the Waypoint location indicated by a
Waypoint Reached
event.Cause: All Waypoint Actions have been completed or cancelled.
Effect: Vehicle leaves the Waypoint location.
{
"waypoint_completed": {
"waypoint_id": "5c92848b-1ce8-453a-992e-d0659d9fcc35",
"timestamp": {
"seconds": "1136214245",
"nanos": 999999999
}
},
"vehicle_id": "819f0cda-62dd-4251-9efd-9c4294b4f42d"
}
Route Updated#
Prerequisite: Vehicle has completed all Waypoint Actions as indicated by a
Waypoint Completed
event.Cause: The next Waypoint in the mission has changed. Vehicle’s Route (to next Waypoint only) has been updated.
Effect: Following this Route, Vehicle continues to the next Waypoint location.
{
"route_updated": {
"route": {
"eta": "2024-07-09T14:34:19.997Z",
"lengthMeters": 519,
"geometry": [
{
"latitude": 30.25871,
"longitude": -97.72623
},
{
"latitude": 30.25796,
"longitude": -97.72656
},
{
"latitude": 30.25782,
"longitude": -97.72662
}
]
}
}
}
Mission Events Functionality#
Mission events can either be polled or streamed to stay informed about mission related events for the whole fleet.
Streaming Fleet Mission Events#
Mission events can be streamed durable via the SubscribeToFleetMissionEvents
streaming endpoint,
to receive continuous updates for mission events of the Vehicles in a Fleet.
This allows events to be received as they occur which can be faster and more efficient than frequent polling.
Polling Fleet Mission Events#
Mission events can also be retrieved via a dedicated polling endpoint PollFleetMissionEvents
, to get events associated with Missions of Vehicles inside a Fleet.
Via this polling endpoint, you can retrieve all the events that happened since the last poll.
Mission Events can occur irregularly and might require immediate action. Therefore, it is necessary to repeat the RPC frequently.