From 4ba262f50a6a355f6c849aaf757a9d1b4ef88722 Mon Sep 17 00:00:00 2001 From: Weston Shippy <57922264+westontrillium@users.noreply.github.com> Date: Mon, 15 Dec 2025 14:50:38 -0800 Subject: [PATCH 1/2] Add safe_duration fields to trips.txt --- gtfs/spec/en/reference.md | 1 + 1 file changed, 1 insertion(+) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index b4569a54..5fca8160 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -268,6 +268,7 @@ Primary key (`trip_id`) | `wheelchair_accessible` | Enum | Optional | Indicates wheelchair accessibility. Valid options are:

`0` or empty - No accessibility information for the trip.
`1` - Vehicle being used on this particular trip can accommodate at least one rider in a wheelchair.
`2` - No riders in wheelchairs can be accommodated on this trip. | | `bikes_allowed` | Enum | Optional | Indicates whether bikes are allowed. Valid options are:

`0` or empty - No bike information for the trip.
`1` - Vehicle being used on this particular trip can accommodate at least one bicycle.
`2` - No bicycles are allowed on this trip. | | `cars_allowed` | Enum | Optional | Indicates whether cars are allowed. Valid options are:

`0` or empty - No car information for the trip.
`1` - Vehicle being used on this particular trip can accommodate at least one car.
`2` - No cars are allowed on this trip. | +| `safe_duration_factor`

and

`safe_duration_offset` | Float | **Optional** | Together, `safe_duration_factor` and `safe_duration_offset` allow an estimation of the longest amount of time a rider can expect the on-demand trip to take, for 95% of cases.

Data consumers are expected to use `safe_duration_factor` and `safe_duration_offset` to make the following calculation:

`SafeTravelDuration (seconds) = safe_duration_factor × DrivingDuration (seconds) + safe_duration_offset (seconds)`

where `DrivingDuration` is the time it would take a private car to travel the distance being calculated for the on-demand service, and `SafeTravelDuration` is the longest amount of time a rider can expect the on-demand trip to take.

This calculation should only apply to the portion of a trip that is on-demand. If a service is a deviated-fixed service, or if a rider trip includes a transfer from an on-demand to a fixed-route service, the duration of the fixed-route portion of the trip should be calculated according to the `departure_time` and `arrival_time` fields.

Empty values for `safe_duration_factor` and `safe_duration_offset` are considered as `1.0` and `0`, respectively.| #### Example: Blocks and service day From 2260ba3768a5bdf4d252e3bbca7a592982f553ec Mon Sep 17 00:00:00 2001 From: Weston Shippy <57922264+westontrillium@users.noreply.github.com> Date: Mon, 15 Dec 2025 16:11:45 -0800 Subject: [PATCH 2/2] Update reference.md --- gtfs/spec/en/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index 5fca8160..2bad5036 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -268,7 +268,7 @@ Primary key (`trip_id`) | `wheelchair_accessible` | Enum | Optional | Indicates wheelchair accessibility. Valid options are:

`0` or empty - No accessibility information for the trip.
`1` - Vehicle being used on this particular trip can accommodate at least one rider in a wheelchair.
`2` - No riders in wheelchairs can be accommodated on this trip. | | `bikes_allowed` | Enum | Optional | Indicates whether bikes are allowed. Valid options are:

`0` or empty - No bike information for the trip.
`1` - Vehicle being used on this particular trip can accommodate at least one bicycle.
`2` - No bicycles are allowed on this trip. | | `cars_allowed` | Enum | Optional | Indicates whether cars are allowed. Valid options are:

`0` or empty - No car information for the trip.
`1` - Vehicle being used on this particular trip can accommodate at least one car.
`2` - No cars are allowed on this trip. | -| `safe_duration_factor`

and

`safe_duration_offset` | Float | **Optional** | Together, `safe_duration_factor` and `safe_duration_offset` allow an estimation of the longest amount of time a rider can expect the on-demand trip to take, for 95% of cases.

Data consumers are expected to use `safe_duration_factor` and `safe_duration_offset` to make the following calculation:

`SafeTravelDuration (seconds) = safe_duration_factor × DrivingDuration (seconds) + safe_duration_offset (seconds)`

where `DrivingDuration` is the time it would take a private car to travel the distance being calculated for the on-demand service, and `SafeTravelDuration` is the longest amount of time a rider can expect the on-demand trip to take.

This calculation should only apply to the portion of a trip that is on-demand. If a service is a deviated-fixed service, or if a rider trip includes a transfer from an on-demand to a fixed-route service, the duration of the fixed-route portion of the trip should be calculated according to the `departure_time` and `arrival_time` fields.

Empty values for `safe_duration_factor` and `safe_duration_offset` are considered as `1.0` and `0`, respectively.| +| `safe_duration_factor`

and

`safe_duration_offset` | Float | **Optional** | Together, `safe_duration_factor` and `safe_duration_offset` allow an estimation of the longest amount of time a rider can expect the on-demand trip to take, for 95% of cases.

Data consumers are expected to use `safe_duration_factor` and `safe_duration_offset` to make the following calculation:

`SafeTravelDuration (seconds) = safe_duration_factor × DrivingDuration (seconds) + safe_duration_offset (seconds)`

where `DrivingDuration` is the time it would take a private car to travel the distance being calculated for the on-demand service, and `SafeTravelDuration` is the longest amount of time a rider can expect the on-demand trip to take.

This calculation should only apply to the portion of a trip that is on-demand. If a service is a deviated-fixed service, or if a rider trip includes a transfer from an on-demand to a fixed-route service, the duration of the fixed-route portion of the trip should be calculated according to the `departure_time` and `arrival_time` fields.| #### Example: Blocks and service day