Skip to content

transport/calculate

  • Legs, dwell, cut-offs and punctuality, shared by road, rail, sea and air.
  • bestAvailable: Pick the best available timestamp for an event from its planned, estimated, requested and actual records, and say which class it is.
  • crossingTime: Measure a crossing — a canal transit, a strait passage, a border queue — and render both ends in the zone the crossing is administered in.
  • cutoffAt: Find a deadline stated as an offset before an anchor event, in the local time of the place that enforces it.
  • cutoffSchedule: Compute a whole stack of cut-offs against one anchor event, earliest first.
  • dwellTime: Measure how long something sat somewhere, and how many local calendar days it sat there.
  • estimateDrift: Measure how far an estimate moved between its first and last revision.
  • nextDeparture: Find the next departure a connection can make: the first scheduled departure at or after after plus the minimum connection time.
  • punctualityRate: The share of planned/actual pairs that were on time under one tolerance.
  • scheduleDelivery: Chain the legs of a multi-modal move into an end-to-end ETA with zone-local times at every handoff.
  • transitTime: Add a transit duration to a departure and return the arrival, in the departure’s own zone.
  • ClassifiedTimestamp: What bestAvailable returns: the chosen timestamp and the class it carries.
  • Crossing: What crossingTime returns: exact elapsed time plus the local view at either end.
  • Cutoff: One named deadline in a cut-off stack: how long before the anchor, and at what local time.
  • CutoffScheduleOptions: Options for cutoffSchedule: cutoffAt’s, with atLocalTime read from each entry instead.
  • CutoffTime: One computed deadline in a cut-off schedule.
  • DeliverySchedule: What scheduleDelivery returns: the final local ETA and every leg’s times.
  • DriftReport: What estimateDrift returns.
  • Dwell: What dwellTime returns: exact elapsed time plus the local view every charging regime counts in.
  • EstimateDriftOptions: Options for estimateDrift.
  • Headway: A headway service: a departure every headway from from, up to (not including) to — the shape of a GTFS frequencies.txt row (headway_secs, start_time, end_time; GTFS Schedule Reference, https://github.com/google/transit/blob/master/gtfs/spec/en/reference.md#frequenciestxt).
  • LegTime: One leg’s computed times, with the leg’s own tags echoed back.
  • NextDepartureOptions: Options for nextDeparture.
  • OnTimeRate: What punctualityRate returns: the on-time count, the total, and their ratio.
  • PlannedActual: One planned/actual pair for punctualityRate.