From 6e5663dba57a3b0bc1ab32e083ece80e1a404f27 Mon Sep 17 00:00:00 2001 From: scmcca Date: Wed, 3 Feb 2021 10:52:34 -0500 Subject: [PATCH 1/7] Add CrowdLevel --- gtfs-realtime/proto/gtfs-realtime.proto | 26 +++++++++++++++++++++++-- gtfs-realtime/spec/en/reference.md | 25 +++++++++++++++++++++--- 2 files changed, 46 insertions(+), 5 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index d6ce28e29..ea11d17dc 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -476,6 +476,24 @@ message VehiclePosition { // then this field should describe the entire vehicle with all carriages accepting passengers considered. optional OccupancyStatus occupancy_status = 9; + // The passenger crowd level for the vehicle or carriage. + // This field is still experimental, and subject to change. It may be formally adopted in the future. + // If multi_carriage_details is populated with per-carriage CrowdLevel, + // then this field should describe the entire vehicle with all carriages accepting passengers considered. + enum CrowdLevel { + // The vehicle of carriage does not have any crowd level data available at that time. + NO_DATA_AVAILABLE = 0; + + // The vehicle or carriage is not considered crowded by most measures, having few or no passengers onboard. + NOT_CROWDED = 1; + + // The vehicle or carriage has some crowding by most measures, having some passengers onboard. + SOME_CROWDING = 2; + + // The vehicle or carriage is considered crowded by most measures, having many passengers onboard and limited space. + CROWDED = 3; + } + // A percentage value indicating the degree of passenger occupancy in 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, @@ -503,11 +521,15 @@ message VehiclePosition { // This message/field is still experimental, and subject to change. It may be formally adopted in the future. optional OccupancyStatus occupancy_status = 3 [default = NO_DATA_AVAILABLE]; + // The passenger crowd level for this given carriage, in this vehicle. + // This message/field is still experimental, and subject to change. It may be formally adopted in the future. + optional CrowdLevel crowd_level = 4 [default = NO_DATA_AVAILABLE]; + // Occupancy percentage for this given carriage, in this vehicle. // Follows the same rules as "VehiclePosition.occupancy_percentage" // -1 in case data is not available for this given carriage (as protobuf defaults to 0 otherwise) // This message/field is still experimental, and subject to change. It may be formally adopted in the future. - optional int32 occupancy_percentage = 4 [default = -1]; + optional int32 occupancy_percentage = 5 [default = -1]; // Identifies the order of this carriage with respect to the other // carriages in the vehicle's list of CarriageDetails. @@ -520,7 +542,7 @@ message VehiclePosition { // Carriages without data must be represented with a valid carriage_sequence number and the fields // without data should be omitted (alternately, those fields could also be included and set to the "no data" values). // This message/field is still experimental, and subject to change. It may be formally adopted in the future. - optional uint32 carriage_sequence = 5; + optional uint32 carriage_sequence = 6; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 19b136372..6ce0ddf2e 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -59,6 +59,7 @@ Fields labeled as **experimental** are subject to change and not yet formally ad * [VehicleStopStatus](#enum-vehiclestopstatus) * [CongestionLevel](#enum-congestionlevel) * [OccupancyStatus](#enum-occupancystatus) + * [CrowdLevel](#enum-crowdlevel) * [CarriageDetails](#message-carriagedetails) * [Alert](#message-alert) * [TimeRange](#message-timerange) @@ -244,7 +245,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 state of passenger occupancy for the vehicle or carriage. If multi_carriage_details is populated with per-carriage OccupancyStatus, then this field should describe the entire vehicle with all carriages accepting passengers considered.

**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 state of passenger occupancy for the vehicle or carriage. If multi_carriage_details is populated with per-carriage OccupancyStatus, then this field should describe the entire vehicle with all carriages accepting passengers considered.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future.| +| **crowd_level** | [CrowdLevel](#enum-crowdlevel) | Optional | One | The passenger crowd level for the vehicle or carriage. If multi_carriage_details is populated with per-carriage CrowdLevel, then this field should describe the entire vehicle with all carriages accepting passengers considered.

**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 indicating the degree of passenger occupancy in the vehicle. The value 100 should represent the total maximum occupancy the vehicle was designed for, including both seating and standing capacity, and current operating regulations allow. The value may exceed 100 if there are more passengers than the maximum designed capacity. The precision of occupancy_percentage should be low enough that individual passengers cannot be tracked boarding or alighting the vehicle. If multi_carriage_details is populated with per-carriage occupancy_percentage, then this field should describe the entire vehicle with all carriages accepting passengers considered.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | | **multi_carriage_details** | [CarriageDetails](#message-CarriageDetails) | Optional | Many | Details of the multiple carriages of this given vehicle. The first occurrence represents the first carriage of the vehicle, **given the current direction of travel**. The number of occurrences of the multi_carriage_details field represents the number of carriages of the vehicle. It also includes non boardable carriages, like engines, maintenance carriages, etc… as they provide valuable information to passengers about where to stand on a platform.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | @@ -273,13 +275,15 @@ Congestion level that is affecting this vehicle. | **CONGESTION** | | **SEVERE_CONGESTION** | -## _enum OccupancyStatus_ +## _enum_ OccupancyStatus The state of passenger occupancy for the vehicle or carriage. Individual producers may not publish all OccupancyStatus values. Therefore, consumers must not assume that the OccupancyStatus values follow a linear scale. Consumers should represent OccupancyStatus values as the state indicated and intended by the producer. Likewise, producers must use OccupancyStatus values that correspond to actual vehicle occupancy states. -For describing passenger occupancy levels on a linear scale, see `occupancy_percentage`. +To describe passenger crowd levels on an ordinal scale, see [CrowdLevel](#enum-crowdlevel). + +To describe passenger occupancy levels on a linear scale, see `occupancy_percentage`. **Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. @@ -297,6 +301,20 @@ For describing passenger occupancy levels on a linear scale, see `occupancy_perc | _**NO_DATA_AVAILABLE**_ | _The vehicle or carriage doesn't have any occupancy data available at that time._ | | _**NOT_BOARDABLE**_ | _The vehicle or carriage is not boardable and never accepts passengers. Useful for special vehicles or carriages (engine, maintenance carriage, etc…)._ | +## _enum_ CrowdLevel + +The passenger crowd level for the vehicle or carriage. CrowdLevel enum values must be interpreted on an ordinal scale in increasing order from _**NOT_CROWDED**_ to _**CROWDED**_. + +To describe the in-vehicle occupancy state, see [OccupancyStatus](#enum-occupancystatus). + +**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. + +| _**Value**_ | _**Comment**_ | +|-------------|---------------| +| _**NOT_CROWDED**_ | _The vehicle or carriage is not considered crowded by most measures, having few or no passengers onboard._ | +| _**SOME_CROWDING**_ | _The vehicle or carriage has some crowding by most measures, having some passengers onboard._ | +| _**CROWDED**_ | _The vehicle or carriage is considered crowded by most measures, having many passengers onboard and limited space._ | +| _**NO_DATA_AVAILABLE**_ | The vehicle of carriage does not have any crowd level data available at that time. | ## _message_ CarriageDetails @@ -311,6 +329,7 @@ Carriage specific details, used for vehicles composed of several carriages. | **id** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Optional | One | Identification of the carriage. Should be unique per vehicle.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | | **label** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Optional | One | User visible label that may be shown to the passenger to help identify the carriage. Example: "7712", "Car ABC-32", etc...
**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 | Occupancy status for this given carriage, in this vehicle. Default is set to `NO_DATA_AVAILABLE`.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future.| +| **crowd_level** | [CrowdLevel](#enum-crowdlevel) | Optional | One | The passenger crowd level for this given carriage, in this vehicle.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | | **occupancy_percentage** | [int32](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Optional | One | Occupancy percentage for this given carriage, in this vehicle. Follows the same rules as "VehiclePosition.occupancy_percentage". Use -1 in case data is not available for this given carriage.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | | **carriage_sequence** | [uint32](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Required | One | Identifies the order of this carriage with respect to the other carriages in the vehicle's list of CarriageStatus. The first carriage in the direction of travel must have a value of 1. The second value corresponds to the second carriage in the direction of travel and must have a value of 2, and so forth. For example, the first carriage in the direction of travel has a value of 1. If the second carriage in the direction of travel has a value of 3, consumers will discard data for all carriages (i.e., the multi_carriage_details field). Carriages without data must be represented with a valid carriage_sequence number and the fields without data should be omitted (alternately, those fields could also be included and set to the "no data" values).

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | From a42933735151ca96cf2304ae464d833f6049b5b5 Mon Sep 17 00:00:00 2001 From: scmcca Date: Wed, 3 Feb 2021 10:55:41 -0500 Subject: [PATCH 2/7] style --- 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 6ce0ddf2e..8cec75eec 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -314,7 +314,7 @@ To describe the in-vehicle occupancy state, see [OccupancyStatus](#enum-occupanc | _**NOT_CROWDED**_ | _The vehicle or carriage is not considered crowded by most measures, having few or no passengers onboard._ | | _**SOME_CROWDING**_ | _The vehicle or carriage has some crowding by most measures, having some passengers onboard._ | | _**CROWDED**_ | _The vehicle or carriage is considered crowded by most measures, having many passengers onboard and limited space._ | -| _**NO_DATA_AVAILABLE**_ | The vehicle of carriage does not have any crowd level data available at that time. | +| _**NO_DATA_AVAILABLE**_ | _The vehicle of carriage does not have any crowd level data available at that time._ | ## _message_ CarriageDetails From e96617fe799c907c869dc067a4f9efca6f6f7d0b Mon Sep 17 00:00:00 2001 From: scmcca Date: Thu, 4 Feb 2021 16:46:27 -0500 Subject: [PATCH 3/7] Updates from review - Reverted .proto field value assignments change - Clarified ordinal usage of CrowdLevel - Clarified CrowdLevel as subject to current allowed operating regulations (i.e., social distancing) - Examples for simultaneous use of OccupancyStatus and CrowdLevel - Corrected type --- gtfs-realtime/proto/gtfs-realtime.proto | 14 +++++++------- gtfs-realtime/spec/en/reference.md | 16 ++++++++++------ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index ea11d17dc..a22359518 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -481,7 +481,7 @@ message VehiclePosition { // If multi_carriage_details is populated with per-carriage CrowdLevel, // then this field should describe the entire vehicle with all carriages accepting passengers considered. enum CrowdLevel { - // The vehicle of carriage does not have any crowd level data available at that time. + // The vehicle or carriage does not have any crowd level data available at that time. NO_DATA_AVAILABLE = 0; // The vehicle or carriage is not considered crowded by most measures, having few or no passengers onboard. @@ -521,15 +521,11 @@ message VehiclePosition { // This message/field is still experimental, and subject to change. It may be formally adopted in the future. optional OccupancyStatus occupancy_status = 3 [default = NO_DATA_AVAILABLE]; - // The passenger crowd level for this given carriage, in this vehicle. - // This message/field is still experimental, and subject to change. It may be formally adopted in the future. - optional CrowdLevel crowd_level = 4 [default = NO_DATA_AVAILABLE]; - // Occupancy percentage for this given carriage, in this vehicle. // Follows the same rules as "VehiclePosition.occupancy_percentage" // -1 in case data is not available for this given carriage (as protobuf defaults to 0 otherwise) // This message/field is still experimental, and subject to change. It may be formally adopted in the future. - optional int32 occupancy_percentage = 5 [default = -1]; + optional int32 occupancy_percentage = 4 [default = -1]; // Identifies the order of this carriage with respect to the other // carriages in the vehicle's list of CarriageDetails. @@ -542,7 +538,11 @@ message VehiclePosition { // Carriages without data must be represented with a valid carriage_sequence number and the fields // without data should be omitted (alternately, those fields could also be included and set to the "no data" values). // This message/field is still experimental, and subject to change. It may be formally adopted in the future. - optional uint32 carriage_sequence = 6; + optional uint32 carriage_sequence = 5; + + // The passenger crowd level for this given carriage, in this vehicle. + // This message/field is still experimental, and subject to change. It may be formally adopted in the future. + optional CrowdLevel crowd_level = 6 [default = NO_DATA_AVAILABLE]; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 8cec75eec..d1ab20f22 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -283,6 +283,8 @@ Individual producers may not publish all OccupancyStatus values. Therefore, cons To describe passenger crowd levels on an ordinal scale, see [CrowdLevel](#enum-crowdlevel). +Both OccupancyStatus and CrowdLevel may be used side-by-side, but must respectively indicate true conditions. For example, a vehicle may have _**FEW_SEATS_AVAILABLE**_ and _**SOME_CROWDING**_, have _**STANDING_ROOM_ONLY**_ and be _**CROWDED**_, or is _**NOT_ACCEPTING_PASSENGERS**_ and is _**CROWDED**_. + To describe passenger occupancy levels on a linear scale, see `occupancy_percentage`. **Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. @@ -303,18 +305,20 @@ To describe passenger occupancy levels on a linear scale, see `occupancy_percent ## _enum_ CrowdLevel -The passenger crowd level for the vehicle or carriage. CrowdLevel enum values must be interpreted on an ordinal scale in increasing order from _**NOT_CROWDED**_ to _**CROWDED**_. +The passenger crowd level for the vehicle or carriage. CrowdLevel enum values must be interpreted on an ordinal scale in increasing order from _**NOT_CROWDED**_ to _**CROWDED**_. In other words, producers must represent the lowest crowdedness level with _**NOT_CROWDED**_, the medium crowdedness level with _**SOME_CROWDING**_, and the highest crowdedness level with _**CROWDED**_. + +To describe in-vehicle occupancy states, see [OccupancyStatus](#enum-occupancystatus). -To describe the in-vehicle occupancy state, see [OccupancyStatus](#enum-occupancystatus). +Both OccupancyStatus and CrowdLevel may be used side-by-side, but must respectively indicate true conditions. For example, a vehicle may have _**FEW_SEATS_AVAILABLE**_ and _**SOME_CROWDING**_, have _**STANDING_ROOM_ONLY**_ and be _**CROWDED**_, or is _**NOT_ACCEPTING_PASSENGERS**_ and is _**CROWDED**_. **Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | _**Value**_ | _**Comment**_ | |-------------|---------------| -| _**NOT_CROWDED**_ | _The vehicle or carriage is not considered crowded by most measures, having few or no passengers onboard._ | -| _**SOME_CROWDING**_ | _The vehicle or carriage has some crowding by most measures, having some passengers onboard._ | -| _**CROWDED**_ | _The vehicle or carriage is considered crowded by most measures, having many passengers onboard and limited space._ | -| _**NO_DATA_AVAILABLE**_ | _The vehicle of carriage does not have any crowd level data available at that time._ | +| _**NOT_CROWDED**_ | _The vehicle or carriage is not considered crowded by most measures, having few or no passengers onboard, or as otherwise defined by current operating regulations._ | +| _**SOME_CROWDING**_ | _The vehicle or carriage has some crowding by most measures, having some passengers onboard, or as otherwise defined by current operating regulations._ | +| _**CROWDED**_ | _The vehicle or carriage is considered crowded by most measures, having many passengers onboard and limited space, or as otherwise defined be current operating regulations._ | +| _**NO_DATA_AVAILABLE**_ | _The vehicle or carriage does not have any crowd level data available at that time._ | ## _message_ CarriageDetails From f612ddc73d3e8e0c7363551812a032b539ccb141 Mon Sep 17 00:00:00 2001 From: scmcca Date: Tue, 9 Feb 2021 09:44:10 -0500 Subject: [PATCH 4/7] Fix value of CrowdLevel in VehiclePosition Move to backward-compatible value --- gtfs-realtime/proto/gtfs-realtime.proto | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index a22359518..bda4a4742 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -476,6 +476,17 @@ message VehiclePosition { // then this field should describe the entire vehicle with all carriages accepting passengers considered. optional OccupancyStatus occupancy_status = 9; + // A percentage value indicating the degree of passenger occupancy in 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. + // The value may exceed 100 if there are more passengers than the maximum designed capacity. + // The precision of occupancy_percentage should be low enough that individual passengers cannot be tracked boarding or alighting the vehicle. + // If multi_carriage_status is populated with per-carriage occupancy_percentage, + // then this field should describe the entire vehicle with all carriages accepting passengers considered. + // This field is still experimental, and subject to change. It may be formally adopted in the future. + optional uint32 occupancy_percentage = 10; + // The passenger crowd level for the vehicle or carriage. // This field is still experimental, and subject to change. It may be formally adopted in the future. // If multi_carriage_details is populated with per-carriage CrowdLevel, @@ -493,17 +504,7 @@ message VehiclePosition { // The vehicle or carriage is considered crowded by most measures, having many passengers onboard and limited space. CROWDED = 3; } - - // A percentage value indicating the degree of passenger occupancy in 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. - // The value may exceed 100 if there are more passengers than the maximum designed capacity. - // The precision of occupancy_percentage should be low enough that individual passengers cannot be tracked boarding or alighting the vehicle. - // If multi_carriage_status is populated with per-carriage occupancy_percentage, - // then this field should describe the entire vehicle with all carriages accepting passengers considered. - // This field is still experimental, and subject to change. It may be formally adopted in the future. - optional uint32 occupancy_percentage = 10; + optional CrowdLevel crowd_level = 11; // Carriage specific details, used for vehicles composed of several carriages // This message/field is still experimental, and subject to change. It may be formally adopted in the future. From 94f849e7e3f3cdc5b6e8208fa0de3f178f57e6c7 Mon Sep 17 00:00:00 2001 From: scmcca Date: Wed, 10 Feb 2021 19:01:06 -0500 Subject: [PATCH 5/7] Fix NO_DATA value --- 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 bda4a4742..c265919e3 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -493,7 +493,7 @@ message VehiclePosition { // then this field should describe the entire vehicle with all carriages accepting passengers considered. enum CrowdLevel { // The vehicle or carriage does not have any crowd level data available at that time. - NO_DATA_AVAILABLE = 0; + NO_DATA = 0; // The vehicle or carriage is not considered crowded by most measures, having few or no passengers onboard. NOT_CROWDED = 1; @@ -543,7 +543,7 @@ message VehiclePosition { // The passenger crowd level for this given carriage, in this vehicle. // This message/field is still experimental, and subject to change. It may be formally adopted in the future. - optional CrowdLevel crowd_level = 6 [default = NO_DATA_AVAILABLE]; + optional CrowdLevel crowd_level = 6 [default = NO_DATA]; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index d1ab20f22..aaf0910d3 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -318,7 +318,7 @@ Both OccupancyStatus and CrowdLevel may be used side-by-side, but must respectiv | _**NOT_CROWDED**_ | _The vehicle or carriage is not considered crowded by most measures, having few or no passengers onboard, or as otherwise defined by current operating regulations._ | | _**SOME_CROWDING**_ | _The vehicle or carriage has some crowding by most measures, having some passengers onboard, or as otherwise defined by current operating regulations._ | | _**CROWDED**_ | _The vehicle or carriage is considered crowded by most measures, having many passengers onboard and limited space, or as otherwise defined be current operating regulations._ | -| _**NO_DATA_AVAILABLE**_ | _The vehicle or carriage does not have any crowd level data available at that time._ | +| _**NO_DATA**_ | _The vehicle or carriage does not have any crowd level data available at that time._ | ## _message_ CarriageDetails From c79bf379221779586b8226bb2f35fbf3cade929f Mon Sep 17 00:00:00 2001 From: scmcca Date: Thu, 11 Feb 2021 10:13:22 -0500 Subject: [PATCH 6/7] Fix field number --- gtfs-realtime/proto/gtfs-realtime.proto | 38 ++++++++++++------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index c265919e3..5f18ad649 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -486,25 +486,6 @@ message VehiclePosition { // then this field should describe the entire vehicle with all carriages accepting passengers considered. // This field is still experimental, and subject to change. It may be formally adopted in the future. optional uint32 occupancy_percentage = 10; - - // The passenger crowd level for the vehicle or carriage. - // This field is still experimental, and subject to change. It may be formally adopted in the future. - // If multi_carriage_details is populated with per-carriage CrowdLevel, - // then this field should describe the entire vehicle with all carriages accepting passengers considered. - enum CrowdLevel { - // The vehicle or carriage does not have any crowd level data available at that time. - NO_DATA = 0; - - // The vehicle or carriage is not considered crowded by most measures, having few or no passengers onboard. - NOT_CROWDED = 1; - - // The vehicle or carriage has some crowding by most measures, having some passengers onboard. - SOME_CROWDING = 2; - - // The vehicle or carriage is considered crowded by most measures, having many passengers onboard and limited space. - CROWDED = 3; - } - optional CrowdLevel crowd_level = 11; // Carriage specific details, used for vehicles composed of several carriages // This message/field is still experimental, and subject to change. It may be formally adopted in the future. @@ -565,6 +546,25 @@ message VehiclePosition { // This message/field is still experimental, and subject to change. It may be formally adopted in the future. repeated CarriageDetails multi_carriage_details = 11; + // The passenger crowd level for the vehicle or carriage. + // This field is still experimental, and subject to change. It may be formally adopted in the future. + // If multi_carriage_details is populated with per-carriage CrowdLevel, + // then this field should describe the entire vehicle with all carriages accepting passengers considered. + enum CrowdLevel { + // The vehicle or carriage does not have any crowd level data available at that time. + NO_DATA = 0; + + // The vehicle or carriage is not considered crowded by most measures, having few or no passengers onboard. + NOT_CROWDED = 1; + + // The vehicle or carriage has some crowding by most measures, having some passengers onboard. + SOME_CROWDING = 2; + + // The vehicle or carriage is considered crowded by most measures, having many passengers onboard and limited space. + CROWDED = 3; + } + optional CrowdLevel crowd_level = 12; + // 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. From 802b6771463cf1d6726de0a5982126568a3d9849 Mon Sep 17 00:00:00 2001 From: scmcca Date: Thu, 11 Feb 2021 11:43:06 -0500 Subject: [PATCH 7/7] review - Added missing default value - Style and grammar --- gtfs-realtime/proto/gtfs-realtime.proto | 6 ++--- gtfs-realtime/spec/en/reference.md | 32 ++++++++++++------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 5f18ad649..5d7a0cb2b 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -464,7 +464,7 @@ message VehiclePosition { // The vehicle or carriage is not accepting passengers, but usually accepts passengers for boarding. NOT_ACCEPTING_PASSENGERS = 6; - // The vehicle or carriage doesn't have any occupancy data available at that time. + // The vehicle or carriage does not have any occupancy data available at this time. NO_DATA_AVAILABLE = 7; // The vehicle or carriage is not boardable and never accepts passengers. @@ -551,7 +551,7 @@ message VehiclePosition { // If multi_carriage_details is populated with per-carriage CrowdLevel, // then this field should describe the entire vehicle with all carriages accepting passengers considered. enum CrowdLevel { - // The vehicle or carriage does not have any crowd level data available at that time. + // The vehicle or carriage does not have any crowd level data available at this time. NO_DATA = 0; // The vehicle or carriage is not considered crowded by most measures, having few or no passengers onboard. @@ -563,7 +563,7 @@ message VehiclePosition { // The vehicle or carriage is considered crowded by most measures, having many passengers onboard and limited space. CROWDED = 3; } - optional CrowdLevel crowd_level = 12; + optional CrowdLevel crowd_level = 12 [default = NO_DATA]; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index aaf0910d3..8be7683bd 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -283,7 +283,7 @@ Individual producers may not publish all OccupancyStatus values. Therefore, cons To describe passenger crowd levels on an ordinal scale, see [CrowdLevel](#enum-crowdlevel). -Both OccupancyStatus and CrowdLevel may be used side-by-side, but must respectively indicate true conditions. For example, a vehicle may have _**FEW_SEATS_AVAILABLE**_ and _**SOME_CROWDING**_, have _**STANDING_ROOM_ONLY**_ and be _**CROWDED**_, or is _**NOT_ACCEPTING_PASSENGERS**_ and is _**CROWDED**_. +Both OccupancyStatus and CrowdLevel may be used side-by-side, but must respectively indicate true conditions. For example, a vehicle may have **FEW_SEATS_AVAILABLE** and **SOME_CROWDING**, have **STANDING_ROOM_ONLY** and be **CROWDED**, or is **NOT_ACCEPTING_PASSENGERS** and is **CROWDED**. To describe passenger occupancy levels on a linear scale, see `occupancy_percentage`. @@ -293,32 +293,32 @@ To describe passenger occupancy levels on a linear scale, see `occupancy_percent | _**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 or carriage has a large number of seats available. The amount of free seats out of the total seats available to be considered large enough to fall into this category is determined at the discretion of the producer._ | -| _**FEW_SEATS_AVAILABLE**_ | _The vehicle or carriage has a small number of seats available. The amount of free seats out of the total seats available to be considered small enough to fall into this category is determined at the discretion of the producer._ | -| _**STANDING_ROOM_ONLY**_ | _The vehicle or carriage can currently accommodate only standing passengers._ | -| _**CRUSHED_STANDING_ROOM_ONLY**_ | _The vehicle or carriage 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 or carriage is not accepting passengers. The vehicle or carriage usually accepts passengers for boarding._ | -| _**NO_DATA_AVAILABLE**_ | _The vehicle or carriage doesn't have any occupancy data available at that time._ | -| _**NOT_BOARDABLE**_ | _The vehicle or carriage is not boardable and never accepts passengers. Useful for special vehicles or carriages (engine, maintenance carriage, etc…)._ | +| **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 or carriage has a large number of seats available. The amount of free seats out of the total seats available to be considered large enough to fall into this category is determined at the discretion of the producer. | +| **FEW_SEATS_AVAILABLE** | The vehicle or carriage has a small number of seats available. The amount of free seats out of the total seats available to be considered small enough to fall into this category is determined at the discretion of the producer. | +| **STANDING_ROOM_ONLY** | The vehicle or carriage can currently accommodate only standing passengers. | +| **CRUSHED_STANDING_ROOM_ONLY** | The vehicle or carriage 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 or carriage is not accepting passengers. The vehicle or carriage usually accepts passengers for boarding. | +| **NO_DATA_AVAILABLE** | The vehicle or carriage does not have any occupancy data available at this time. | +| **NOT_BOARDABLE** | The vehicle or carriage is not boardable and never accepts passengers. Useful for special vehicles or carriages (engine, maintenance carriage, etc…). | ## _enum_ CrowdLevel -The passenger crowd level for the vehicle or carriage. CrowdLevel enum values must be interpreted on an ordinal scale in increasing order from _**NOT_CROWDED**_ to _**CROWDED**_. In other words, producers must represent the lowest crowdedness level with _**NOT_CROWDED**_, the medium crowdedness level with _**SOME_CROWDING**_, and the highest crowdedness level with _**CROWDED**_. +The passenger crowd level for the vehicle or carriage. CrowdLevel enum values must be interpreted on an ordinal scale in increasing order from **NOT_CROWDED** to **CROWDED**. In other words, producers must represent the lowest crowdedness level with **NOT_CROWDED**, the medium crowdedness level with **SOME_CROWDING**, and the highest crowdedness level with **CROWDED**. To describe in-vehicle occupancy states, see [OccupancyStatus](#enum-occupancystatus). -Both OccupancyStatus and CrowdLevel may be used side-by-side, but must respectively indicate true conditions. For example, a vehicle may have _**FEW_SEATS_AVAILABLE**_ and _**SOME_CROWDING**_, have _**STANDING_ROOM_ONLY**_ and be _**CROWDED**_, or is _**NOT_ACCEPTING_PASSENGERS**_ and is _**CROWDED**_. +Both OccupancyStatus and CrowdLevel may be used side-by-side, but must respectively indicate true conditions. For example, a vehicle may have **FEW_SEATS_AVAILABLE** and **SOME_CROWDING**, have **STANDING_ROOM_ONLY** and be **CROWDED**, or is **NOT_ACCEPTING_PASSENGERS** and is **CROWDED**. **Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | _**Value**_ | _**Comment**_ | |-------------|---------------| -| _**NOT_CROWDED**_ | _The vehicle or carriage is not considered crowded by most measures, having few or no passengers onboard, or as otherwise defined by current operating regulations._ | -| _**SOME_CROWDING**_ | _The vehicle or carriage has some crowding by most measures, having some passengers onboard, or as otherwise defined by current operating regulations._ | -| _**CROWDED**_ | _The vehicle or carriage is considered crowded by most measures, having many passengers onboard and limited space, or as otherwise defined be current operating regulations._ | -| _**NO_DATA**_ | _The vehicle or carriage does not have any crowd level data available at that time._ | +| **NOT_CROWDED** | The vehicle or carriage is not considered crowded by most measures, having few or no passengers onboard, or as otherwise defined by current operating regulations. | +| **SOME_CROWDING** | The vehicle or carriage has some crowding by most measures, having some passengers onboard, or as otherwise defined by current operating regulations. | +| **CROWDED** | The vehicle or carriage is considered crowded by most measures, having many passengers onboard and limited space, or as otherwise defined be current operating regulations. | +| **NO_DATA** | The vehicle or carriage does not have any crowd level data available at this time. | ## _message_ CarriageDetails