Hide

Example of a full-dataset Trip Update feed

The following example is an ASCII representation of an full-dataset Trip Update feed side-by-side with explanation of the elements.

header {
  gtfs_realtime_version: "1.0"
  incrementality: FULL_DATASET
  timestamp: 1284457468
}
entity {
  id: "simple-trip"
  trip_update {
    trip {
      trip_id: "trip-1"
    }
    stop_time_update {
      stop_sequence: 3
      arrival {
        delay: 5
      }
    }
    stop_time_update {
      stop_sequence: 8
      arrival {
        delay: 1
      }
    }
    stop_time_update {
      stop_sequence: 10
    }
  }
}
entity {
  id: "3"
  trip_update {
    trip {
      trip_id: "frequency-expanded-trip"
      start_time: "11:15:35"
    }
    stop_time_update {
      stop_sequence: 1
      arrival {
        delay: -2
      }
    }
    stop_time_update {
      stop_sequence: 9
    }
  }
}
]- header information
  ]- version of speed specification. Currently "1.0"
  ]- determines whether dataset is incremental or full
  ]- the moment where this dataset was generated on server

]- multiple entities can be included in the feed
  ]- unique identifier for the entity
  ]- "type" of the entity
    |
    ]- selects which GTFS entity (trip) will be affected
    |
    ]- schedule information update
    ]- selecting which stop is affected
    ]- for the vehicle's arrival time
    ]- to be delayed with 5 seconds
    |
    ]- ...this vehicle's delay is propagated to its subsequent stops.
    ]- Next information update on the vehicle's schedule
    ]   selected by stop_sequence. It will update
    ]   the vehicle's original (scheduled) arrival time with a
    ]   1 second delay.
    |
    ]- ...likewise the delay is propagated to subsequent stops.
    ]- Next information update on the vehicle's schedule
    ]   selected by stop_sequence. It will update the vehicle's arrival time
    ]   with the default delay of 0 (on time) and propagate this update
    ]   for the rest of the vehicle's stops.
    |
]- second entity containing update information for another trip
  |
  |
  ]- frequency based trips are defined by their
  ]- trip_id in GTFS and
  ]- start_time (here)  = n * headway_sec + start_time (GTFS)
  |
  |
  |
  |
  ]- negative delay means vehicle is 2 seconds ahead of schedule
  |
  |
  |
  |
  |
  |
  |