Vehicle position is used to provide automatically generated information on the location of a vehicle, such as from a GPS device on board. A single vehicle position should be provided for every vehicle that is capable of providing it.
The trip that the vehicle is currently serving should be given through a TripDescriptor. You can also provide a VehicleDescriptor, which specifies a precise physical vehicle that you are providing updates about. Documentation is provided below.
A timestamp denoting the time when the position reading was taken can be provided. Note that this is different from the timestamp in the feed header, which is the time that this message was generated by the server.
Current passage can also be provided (either as a stop_sequence or stop_id). This is a reference to the stop that the vehicle is either on its way to, or already stopped at.
Position contains the location data within Vehicle Position. Latitude and longitude are required, the other fields are optional. These types of data are:
- Latitude: Degrees north, in the WGS-84 coordinate system
- Longitude: Degrees east, in the WGS-84 coordinate system
- Bearing: Direction that the vehicle is facing
- Odometer: The distance that the vehicle has travelled
- Speed: Momentary speed measured by the vehicle, in meters per second
Vehicle position also allows the agency to specify the congestion level that the vehicle is currently experiencing. Congestion can be classed under the following categories:
- Unknown congestion level
- Running smoothly
- Stop and go
- Severe congestion
It is up to the agency to classify what you class as each type of congestion. Our guidance is that severe congestion is only used in situations where the traffic is so congested that people are leaving their cars.
Vehicle position also allows the agency to specify the degree of passenger occupancy for the vehicle. Occupancy status can be classed under the following categories:
- Many seats available
- Few seats available
- Standing room only
- Crushed standing room only
- Not accepting passengers
Vehicle stop status gives more meaning to the status of a vehicle in relation with a stop that it is currently approaching or is at. It can be set to any of the following values:
- Incoming at: The vehicle is about to arrive at the referenced stop
- Stopped at: The vehicle is stopped at the referenced stop
- In transit to: (Default) The referenced stop is the next stop for the vehicle
Vehicle descriptor describes a precise physical vehicle and can contain any of the following attributes:
- ID: Internal system of identification for the vehicle. Should be unique to the vehicle.
- Label: A user visible label (for example, the name of a train).
- License plate: The actual license plate of the vehicle.