From 5f340428056f8d9ee0d4d84ab20a44d4b335f025 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Mon, 26 Feb 2018 15:21:55 -0500 Subject: [PATCH 1/4] Add WheelchairAccessible documentation --- gtfs-realtime/spec/en/reference.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 14e9b93e8..dedfa144f 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -49,6 +49,7 @@ Fields labeled as **experimental** are subject to change and not yet formally ad * [StopTimeUpdate](#message-stoptimeupdate) * [StopTimeEvent](#message-stoptimeevent) * [ScheduleRelationship](#enum-schedulerelationship) + * [WheelchairAccessible](#enum-wheelchairaccessible) * [VehiclePosition](#message-vehicleposition) * [TripDescriptor](#message-tripdescriptor) * [ScheduleRelationship](#enum-schedulerelationship-1) @@ -143,6 +144,7 @@ Note that the update can describe a trip that has already completed.To this end, | **stop_time_update** | [StopTimeUpdate](#message-stoptimeupdate) | Conditionally required | Many | Updates to StopTimes for the trip (both future, i.e., predictions, and in some cases, past ones, i.e., those that already happened). The updates must be sorted by stop_sequence, and apply for all the following stops of the trip up to the next specified stop_time_update. At least one stop_time_update must be provided for the trip unless the trip.schedule_relationship is CANCELED - if the trip is canceled, no stop_time_updates need to be provided. | | **timestamp** | [uint64](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Optional | One | Moment at which the vehicle's real-time progress was measured. In POSIX time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC). | | **delay** | [int32](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Optional | One | The current schedule deviation for the trip. Delay should only be specified when the prediction is given relative to some existing schedule in GTFS.
Delay (in seconds) can be positive (meaning that the vehicle is late) or negative (meaning that the vehicle is ahead of schedule). Delay of 0 means that the vehicle is exactly on time.
Delay information in StopTimeUpdates take precedent of trip-level delay information, such that trip-level delay is only propagated until the next stop along the trip with a StopTimeUpdate delay value specified.
Feed providers are strongly encouraged to provide a TripUpdate.timestamp value indicating when the delay value was last updated, in order to evaluate the freshness of the data.
**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future.| +| **wheelchair_accessible** | [WheelchairAccessible](#enum-wheelchairaccessible) | Optional | One | If provided, can overwrite the *wheelchair_accessible* value from the static GTFS. | ## _message_ StopTimeEvent @@ -190,6 +192,19 @@ The relation between this StopTime and the static schedule. | **SKIPPED** | The stop is skipped, i.e., the vehicle will not stop at this stop. Arrival and departure are optional. | | **NO_DATA** | No data is given for this stop. It indicates that there is no realtime information available. When set NO_DATA is propagated through subsequent stops so this is the recommended way of specifying from which stop you do not have realtime information. When NO_DATA is set neither arrival nor departure should be supplied. | +## _enum_ WheelchairAccessible + +If a particuliar trip is accessible to wheelchair. When available, this value should overwrite the _wheelchair_accessible_ value from the static GTFS. + +#### Values + +| _**Value**_ | _**Comment**_ | +|-------------|---------------| +| **NO_VALUE** | The trip doesn't have information about wheelchair accessibility. This is the **default** behavior. If the static GTFS contains a _wheelchair_accessible_ value, it won't be overwritten. | +| **UNKNOWN** | The trip has no accessibility value present. This value will overwrite the value from the GTFS. | +| **WHEELCHAIR_ACCESSIBLE** | The trip is wheelchair accessible. This value will overwrite the value from the GTFS. | +| **WHEELCHAIR_INACCESSIBLE** | The trip is **not** wheelchair accessible. This value will overwrite the value from the GTFS. | + ## _message_ VehiclePosition Realtime positioning information for a given vehicle. From e8633baf95f99c2b774d41f602c8cc0640bfa74c Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Mon, 26 Feb 2018 15:33:18 -0500 Subject: [PATCH 2/4] Add WheelchairAccessible to proto --- gtfs-realtime/proto/gtfs-realtime.proto | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 76057b9d4..5ea22509a 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -271,6 +271,32 @@ message TripUpdate { // NOTE: This field is still experimental, and subject to change. It may be // formally adopted in the future. optional int32 delay = 5; + + enum WheelchairAccessible { + // The trip doesn't have information about wheelchair accessibility. + // This is the **default** behavior. If the static GTFS contains a + // _wheelchair_accessible_ value, it won't be overwritten. + NO_VALUE = 0; + + // The trip has no accessibility value present. + // This value will overwrite the value from the GTFS. + UNKNOWN = 1; + + // The trip is wheelchair accessible. + // This value will overwrite the value from the GTFS. + WHEELCHAIR_ACCESSIBLE = 2; + + // The trip is **not** wheelchair accessible. + // This value will overwrite the value from the GTFS. + WHEELCHAIR_INACCESSIBLE = 3; + + // 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. + extensions 1000 to 1999; + } + optional WheelchairAccessible wheelchair_accessible = 6 + [default = NO_VALUE]; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and From 967397a776f941d9ff02f15ac330b964cdd8b01a Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Tue, 27 Feb 2018 10:01:40 -0500 Subject: [PATCH 3/4] Use same enum value as what a static GTFS would define. --- gtfs-realtime/proto/gtfs-realtime.proto | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 5ea22509a..d2d0cd4e6 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -276,19 +276,19 @@ message TripUpdate { // The trip doesn't have information about wheelchair accessibility. // This is the **default** behavior. If the static GTFS contains a // _wheelchair_accessible_ value, it won't be overwritten. - NO_VALUE = 0; + NO_VALUE = -1; // The trip has no accessibility value present. // This value will overwrite the value from the GTFS. - UNKNOWN = 1; + UNKNOWN = 0; // The trip is wheelchair accessible. // This value will overwrite the value from the GTFS. - WHEELCHAIR_ACCESSIBLE = 2; + WHEELCHAIR_ACCESSIBLE = 1; // The trip is **not** wheelchair accessible. // This value will overwrite the value from the GTFS. - WHEELCHAIR_INACCESSIBLE = 3; + WHEELCHAIR_INACCESSIBLE = 2; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and From df0cc4613adfd5fe4aabb4303414818a177cf8a5 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Thu, 15 Mar 2018 15:03:45 -0400 Subject: [PATCH 4/4] Update WheelchairAccessible to be compatible with proto3 --- gtfs-realtime/proto/gtfs-realtime.proto | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index d2d0cd4e6..5ea22509a 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -276,19 +276,19 @@ message TripUpdate { // The trip doesn't have information about wheelchair accessibility. // This is the **default** behavior. If the static GTFS contains a // _wheelchair_accessible_ value, it won't be overwritten. - NO_VALUE = -1; + NO_VALUE = 0; // The trip has no accessibility value present. // This value will overwrite the value from the GTFS. - UNKNOWN = 0; + UNKNOWN = 1; // The trip is wheelchair accessible. // This value will overwrite the value from the GTFS. - WHEELCHAIR_ACCESSIBLE = 1; + WHEELCHAIR_ACCESSIBLE = 2; // The trip is **not** wheelchair accessible. // This value will overwrite the value from the GTFS. - WHEELCHAIR_INACCESSIBLE = 2; + WHEELCHAIR_INACCESSIBLE = 3; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and