From 16d2289e17c35bbd74c54db7166f21fb536ecf26 Mon Sep 17 00:00:00 2001 From: juanborre Date: Tue, 6 Aug 2019 13:55:17 -0400 Subject: [PATCH 01/17] Reserve extension range >= 9000 for internal use by any organization --- gtfs-realtime/CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtfs-realtime/CHANGES.md b/gtfs-realtime/CHANGES.md index 8510020d5..a687f1eac 100644 --- a/gtfs-realtime/CHANGES.md +++ b/gtfs-realtime/CHANGES.md @@ -68,6 +68,8 @@ To allow producers to add custom information to a GTFS Realtime feed, we will ta When possible we should avoid extensions and add fields useful to many agencies to the main specification to avoid fragmentation and extra work for consumers to support various extensions to the spec. Before requesting an extension id, producers should propose adding the field to the specification (see [Adding new fields to GTFS Realtime](#adding-new-fields-to-gtfs-realtime)) +The extension IDs >= 9000 are reserved for private use by GTFS-rt producers. These IDs should only be used to convey information internally to your organization. If you need to publish information in the GTFS-rt you produce, it is encouraged to ask for a new extension ID (see below). + To create a new extension, we will assign a producer the next available extension id, picked incrementally from a list of numbers starting at 1000 and going up and documented in the Extension Registry section found below. These assigned extension ids corresponds to the tag ids available in the "extension" namespace for each GTFS Realtime message definition. Now that the developer has an assigned extension id, they will use that id when extending any and all GTFS Realtime messages. Even if the developer only plans to extend a single message, the assigned extension id will be reserved for ALL messages. From 3e4e2f3d3b81aa0c12c1bb87ef7ac2c1bdbf2053 Mon Sep 17 00:00:00 2001 From: juanborre Date: Wed, 7 Aug 2019 13:06:55 -0400 Subject: [PATCH 02/17] Add extension ID range for private use to the table of extension IDs. --- gtfs-realtime/CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/gtfs-realtime/CHANGES.md b/gtfs-realtime/CHANGES.md index a687f1eac..3d905b977 100644 --- a/gtfs-realtime/CHANGES.md +++ b/gtfs-realtime/CHANGES.md @@ -116,3 +116,4 @@ message MyTripDescriptorExtension { |1008|SEPTA - Southeastern Pennsylvania Transportation Authority|[Gregory Apessos](mailto:GApessos@septa.org)|https://github.com/septadev| |1009|Swiftly|[mike@goswift.ly](mailto:mike@goswift.ly)|[Group Discussion](https://groups.google.com/forum/#!msg/gtfs-realtime/mmnZV6L-2ls/wVWdknhLBwAJ)| |1010|IBI Group|[Ritesh Warade](mailto:transitrealtime@ibigroup.com)|[GitHub proposal for new timestamps in Service Alerts](https://github.com/google/transit/pull/134)| +|\>=9000|Private use| |Range reserved for private use by any organization| From 305306b8ac865df6dd206c08d896bfa36e274e0e Mon Sep 17 00:00:00 2001 From: juanborre Date: Wed, 7 Aug 2019 13:12:53 -0400 Subject: [PATCH 03/17] In the extension IDs table, add links to group and developer for reserved IDs. --- gtfs-realtime/CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/CHANGES.md b/gtfs-realtime/CHANGES.md index 3d905b977..0a1144aec 100644 --- a/gtfs-realtime/CHANGES.md +++ b/gtfs-realtime/CHANGES.md @@ -116,4 +116,4 @@ message MyTripDescriptorExtension { |1008|SEPTA - Southeastern Pennsylvania Transportation Authority|[Gregory Apessos](mailto:GApessos@septa.org)|https://github.com/septadev| |1009|Swiftly|[mike@goswift.ly](mailto:mike@goswift.ly)|[Group Discussion](https://groups.google.com/forum/#!msg/gtfs-realtime/mmnZV6L-2ls/wVWdknhLBwAJ)| |1010|IBI Group|[Ritesh Warade](mailto:transitrealtime@ibigroup.com)|[GitHub proposal for new timestamps in Service Alerts](https://github.com/google/transit/pull/134)| -|\>=9000|Private use| |Range reserved for private use by any organization| +|\>=9000|RESERVED - INTERNAL USE ONLY|[GTFS Community](https://groups.google.com/forum/#!forum/gtfs-realtime)|[Group discussion](https://github.com/google/transit/pull/178/)| From ab00e52c224b162f3c07402d732ff3fe926bb67a Mon Sep 17 00:00:00 2001 From: juanborre Date: Mon, 12 Aug 2019 08:42:06 -0400 Subject: [PATCH 04/17] Limit range for private extension IDs to 9000-9999 --- gtfs-realtime/CHANGES.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtfs-realtime/CHANGES.md b/gtfs-realtime/CHANGES.md index 0a1144aec..34f7ec3be 100644 --- a/gtfs-realtime/CHANGES.md +++ b/gtfs-realtime/CHANGES.md @@ -68,7 +68,7 @@ To allow producers to add custom information to a GTFS Realtime feed, we will ta When possible we should avoid extensions and add fields useful to many agencies to the main specification to avoid fragmentation and extra work for consumers to support various extensions to the spec. Before requesting an extension id, producers should propose adding the field to the specification (see [Adding new fields to GTFS Realtime](#adding-new-fields-to-gtfs-realtime)) -The extension IDs >= 9000 are reserved for private use by GTFS-rt producers. These IDs should only be used to convey information internally to your organization. If you need to publish information in the GTFS-rt you produce, it is encouraged to ask for a new extension ID (see below). +The extension IDs within the range 9000-9999 are reserved for private use by GTFS-rt producers. These IDs should only be used to convey information internally to your organization. Extensions in this range **must not** be used in public feeds. To create a new extension, we will assign a producer the next available extension id, picked incrementally from a list of numbers starting at 1000 and going up and documented in the Extension Registry section found below. @@ -116,4 +116,4 @@ message MyTripDescriptorExtension { |1008|SEPTA - Southeastern Pennsylvania Transportation Authority|[Gregory Apessos](mailto:GApessos@septa.org)|https://github.com/septadev| |1009|Swiftly|[mike@goswift.ly](mailto:mike@goswift.ly)|[Group Discussion](https://groups.google.com/forum/#!msg/gtfs-realtime/mmnZV6L-2ls/wVWdknhLBwAJ)| |1010|IBI Group|[Ritesh Warade](mailto:transitrealtime@ibigroup.com)|[GitHub proposal for new timestamps in Service Alerts](https://github.com/google/transit/pull/134)| -|\>=9000|RESERVED - INTERNAL USE ONLY|[GTFS Community](https://groups.google.com/forum/#!forum/gtfs-realtime)|[Group discussion](https://github.com/google/transit/pull/178/)| +|9000-9999|RESERVED - INTERNAL USE ONLY|[GTFS Community](https://groups.google.com/forum/#!forum/gtfs-realtime)|[Group discussion](https://github.com/google/transit/pull/178/)| From a6bb59e07321bb8be32c9d69f9ad1e05283c2704 Mon Sep 17 00:00:00 2001 From: juanborre Date: Fri, 23 Aug 2019 17:25:23 -0400 Subject: [PATCH 05/17] Add private extension IDs to protobuf.definition --- gtfs-realtime/proto/gtfs-realtime.proto | 45 +++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index e459bf2b0..41858294d 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -46,6 +46,9 @@ message FeedMessage { // GTFS Realtime specification in order to add and evaluate new features and // modifications to the spec. extensions 1000 to 1999; + + // The following extension IDs are reserved for private use by any organization. + extensions 9000 to 9999; } // Metadata about a feed, included in feed messages. @@ -74,6 +77,9 @@ message FeedHeader { // GTFS Realtime specification in order to add and evaluate new features and // modifications to the spec. extensions 1000 to 1999; + + // The following extension IDs are reserved for private use by any organization. + extensions 9000 to 9999; } // A definition (or update) of an entity in the transit feed. @@ -102,6 +108,9 @@ message FeedEntity { // GTFS Realtime Specification in order to add and evaluate new features and // modifications to the spec. extensions 1000 to 1999; + + // The following extension IDs are reserved for private use by any organization. + extensions 9000 to 9999; } // @@ -180,6 +189,9 @@ message TripUpdate { // GTFS Realtime Specification in order to add and evaluate new features // and modifications to the spec. extensions 1000 to 1999; + + // The following extension IDs are reserved for private use by any organization. + extensions 9000 to 9999; } // Realtime update for arrival and/or departure events for a given stop on a @@ -225,6 +237,9 @@ message TripUpdate { // GTFS Realtime Specification in order to add and evaluate new features // and modifications to the spec. extensions 1000 to 1999; + + // The following extension IDs are reserved for private use by any organization. + extensions 9000 to 9999; } // Updates to StopTimes for the trip (both future, i.e., predictions, and in @@ -276,6 +291,9 @@ message TripUpdate { // GTFS Realtime Specification in order to add and evaluate new features and // modifications to the spec. extensions 1000 to 1999; + + // The following extension IDs are reserved for private use by any organization. + extensions 9000 to 9999; } // Realtime positioning information for a given vehicle. @@ -370,6 +388,9 @@ message VehiclePosition { // GTFS Realtime Specification in order to add and evaluate new features and // modifications to the spec. extensions 1000 to 1999; + + // The following extension IDs are reserved for private use by any organization. + extensions 9000 to 9999; } // An alert, indicating some sort of incident in the public transit network. @@ -453,6 +474,9 @@ message Alert { // GTFS Realtime Specification in order to add and evaluate new features // and modifications to the spec. extensions 1000 to 1999; + + // The following extension IDs are reserved for private use by any organization. + extensions 9000 to 9999; } // @@ -476,6 +500,9 @@ message TimeRange { // GTFS Realtime Specification in order to add and evaluate new features and // modifications to the spec. extensions 1000 to 1999; + + // The following extension IDs are reserved for private use by any organization. + extensions 9000 to 9999; } // A position. @@ -502,6 +529,9 @@ message Position { // GTFS Realtime Specification in order to add and evaluate new features and // modifications to the spec. extensions 1000 to 1999; + + // The following extension IDs are reserved for private use by any organization. + extensions 9000 to 9999; } // A descriptor that identifies an instance of a GTFS trip, or all instances of @@ -586,6 +616,9 @@ message TripDescriptor { // GTFS Realtime Specification in order to add and evaluate new features and // modifications to the spec. extensions 1000 to 1999; + + // The following extension IDs are reserved for private use by any organization. + extensions 9000 to 9999; } // Identification information for the vehicle performing the trip. @@ -606,6 +639,9 @@ message VehicleDescriptor { // GTFS Realtime Specification in order to add and evaluate new features and // modifications to the spec. extensions 1000 to 1999; + + // The following extension IDs are reserved for private use by any organization. + extensions 9000 to 9999; } // A selector for an entity in a GTFS feed. @@ -629,6 +665,9 @@ message EntitySelector { // GTFS Realtime Specification in order to add and evaluate new features and // modifications to the spec. extensions 1000 to 1999; + + // The following extension IDs are reserved for private use by any organization. + extensions 9000 to 9999; } // An internationalized message containing per-language versions of a snippet of @@ -654,6 +693,9 @@ message TranslatedString { // GTFS Realtime Specification in order to add and evaluate new features and // modifications to the spec. extensions 1000 to 1999; + + // The following extension IDs are reserved for private use by any organization. + extensions 9000 to 9999; } // At least one translation must be provided. repeated Translation translation = 1; @@ -662,4 +704,7 @@ message TranslatedString { // GTFS Realtime Specification in order to add and evaluate new features and // modifications to the spec. extensions 1000 to 1999; + + // The following extension IDs are reserved for private use by any organization. + extensions 9000 to 9999; } From 4727b203d1a7d9efdf0e525d653dc41cc3c85b0d Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Wed, 8 Apr 2020 16:48:06 -0400 Subject: [PATCH 06/17] Simplify enum for occupancy, add occupancy_percentage --- gtfs-realtime/proto/gtfs-realtime.proto | 27 ++++++++++++++----------- gtfs-realtime/spec/en/reference.md | 15 +++++--------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 41858294d..9d4fbc531 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -347,43 +347,46 @@ message VehiclePosition { } optional CongestionLevel congestion_level = 6; - // The degree of passenger occupancy of the vehicle. This field is still - // experimental, and subject to change. It may be formally adopted in the - // future. + // The degree of passenger occupancy of the vehicle enum OccupancyStatus { // The vehicle is considered empty by most measures, and has few or no // passengers onboard, but is still accepting passengers. - EMPTY = 0; + EMPTY = 0 [deprecated=true]; - // The vehicle has a relatively large percentage of seats available. - // What percentage of free seats out of the total seats available is to be - // considered large enough to fall into this category is determined at the - // discretion of the producer. - MANY_SEATS_AVAILABLE = 1; + // The vehicle has seats available. + SEATS_AVAILABLE = 1; // The vehicle has a relatively small percentage of seats available. // What percentage of free seats out of the total seats available is to be // considered small enough to fall into this category is determined at the // discretion of the feed producer. - FEW_SEATS_AVAILABLE = 2; + // Deprecated, if you need more granularity than the available enum please use occupancy_percentage + FEW_SEATS_AVAILABLE = 2 [deprecated=true]; // The vehicle can currently accommodate only standing passengers. STANDING_ROOM_ONLY = 3; // The vehicle can currently accommodate only standing passengers // and has limited space for them. - CRUSHED_STANDING_ROOM_ONLY = 4; + // Deprecated, if you need more granularity than the available enum please use occupancy_percentage + CRUSHED_STANDING_ROOM_ONLY = 4 [deprecated=true]; // The vehicle is considered full by most measures, but may still be // allowing passengers to board. FULL = 5; // The vehicle is not accepting additional passengers. - NOT_ACCEPTING_PASSENGERS = 6; + // Deprecated, if you need more granularity than the available enum please use occupancy_percentage + NOT_ACCEPTING_PASSENGERS = 6 [deprecated=true]; } optional OccupancyStatus occupancy_status = 9; + // 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. + // It's not impossible that the value goes over 100 if there are currently more passenger than the vehicle was designed for. + optional OccupancyStatus 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. diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index d6f445ec1..1d7d5b045 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -207,7 +207,8 @@ Realtime positioning information for a given vehicle. | **current_status** | [VehicleStopStatus](#enum-vehiclestopstatus) | Optional | One | The exact status of the vehicle with respect to the current stop. Ignored if current_stop_sequence is missing. | | **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.
**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future.| +| **occupancy_status** | [OccupancyStatus](#enum-occupancystatus) | Optional | One | The degree of passenger occupancy of the vehicle. More detail can be provided with _occupancy_percentage_. | +| **occupancy_percentage** | [uint32](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Optionals | 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. It's not impossible that the value goes over 100 if there are currently more passenger than the vehicle was designed for. | ## _enum_ VehicleStopStatus @@ -235,21 +236,15 @@ Congestion level that is affecting this vehicle. ## _enum OccupancyStatus_ -The degree of passenger occupancy for the vehicle. - -**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. +The degree of passenger occupancy for the vehicle. OccupancyStatus should be used to display a textual or #### _Values_ | _**Value**_ | _**Comment**_ | |-------------|---------------| -| _**EMPTY**_ | _The vehicle is considered empty by most measures, and has few or no passengers onboard, but is still accepting passengers._ | -| _**MANY_SEATS_AVAILABLE**_ | _The vehicle has a large percentage of seats available. What percentage of free seats out of the total seats available is to be considered large enough to fall into this category is determined at the discretion of the producer._ | -| _**FEW_SEATS_AVAILABLE**_ | _The vehicle has a small percentage of seats available. What percentage of free seats out of the total seats available is to be considered small enough to fall into this category is determined at the discretion of the producer._ | +| _**SEATS_AVAILABLE**_ | _The vehicle has seats available._ | | _**STANDING_ROOM_ONLY**_ | _The vehicle can currently accommodate only standing passengers._ | -| _**CRUSHED_STANDING_ROOM_ONLY**_ | _The vehicle can currently accommodate only standing passengers and has limited space for them._ | | _**FULL**_ | _The vehicle is considered full by most measures, but may still be allowing passengers to board._ | -| _**NOT_ACCEPTING_PASSENGERS**_ | _The vehicle can not accept passengers._ | ## _message_ Alert @@ -359,7 +354,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. From 58822d41777c2fabfaaa2e90d0850c5d9776353c Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Wed, 8 Apr 2020 16:49:38 -0400 Subject: [PATCH 07/17] Fix typo --- gtfs-realtime/spec/en/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 1d7d5b045..157271036 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -208,7 +208,7 @@ 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. More detail can be provided with _occupancy_percentage_. | -| **occupancy_percentage** | [uint32](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Optionals | 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. It's not impossible that the value goes over 100 if there are currently more passenger than the vehicle was designed for. | +| **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. It's not impossible that the value goes over 100 if there are currently more passenger than the vehicle was designed for. | ## _enum_ VehicleStopStatus From aa5a5569ad32c952776617608e9544ca9955c9e9 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Wed, 8 Apr 2020 16:50:25 -0400 Subject: [PATCH 08/17] Add more details for seating + standing capacity --- gtfs-realtime/spec/en/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 157271036..e7e9a2f98 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -208,7 +208,7 @@ 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. More detail can be provided with _occupancy_percentage_. | -| **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. It's not impossible that the value goes over 100 if there are currently more passenger than the vehicle was designed for. | +| **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. It's not impossible that the value goes over 100 if there are currently more passenger than the vehicle was designed for. | ## _enum_ VehicleStopStatus From 2727f973a7ce470a086dc968fcf85480df47e20a Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Wed, 8 Apr 2020 17:03:20 -0400 Subject: [PATCH 09/17] Add more details Co-Authored-By: Juan --- gtfs-realtime/proto/gtfs-realtime.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 9d4fbc531..35a1e7191 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -383,7 +383,7 @@ message VehiclePosition { optional OccupancyStatus occupancy_status = 9; // 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. + // The value 100 should represent the total maximum occupancy the vehicle was designed for, including both seated and standing capacity. // It's not impossible that the value goes over 100 if there are currently more passenger than the vehicle was designed for. optional OccupancyStatus occupancy_percentage = 10; From c376f4a3ff758fea9d756d3985c06b4798e9ccbf Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Wed, 8 Apr 2020 17:03:39 -0400 Subject: [PATCH 10/17] Re-phrase comment Co-Authored-By: Juan --- gtfs-realtime/proto/gtfs-realtime.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 35a1e7191..7431af85e 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -384,7 +384,7 @@ message VehiclePosition { // A percentage value representing the degree of passenger occupancy of the vehicle. // The value 100 should represent the total maximum occupancy the vehicle was designed for, including both seated and standing capacity. - // It's not impossible that the value goes over 100 if there are currently more passenger than the vehicle was designed for. + // It is possible that the value goes over 100 if there are currently more passengers than what the vehicle was designed for. optional OccupancyStatus occupancy_percentage = 10; // The extensions namespace allows 3rd-party developers to extend the From 3f3ab98dfe0f37480a326398767449c50c618ac3 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Wed, 8 Apr 2020 17:03:51 -0400 Subject: [PATCH 11/17] Add more details about use of percent Co-Authored-By: Juan --- gtfs-realtime/proto/gtfs-realtime.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 7431af85e..0d2acd732 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -383,6 +383,7 @@ 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. // It is possible that the value goes over 100 if there are currently more passengers than what the vehicle was designed for. optional OccupancyStatus occupancy_percentage = 10; From 28de1ae5f6da7f50a58356983ea21fc71a2d6b77 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Wed, 8 Apr 2020 17:04:16 -0400 Subject: [PATCH 12/17] Use new phrasing Co-Authored-By: Juan --- gtfs-realtime/spec/en/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index e7e9a2f98..3df726c9d 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -208,7 +208,7 @@ 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. More detail can be provided with _occupancy_percentage_. | -| **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. It's not impossible that the value goes over 100 if there are currently more passenger than the vehicle was designed for. | +| **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 the total maximum occupancy the vehicle was designed for including both seating and standing capacity. It is possible that the value goes over 100 if there are currently more passengers than what the vehicle was designed for. | ## _enum_ VehicleStopStatus From 39bbf1cd5f1a595f7a2ccb4bbc90f605a4c20b6e Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Wed, 8 Apr 2020 17:05:13 -0400 Subject: [PATCH 13/17] Add more details --- gtfs-realtime/spec/en/reference.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 3df726c9d..7c6678463 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -208,7 +208,7 @@ 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. More detail can be provided with _occupancy_percentage_. | -| **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 the total maximum occupancy the vehicle was designed for including both seating and standing capacity. It is possible that the value goes over 100 if there are currently more passengers than what the vehicle was designed for. | +| **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. It's not impossible that the value goes over 100 if there are currently more passenger than the vehicle was designed for. | ## _enum_ VehicleStopStatus @@ -236,7 +236,7 @@ Congestion level that is affecting this vehicle. ## _enum OccupancyStatus_ -The degree of passenger occupancy for the vehicle. OccupancyStatus should be used to display a textual or +The degree of passenger occupancy for the vehicle. OccupancyStatus should be used to display a textual or iconic representation of occupancy #### _Values_ From 5843b80f25dbe61b7a74bf7410b648b0690d41a0 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Wed, 8 Apr 2020 21:05:29 -0400 Subject: [PATCH 14/17] Update standing value to STANDING_AVAILABLE to match SIRI --- gtfs-realtime/proto/gtfs-realtime.proto | 4 ++-- gtfs-realtime/spec/en/reference.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 0d2acd732..511b3eba3 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -363,8 +363,8 @@ message VehiclePosition { // Deprecated, if you need more granularity than the available enum please use occupancy_percentage FEW_SEATS_AVAILABLE = 2 [deprecated=true]; - // The vehicle can currently accommodate only standing passengers. - STANDING_ROOM_ONLY = 3; + // The vehicle can currently accommodate standing passengers. + STANDING_AVAILABLE = 3; // The vehicle can currently accommodate only standing passengers // and has limited space for them. diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 7c6678463..edfc2dd74 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -243,7 +243,7 @@ The degree of passenger occupancy for the vehicle. OccupancyStatus should be use | _**Value**_ | _**Comment**_ | |-------------|---------------| | _**SEATS_AVAILABLE**_ | _The vehicle has seats available._ | -| _**STANDING_ROOM_ONLY**_ | _The vehicle can currently accommodate only standing passengers._ | +| _**STANDING_AVAILABLE**_ | _The vehicle can currently accommodate standing passengers._ | | _**FULL**_ | _The vehicle is considered full by most measures, but may still be allowing passengers to board._ | ## _message_ Alert From 50309afccd3e4eb2e6e9403283597ee846a5f0c3 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Thu, 9 Apr 2020 08:37:42 -0400 Subject: [PATCH 15/17] Add privacy requirement for occupancy_percentage --- gtfs-realtime/proto/gtfs-realtime.proto | 1 + gtfs-realtime/spec/en/reference.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 0d2acd732..a1034fa21 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -386,6 +386,7 @@ message VehiclePosition { // 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. // 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 precision should be low enough that you can't track a single person boarding and alighting for privacy reasons. optional OccupancyStatus occupancy_percentage = 10; // The extensions namespace allows 3rd-party developers to extend the diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 7c6678463..4d759c55e 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -208,7 +208,7 @@ 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. More detail can be provided with _occupancy_percentage_. | -| **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. It's not impossible that the value goes over 100 if there are currently more passenger than the vehicle was designed for. | +| **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. 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. | ## _enum_ VehicleStopStatus From b29854315214342c4fc0a7cc602dc7bc4a242a7e Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Thu, 9 Apr 2020 08:38:36 -0400 Subject: [PATCH 16/17] Remove comment not relevant anymore --- gtfs-realtime/proto/gtfs-realtime.proto | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index a1034fa21..ef1611e73 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -349,25 +349,18 @@ message VehiclePosition { // The degree of passenger occupancy of the vehicle enum OccupancyStatus { - // The vehicle is considered empty by most measures, and has few or no - // passengers onboard, but is still accepting passengers. + // Deprecated, if you need more granularity than the available enum please use occupancy_percentage EMPTY = 0 [deprecated=true]; // The vehicle has seats available. SEATS_AVAILABLE = 1; - // The vehicle has a relatively small percentage of seats available. - // What percentage of free seats out of the total seats available is to be - // considered small enough to fall into this category is determined at the - // discretion of the feed producer. // Deprecated, if you need more granularity than the available enum please use occupancy_percentage FEW_SEATS_AVAILABLE = 2 [deprecated=true]; // The vehicle can currently accommodate only standing passengers. STANDING_ROOM_ONLY = 3; - // The vehicle can currently accommodate only standing passengers - // and has limited space for them. // Deprecated, if you need more granularity than the available enum please use occupancy_percentage CRUSHED_STANDING_ROOM_ONLY = 4 [deprecated=true]; @@ -375,7 +368,6 @@ message VehiclePosition { // allowing passengers to board. FULL = 5; - // The vehicle is not accepting additional passengers. // Deprecated, if you need more granularity than the available enum please use occupancy_percentage NOT_ACCEPTING_PASSENGERS = 6 [deprecated=true]; From 940b3f30a68179617053bd4e0337c3672422aabc Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Thu, 9 Apr 2020 17:43:39 -0400 Subject: [PATCH 17/17] Remove occupancy_percentage value since it's been moved to a different PR --- gtfs-realtime/proto/gtfs-realtime.proto | 9 +-------- gtfs-realtime/spec/en/reference.md | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 2e4fac7d3..f7d4a3254 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -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 @@ -383,13 +383,6 @@ 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. - // 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 precision should be low enough that you can't track a single person boarding and alighting for privacy reasons. - optional OccupancyStatus 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. diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 9ebf0fbd3..ecf9583a4 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -213,7 +213,6 @@ 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. More detail can be provided with _occupancy_percentage_. | -| **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. 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. | ## _enum_ VehicleStopStatus