Apologies if this has been discussed in a different topic.
I am seeing inconsistencies with the trip update returned from https://api.transport.nsw.gov.au/v1/gtfs/realtime/sydneytrains
According to the RTTA Technical Documentation v2.2 on page 14, there should always be a schedule_relationship field:
entity->trip_update->trip->schedule_relationship
However, I have seen this structure change when there are large delays. Here is an example of a trip, retrieved on 28/01/2019 at 08:28:
API Return Extract
trip_update {
trip {
trip_id: “93-A.1260.122.36.A.8.55187054”
route_id: “IWL_2d”
}
stop_time_update {
arrival {
time: 1548273660
}
departure {
time: 1548273720
}
stop_id: “217935”
}
…
stop_time_update {
arrival {
delay: 816
time: 1548279246
}
departure {
delay: 786
time: 1548279276
}
stop_id: “2000337”
}
timestamp: 1548277976
}
I believe the arrival
and departure
fields will switch from delay
to time
when it is a replacement service, but this was reported as a schedule service in previous calls to the API, then the schedule relationship disappeared.
So there are two concerns that I’d like to receive direction about:
- Scheduled services that have delays are being reported using
time
instead ofdelay
- Scheduled services do not have their
schedule_relationship
specified
Thanks very much!