Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion gtfs-realtime/proto/gtfs-realtime.proto
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ message TripUpdate {
// stops in the trip are considered to be unspecified as well.
// Neither arrival nor departure should be supplied.
NO_DATA = 2;

// The vehicle is operating a trip defined in GTFS frequencies.txt with exact_times = 0.
// This value should not be used for trips that are not defined in GTFS frequencies.txt,
// or trips in GTFS frequencies.txt with exact_times = 1. Trips containing StopTimeUpdates
Expand Down Expand Up @@ -393,6 +393,15 @@ message VehiclePosition {
}
optional OccupancyStatus occupancy_status = 9;

// A percentage value representing the degree of passenger occupancy of the vehicle.
// The values are represented as an integer without decimals. 0 means 0% and 100 means 100%.
// The value 100 should represent the total maximum occupancy the vehicle was designed for,
// including both seated and standing capacity, and current operating regulations allow.
// It is possible that the value goes over 100 if there are currently more passengers than what the vehicle was designed for.
// The precision of occupancy_percentage should be low enough that you can't track a single person boarding and alighting for privacy reasons.
// This field is still experimental, and subject to change. It may be formally adopted in the future.
optional uint32 occupancy_percentage = 10;

// The extensions namespace allows 3rd-party developers to extend the
// GTFS Realtime Specification in order to add and evaluate new features and
// modifications to the spec.
Expand Down
4 changes: 3 additions & 1 deletion gtfs-realtime/spec/en/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ Realtime positioning information for a given vehicle.
| **timestamp** | [uint64](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Optional | One | Moment at which the vehicle's position was measured. In POSIX time (i.e., number of seconds since January 1st 1970 00:00:00 UTC). |
| **congestion_level** | [CongestionLevel](#enum-congestionlevel) | Optional | One |
| _**occupancy_status**_ | _[OccupancyStatus](#enum-occupancystatus)_ | _Optional_ | One | The degree of passenger occupancy of the vehicle.<br>**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future.|
| **occupancy_percentage** | [uint32](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Optional | One | A percentage value representing the degree of passenger occupancy of the vehicle. The value 100 should represent total the maximum occupancy the vehicle was designed for, including both seating and standing capacity, and current operating regulations allow. It's not impossible that the value goes over 100 if there are currently more passenger than the vehicle was designed for. The precision of precision should be low enough that you can't track a single person boarding and alighting for privacy reasons.<br>**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. |


## _enum_ VehicleStopStatus

Expand Down Expand Up @@ -364,7 +366,7 @@ To specify a single trip instance, in many cases a `trip_id` by itself is suffic
* If the trip lasts for more than 24 hours, or is delayed such that it would collide with a scheduled trip on the following day, then `start_date` is required in addition to `trip_id`
* If the `trip_id` field can't be provided, then `route_id`, `direction_id`, `start_date`, and `start_time` must all be provided

In all cases, if `route_id` is provided in addition to `trip_id`, then the `route_id` must be the same `route_id` as assigned to the given trip in GTFS trips.txt.
In all cases, if `route_id` is provided in addition to `trip_id`, then the `route_id` must be the same `route_id` as assigned to the given trip in GTFS trips.txt.

The `trip_id` field cannot, by itself or in combination with other TripDescriptor fields, be used to identify multiple trip instances. For example, a TripDescriptor should never specify trip_id by itself for GTFS frequencies.txt exact_times=0 trips because start_time is also required to resolve to a single trip instance starting at a specific time of the day. If the TripDescriptor does not resolve to a single trip instance (i.e., it resolves to zero or multiple trip instances), it is considered an error and the entity containing the erroneous TripDescriptor may be discarded by consumers.

Expand Down