• Перевод:
  • Обзор
  • Виды каналов
  • Изменения в рейсах
  • Предупреждения
  • Координаты транспорта
  • Описание
  • Примеры
  • Предупреждения
  • Изменения в рейсах
  • gtfs-realtime.proto
  • Изменения
  • Example of a full-dataset Trip Update feed

    Перевод версии от 12 января 2012

    В процессе перевода

    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
        }
      }
    }
    entity {
      id: "specify-a-new-trip"
      trip_update {
        trip {
          route_id: "green-line"
          schedule_relationship: REPLACEMENT
        }
        stop_time_update {
          stop_sequence: 0
          stop_id: "first-stop"
          arrival {
            time: 1284457472
          }
        }
        stop_time_update {
          stop_sequence: 1
          stop_id: "second-stop"
          arrival {
            time: 1284457772
          }
        }
        stop_time_update {
          stop_sequence: 2
          stop_id: "third-stop"
          arrival {
            time: 1284458072
          }
        }
      }
    }
    
    ]- 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
      |
      |
      |
      |
      |
      |
      |
    ]- third entity will replace the original schedule information
      ] for the first three stops of 
      ] all trips belonging to the green-line
      ] providing new absolute schedule times
      | (in seconds; elapsed since 1st of January 1970 00:00:00 UTC)
      |
    
    

    Оригинал: https://developers.google.com/transit/gtfs-realtime/examples/trip-updates-full