From d2ab9ad22897fdfa3d99f270c49557061f51dc9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fontolliet?= Date: Mon, 27 Jul 2020 11:28:42 -0400 Subject: [PATCH 01/14] multi car crowding - spec proposal --- gtfs-realtime/proto/gtfs-realtime.proto | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index ce7e0ebfa..b46cc6418 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -390,6 +390,10 @@ message VehiclePosition { // The vehicle is not accepting additional passengers. NOT_ACCEPTING_PASSENGERS = 6; + // Used in context of multi car crowding. There is no data available for this car in this vehicle + // Useful for padding, in case a vehicle composed of several cars has data available only for some of those + NO_DATA_AVAILABLE = 7; + } optional OccupancyStatus occupancy_status = 9; @@ -402,6 +406,32 @@ message VehiclePosition { // This field is still experimental, and subject to change. It may be formally adopted in the future. optional uint32 occupancy_percentage = 10; + // Car specific details, used for vehicles composed of several cars + message CarDetails { + + // Occupancy status for this given car, in this vehicle + optional OccupancyStatus occupancy_status = 1; + + // Occupancy percentage for this given car, in this vehicle + // Follows the same rules as "VehiclePosition.occupancy_percentage" + // In addition, value -1 will be used to determine that crowding percentage is currently not available for this given car + // -1 is useful for padding, in case a vehicle composed of several cars has data available only for some of those + optional int32 occupancy_percentage = 2; + + // 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; + + // The following extension IDs are reserved for private use by any organization. + extensions 9000 to 9999; + } + + // Details of the multiple cars of this given vehicle. + // The first occurence represents the first car of the vehicle, given the current direction of travel. + // The number of occurrences of the multi_car_details field represents the number of cars of the vehicle. + repeated CarDetails multi_car_details = 11; + // 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. @@ -470,9 +500,11 @@ message Alert { optional TranslatedString description_text = 11; // Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text. + // This field is still experimental, and subject to change. It may be formally adopted in the future. optional TranslatedString tts_header_text = 12; // Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text. + // This field is still experimental, and subject to change. It may be formally adopted in the future. optional TranslatedString tts_description_text = 13; // Severity of this alert. From 0bf5bf3983d14035f9211391d0d853d697bc076c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fontolliet?= Date: Mon, 27 Jul 2020 11:31:23 -0400 Subject: [PATCH 02/14] removed text --- gtfs-realtime/proto/gtfs-realtime.proto | 2 -- 1 file changed, 2 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index b46cc6418..10958dae3 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -500,11 +500,9 @@ message Alert { optional TranslatedString description_text = 11; // Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text. - // This field is still experimental, and subject to change. It may be formally adopted in the future. optional TranslatedString tts_header_text = 12; // Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text. - // This field is still experimental, and subject to change. It may be formally adopted in the future. optional TranslatedString tts_description_text = 13; // Severity of this alert. From 074dc7fbbc9e730a812104b69565a426531a16b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fontolliet?= Date: Mon, 27 Jul 2020 11:32:55 -0400 Subject: [PATCH 03/14] modified comment --- 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 10958dae3..0fd5f82a9 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -390,7 +390,7 @@ message VehiclePosition { // The vehicle is not accepting additional passengers. NOT_ACCEPTING_PASSENGERS = 6; - // Used in context of multi car crowding. There is no data available for this car in this vehicle + // There is no data available for this car in this vehicle. Used in context of multi car crowding. // Useful for padding, in case a vehicle composed of several cars has data available only for some of those NO_DATA_AVAILABLE = 7; From 3a968dc1164754e8ec5c1da24aac3e3ecef90873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fontolliet?= Date: Thu, 13 Aug 2020 12:37:21 -0400 Subject: [PATCH 04/14] changed proposal following discussions with LIRR and MobilityData --- gtfs-realtime/proto/gtfs-realtime.proto | 57 +++++++++++++++++-------- 1 file changed, 40 insertions(+), 17 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 0fd5f82a9..df960c4d4 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -360,40 +360,45 @@ message VehiclePosition { // experimental, and subject to change. It may be formally adopted in the // future. enum OccupancyStatus { - // The vehicle is considered empty by most measures, and has few or no + // The vehicle/carriage is considered empty by most measures, and has few or no // passengers onboard, but is still accepting passengers. EMPTY = 0; - // The vehicle has a relatively large percentage of seats available. + // The vehicle/carriage 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 a relatively small percentage of seats available. + // The vehicle/carriage 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; - // The vehicle can currently accommodate only standing passengers. + // The vehicle/carriage can currently accommodate only standing passengers. STANDING_ROOM_ONLY = 3; - // The vehicle can currently accommodate only standing passengers + // The vehicle/carriage can currently accommodate only standing passengers // and has limited space for them. CRUSHED_STANDING_ROOM_ONLY = 4; - // The vehicle is considered full by most measures, but may still be + // The vehicle/carriage is considered full by most measures, but may still be // allowing passengers to board. FULL = 5; - // The vehicle is not accepting additional passengers. + // The vehicle/carriage is not accepting passengers. + // The vehicle/carriage usually accepts passengers for boarding NOT_ACCEPTING_PASSENGERS = 6; - // There is no data available for this car in this vehicle. Used in context of multi car crowding. - // Useful for padding, in case a vehicle composed of several cars has data available only for some of those + // The vehicle/carriage doesn't have any occupancy data available at that time NO_DATA_AVAILABLE = 7; + // The vehicle/carriage is not boardable. + // The vehicle/carriage never accepts passengers + // Useful for special vehicles/carriages (engine, maintenance carriage, etc…) + NOT_BOARDABLE = 8; + } optional OccupancyStatus occupancy_status = 9; @@ -403,20 +408,38 @@ message VehiclePosition { // 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. + // 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; - // Car specific details, used for vehicles composed of several cars - message CarDetails { + // Carriage specific details, used for vehicles composed of several carriages + message CarriageStatus { + + // User visible label that may be shown to the passenger to help identify + // the carriage. Example: "7712", "Car ABC-32", etc... + optional string label = 1; - // Occupancy status for this given car, in this vehicle - optional OccupancyStatus occupancy_status = 1; + // Occupancy status for this given carriage, in this vehicle + optional OccupancyStatus occupancy_status = 2 [default = NO_DATA_AVAILABLE]; - // Occupancy percentage for this given car, in this vehicle + // Occupancy percentage for this given carriage, in this vehicle // Follows the same rules as "VehiclePosition.occupancy_percentage" - // In addition, value -1 will be used to determine that crowding percentage is currently not available for this given car - // -1 is useful for padding, in case a vehicle composed of several cars has data available only for some of those - optional int32 occupancy_percentage = 2; + // -1 in case data is not available (as protobuf defaults to 0 otherwise) + optional int32 occupancy_percentage = 3 [default = -1]; + + // Identifies the order of this carriage with respect to the other + // carriages in the vehicle's list of CarriageStatus. The values must + // be non-negative, and there cannot be duplicate values in the list of + // CarriageStatus. The values must be set such that the lowest value + // corresponds to the first carriage in the direction of travel, the + // second-lowest value corresponds to the second carriage in the direction + // of travel and so forth. For example, the first carriage in the direction + // of travel could have a carriage_sequence of 4, + // the second carriage could have a carriage_sequence of 10, the third + // carriage could have a carriage_sequence of 105, and so forth. + // Even if protobuf keeps sequencing, it will help with feed validation + optional uint32 carriage_sequence = 3; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and From 6a38b94c89c07c660db1b95612cbc94b41fa7f57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fontolliet?= Date: Thu, 13 Aug 2020 12:44:27 -0400 Subject: [PATCH 05/14] proto compilation OK --- gtfs-realtime/proto/gtfs-realtime.proto | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index df960c4d4..e5416442a 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -439,7 +439,7 @@ message VehiclePosition { // the second carriage could have a carriage_sequence of 10, the third // carriage could have a carriage_sequence of 105, and so forth. // Even if protobuf keeps sequencing, it will help with feed validation - optional uint32 carriage_sequence = 3; + optional uint32 carriage_sequence = 4; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and @@ -450,10 +450,15 @@ message VehiclePosition { extensions 9000 to 9999; } - // Details of the multiple cars of this given vehicle. - // The first occurence represents the first car of the vehicle, given the current direction of travel. - // The number of occurrences of the multi_car_details field represents the number of cars of the vehicle. - repeated CarDetails multi_car_details = 11; + // 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 + repeated CarriageStatus multi_carriage_status = 11; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and From 16341bfac3b0ec698594b77c142a79aa680de82d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fontolliet?= Date: Tue, 18 Aug 2020 12:15:19 -0400 Subject: [PATCH 06/14] modified reference.md --- gtfs-realtime/proto/gtfs-realtime.proto | 51 ++++++++++++------------- gtfs-realtime/spec/en/reference.md | 34 +++++++++++++---- 2 files changed, 51 insertions(+), 34 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index e5416442a..72ee6faee 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -356,50 +356,51 @@ 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 or carriage. This field is still + // experimental, and subject to change. It may be formally adopted in the future. enum OccupancyStatus { // The vehicle/carriage is considered empty by most measures, and has few or no // passengers onboard, but is still accepting passengers. EMPTY = 0; - // The vehicle/carriage has a relatively large percentage of seats available. + // The vehicle or carriage 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/carriage has a relatively small percentage of seats available. + // The vehicle or carriage 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; - // The vehicle/carriage can currently accommodate only standing passengers. + // The vehicle or carriage can currently accommodate only standing passengers. STANDING_ROOM_ONLY = 3; - // The vehicle/carriage can currently accommodate only standing passengers + // The vehicle or carriage can currently accommodate only standing passengers // and has limited space for them. CRUSHED_STANDING_ROOM_ONLY = 4; - // The vehicle/carriage is considered full by most measures, but may still be + // The vehicle or carriage is considered full by most measures, but may still be // allowing passengers to board. FULL = 5; - // The vehicle/carriage is not accepting passengers. - // The vehicle/carriage usually accepts passengers for boarding + // The vehicle or carriage is not accepting passengers. + // The vehicle or carriage usually accepts passengers for boarding. NOT_ACCEPTING_PASSENGERS = 6; - // The vehicle/carriage doesn't have any occupancy data available at that time + // The vehicle or carriage doesn't have any occupancy data available at that time NO_DATA_AVAILABLE = 7; - // The vehicle/carriage is not boardable. - // The vehicle/carriage never accepts passengers - // Useful for special vehicles/carriages (engine, maintenance carriage, etc…) + // The vehicle or carriage is not boardable. + // The vehicle or carriage never accepts passengers. + // Useful for special vehicles or carriages (engine, maintenance carriage, etc…). NOT_BOARDABLE = 8; } + // If multi_carriage_status is populated with per-carriage OccupancyStatus, + // then this field should describe the entire vehicle with all carriages accepting passengers considered. optional OccupancyStatus occupancy_status = 9; // A percentage value representing the degree of passenger occupancy of the vehicle. @@ -423,21 +424,19 @@ message VehiclePosition { // Occupancy status for this given carriage, in this vehicle optional OccupancyStatus occupancy_status = 2 [default = NO_DATA_AVAILABLE]; - // Occupancy percentage for this given carriage, in this vehicle + // Occupancy percentage for this given carriage, in this vehicle. // Follows the same rules as "VehiclePosition.occupancy_percentage" - // -1 in case data is not available (as protobuf defaults to 0 otherwise) + // Use -1 in case data is not available for this given carriage (as protobuf defaults to 0 otherwise) optional int32 occupancy_percentage = 3 [default = -1]; // Identifies the order of this carriage with respect to the other - // carriages in the vehicle's list of CarriageStatus. The values must - // be non-negative, and there cannot be duplicate values in the list of - // CarriageStatus. The values must be set such that the lowest value - // corresponds to the first carriage in the direction of travel, the - // second-lowest value corresponds to the second carriage in the direction - // of travel and so forth. For example, the first carriage in the direction - // of travel could have a carriage_sequence of 4, - // the second carriage could have a carriage_sequence of 10, the third - // carriage could have a carriage_sequence of 105, and so forth. + // 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 detect an issue with the sequencing. // Even if protobuf keeps sequencing, it will help with feed validation optional uint32 carriage_sequence = 4; @@ -457,7 +456,7 @@ message VehiclePosition { // 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 + // information to passengers about where to stand on a platform. repeated CarriageStatus multi_carriage_status = 11; // 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 78956a824..e06808b9b 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -57,6 +57,7 @@ Fields labeled as **experimental** are subject to change and not yet formally ad * [VehicleStopStatus](#enum-vehiclestopstatus) * [CongestionLevel](#enum-congestionlevel) * [OccupancyStatus](#enum-occupancystatus) + * [CarriageStatus](#message-carriagestatus) * [Alert](#message-alert) * [TimeRange](#message-timerange) * [EntitySelector](#message-entityselector) @@ -212,8 +213,9 @@ 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_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 occupancy_percentage should be low enough that you can't track a single person boarding and alighting for privacy reasons.
**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 or carriage. If multi_carriage_status 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_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 occupancy_percentage should be low enough that you can't track a single person boarding and alighting for privacy reasons. 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.
**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | +| **multi_carriage_status** | [CarriageStatus](#message-carriagestatus) | 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. | ## _enum_ VehicleStopStatus @@ -242,7 +244,7 @@ Congestion level that is affecting this vehicle. ## _enum OccupancyStatus_ -The degree of passenger occupancy for the vehicle. +The degree of passenger occupancy for the vehicle or carriage. **Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. @@ -251,12 +253,28 @@ The degree of passenger occupancy for the vehicle. | _**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._ | -| _**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._ | +| _**MANY_SEATS_AVAILABLE**_ | _The vehicle or carriage 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 or carriage 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._ | +| _**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 can not accept passengers._ | +| _**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. The vehicle or carriage never accepts passengers. Useful for special vehicles or carriages (engine, maintenance carriage, etc…)._ | + + +## _message_ CarriageStatus + +Carriage specific details, used for vehicles composed of several carriages + +#### Fields + +| _**Field Name**_ | _**Type**_ | _**Required**_ | _**Cardinality**_ | _**Description**_ | +|------------------|------------|----------------|-------------------|-------------------| +| **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... | +| **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.| +| **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 detect an issue with the sequencing. Even if protobuf keeps sequencing, it will help with feed validation | ## _message_ Alert From 7fbcd383878f09be1c56bb27f2bc60882e0cd4b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fontolliet?= Date: Tue, 18 Aug 2020 12:38:49 -0400 Subject: [PATCH 07/14] modified reference.md - typos --- gtfs-realtime/proto/gtfs-realtime.proto | 8 +++----- gtfs-realtime/spec/en/reference.md | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 72ee6faee..d0ac52677 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -359,7 +359,7 @@ message VehiclePosition { // The degree of passenger occupancy of the vehicle or carriage. This field is still // experimental, and subject to change. It may be formally adopted in the future. enum OccupancyStatus { - // The vehicle/carriage is considered empty by most measures, and has few or no + // The vehicle or carriage is considered empty by most measures, and has few or no // passengers onboard, but is still accepting passengers. EMPTY = 0; @@ -386,15 +386,13 @@ message VehiclePosition { // allowing passengers to board. FULL = 5; - // The vehicle or carriage is not accepting passengers. - // The vehicle or carriage usually accepts passengers for boarding. + // 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 NO_DATA_AVAILABLE = 7; - // The vehicle or carriage is not boardable. - // The vehicle or carriage never accepts passengers. + // The vehicle or carriage is not boardable and never accepts passengers. // Useful for special vehicles or carriages (engine, maintenance carriage, etc…). NOT_BOARDABLE = 8; diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index e06808b9b..9c6004fc0 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -260,7 +260,7 @@ The degree of passenger occupancy for the vehicle or carriage. | _**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. The vehicle or carriage never accepts passengers. Useful for special vehicles or carriages (engine, maintenance carriage, etc…)._ | +| _**NOT_BOARDABLE**_ | _The vehicle or carriage is not boardable and never accepts passengers. Useful for special vehicles or carriages (engine, maintenance carriage, etc…)._ | ## _message_ CarriageStatus From 8be43eae566ca77995fc550dd34c5fd5c1a23e78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fontolliet?= <39090838+lfontolliet@users.noreply.github.com> Date: Tue, 25 Aug 2020 09:36:51 -0400 Subject: [PATCH 08/14] Update gtfs-realtime/spec/en/reference.md Co-authored-by: Sean Barbeau --- 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 9c6004fc0..e5a867bca 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -272,7 +272,7 @@ Carriage specific details, used for vehicles composed of several carriages | _**Field Name**_ | _**Type**_ | _**Required**_ | _**Cardinality**_ | _**Description**_ | |------------------|------------|----------------|-------------------|-------------------| | **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... | -| **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.| +| **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.| | **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 detect an issue with the sequencing. Even if protobuf keeps sequencing, it will help with feed validation | From 5d54b200aaad0f7efeab64f61e1726fc1c00efda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fontolliet?= <39090838+lfontolliet@users.noreply.github.com> Date: Tue, 25 Aug 2020 09:37:07 -0400 Subject: [PATCH 09/14] Update gtfs-realtime/spec/en/reference.md Co-authored-by: Sean Barbeau --- gtfs-realtime/proto/gtfs-realtime.proto | 9 +++++++-- gtfs-realtime/spec/en/reference.md | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index d0ac52677..757cc9667 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -413,18 +413,22 @@ message VehiclePosition { optional uint32 occupancy_percentage = 10; // 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. message CarriageStatus { // User visible label that may be shown to the passenger to help identify // the carriage. Example: "7712", "Car ABC-32", etc... + // This message/field is still experimental, and subject to change. It may be formally adopted in the future. optional string label = 1; // Occupancy status 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 OccupancyStatus occupancy_status = 2 [default = NO_DATA_AVAILABLE]; // 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 (as protobuf defaults to 0 otherwise) + // -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 = 3 [default = -1]; // Identifies the order of this carriage with respect to the other @@ -435,7 +439,7 @@ message VehiclePosition { // 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 detect an issue with the sequencing. - // Even if protobuf keeps sequencing, it will help with feed validation + // This message/field is still experimental, and subject to change. It may be formally adopted in the future. optional uint32 carriage_sequence = 4; // The extensions namespace allows 3rd-party developers to extend the @@ -455,6 +459,7 @@ message VehiclePosition { // 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. + // This message/field is still experimental, and subject to change. It may be formally adopted in the future. repeated CarriageStatus multi_carriage_status = 11; // 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 e5a867bca..0e35a73f8 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -274,7 +274,7 @@ Carriage specific details, used for vehicles composed of several carriages | **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... | | **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.| | **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 detect an issue with the sequencing. Even if protobuf keeps sequencing, it will help with feed validation | +| **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 detect an issue with the sequencing. | ## _message_ Alert From e586746f2656817430d5c1290a7765309738c38b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fontolliet?= <39090838+lfontolliet@users.noreply.github.com> Date: Thu, 27 Aug 2020 11:12:59 -0400 Subject: [PATCH 10/14] Update gtfs-realtime/spec/en/reference.md Co-authored-by: Sean Barbeau --- gtfs-realtime/spec/en/reference.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 0e35a73f8..383ac40eb 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -267,6 +267,8 @@ The degree of passenger occupancy for the vehicle or carriage. Carriage specific details, used for vehicles composed of several carriages +**Caution:** this message is still **experimental**, and subject to change. It may be formally adopted in the future. + #### Fields | _**Field Name**_ | _**Type**_ | _**Required**_ | _**Cardinality**_ | _**Description**_ | From f35b2cd6883ee9990f227f028612a97c8e57d3bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fontolliet?= <39090838+lfontolliet@users.noreply.github.com> Date: Thu, 27 Aug 2020 11:13:08 -0400 Subject: [PATCH 11/14] Update gtfs-realtime/spec/en/reference.md Co-authored-by: Sean Barbeau --- 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 383ac40eb..15d68b499 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -273,7 +273,7 @@ Carriage specific details, used for vehicles composed of several carriages | _**Field Name**_ | _**Type**_ | _**Required**_ | _**Cardinality**_ | _**Description**_ | |------------------|------------|----------------|-------------------|-------------------| -| **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... | +| **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.| | **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 detect an issue with the sequencing. | From f789ec0677faacc9c1bff8816ea0a4d5ed07fcf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fontolliet?= <39090838+lfontolliet@users.noreply.github.com> Date: Thu, 27 Aug 2020 11:13:26 -0400 Subject: [PATCH 12/14] Update gtfs-realtime/spec/en/reference.md Co-authored-by: Sean Barbeau --- 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 15d68b499..0bef9a9ef 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -276,7 +276,7 @@ Carriage specific details, used for vehicles composed of several carriages | **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.| | **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 detect an issue with the sequencing. | +| **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 detect an issue with the sequencing.
**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | ## _message_ Alert From b77d8986879465213f60e5a6a6823741ba1f6c98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fontolliet?= Date: Thu, 27 Aug 2020 11:34:22 -0400 Subject: [PATCH 13/14] added id and renamed CarriageStatus to CarriageDetails --- gtfs-realtime/proto/gtfs-realtime.proto | 17 ++++++++++------- gtfs-realtime/spec/en/reference.md | 13 +++++++------ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 757cc9667..a72d32ee7 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -414,25 +414,28 @@ message VehiclePosition { // 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. - message CarriageStatus { + message CarriageDetails { + + // Identification of the carriage. Should be unique per vehicle. + optional string id = 1; // User visible label that may be shown to the passenger to help identify // the carriage. Example: "7712", "Car ABC-32", etc... // This message/field is still experimental, and subject to change. It may be formally adopted in the future. - optional string label = 1; + optional string label = 2; // Occupancy status 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 OccupancyStatus occupancy_status = 2 [default = NO_DATA_AVAILABLE]; + optional OccupancyStatus occupancy_status = 3 [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 = 3 [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 CarriageStatus. + // carriages in the vehicle's list of CarriageDetails. // 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. @@ -440,7 +443,7 @@ message VehiclePosition { // If the second carriage in the direction of travel has a value of 3, // consumers will detect an issue with the sequencing. // This message/field is still experimental, and subject to change. It may be formally adopted in the future. - optional uint32 carriage_sequence = 4; + optional uint32 carriage_sequence = 5; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and @@ -460,7 +463,7 @@ message VehiclePosition { // like engines, maintenance carriages, etc… as they provide valuable // information to passengers about where to stand on a platform. // This message/field is still experimental, and subject to change. It may be formally adopted in the future. - repeated CarriageStatus multi_carriage_status = 11; + repeated CarriageDetails multi_carriage_details = 11; // 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 0e35a73f8..7ccb8c0ea 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -57,7 +57,7 @@ Fields labeled as **experimental** are subject to change and not yet formally ad * [VehicleStopStatus](#enum-vehiclestopstatus) * [CongestionLevel](#enum-congestionlevel) * [OccupancyStatus](#enum-occupancystatus) - * [CarriageStatus](#message-carriagestatus) + * [CarriageDetails](#message-CarriageDetails) * [Alert](#message-alert) * [TimeRange](#message-timerange) * [EntitySelector](#message-entityselector) @@ -213,9 +213,9 @@ 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 or carriage. If multi_carriage_status 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_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 occupancy_percentage should be low enough that you can't track a single person boarding and alighting for privacy reasons. 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.
**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | -| **multi_carriage_status** | [CarriageStatus](#message-carriagestatus) | 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. | +| **occupancy_status** | [OccupancyStatus](#enum-occupancystatus) | _Optional_ | One | The degree of passenger occupancy of 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_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 occupancy_percentage should be low enough that you can't track a single person boarding and alighting for privacy reasons. 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. | ## _enum_ VehicleStopStatus @@ -263,7 +263,7 @@ The degree of passenger occupancy for the vehicle or carriage. | _**NOT_BOARDABLE**_ | _The vehicle or carriage is not boardable and never accepts passengers. Useful for special vehicles or carriages (engine, maintenance carriage, etc…)._ | -## _message_ CarriageStatus +## _message_ CarriageDetails Carriage specific details, used for vehicles composed of several carriages @@ -271,10 +271,11 @@ Carriage specific details, used for vehicles composed of several carriages | _**Field Name**_ | _**Type**_ | _**Required**_ | _**Cardinality**_ | _**Description**_ | |------------------|------------|----------------|-------------------|-------------------| +| **id** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Optional | One | Identification of the carriage. Should be unique per vehicle.| | **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... | | **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.| | **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 detect an issue with the sequencing. | +| **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 CarriageDetails. 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 detect an issue with the sequencing. | ## _message_ Alert From 7017684b4c9112a92bee1292437755e3a33ddcb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fontolliet?= Date: Wed, 9 Sep 2020 09:19:27 -0400 Subject: [PATCH 14/14] clarified description of carriage_sequence --- gtfs-realtime/proto/gtfs-realtime.proto | 6 ++++-- gtfs-realtime/spec/en/reference.md | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index a72d32ee7..bb4b7d497 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -389,7 +389,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 doesn't have any occupancy data available at that time. NO_DATA_AVAILABLE = 7; // The vehicle or carriage is not boardable and never accepts passengers. @@ -441,7 +441,9 @@ message VehiclePosition { // 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 detect an issue with the sequencing. + // 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). // This message/field is still experimental, and subject to change. It may be formally adopted in the future. optional uint32 carriage_sequence = 5; diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 0a2e32559..b81f61cf0 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -277,7 +277,7 @@ Carriage specific details, used for vehicles composed of several carriages | **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.| | **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 detect an issue with the sequencing.
**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. | ## _message_ Alert