Important: To provide Realtime trip information with VehiclePosition feeds, refer to Select a trip with TripDescriptor.
You can use VehiclePosition feeds to provide Realtime trip information about the status of a transit vehicle on a particular trip.
Get vehicle status updates
vehicle_position message can provide information about the current status of the vehicle on a particular trip.
For vehicles that are assigned to a trip: Provide a VehiclePositions feed with a well-matched TripDescriptor, accurate
position information, and a
timestamp at which the position was measured.
You can use a VehiclePosition message when you provide:
- The vehicle’s most updated
timestampof the reading
For every subsequent stop, we use a prediction algorithm to forecast the ETA of the bus at that stop, given its current position. This information is displayed to the user in the app and also affects the search results.
If the latest vehicle position and other information isn't available, the last-known position and other data should be provided with the original position
timestamp measured. Learn more about how data gaps affect realtime feeds.
VehicleDescriptor is necessary to track a trip’s vehicle over time. It should be unique for each feed, and stable during the trip duration. To ensure that the vehicle is trackable, provide the vehicle descriptor
For fixed schedules, the actual delay is displayed:
For frequency based schedules, the arrival time for the next trip displayed without any delay information.
occupancy_status field along with the position of the
vehicle_position message. This will appear in the UI as a graphic indicator.
For bus routes only: Updates that come through the VehiclePosition feed display the Realtime position of vehicles on Google Maps.