Hi,
I’m new to this data set and am struggling to find what the components of the entity.id values are that are returned for Sydney buses. The GTFS data is quite well defined and documented but the GTFS Realtime, less so, especially when it comes to specifics.
Hi @andymacjones, thanks for letting us know, we’ll update the doc. We did update the document recently but don’t think we changed the entity ID section.
We have identified where all of the components of the Vehicle.ID come from (for example) apart from the second block of TodisTRIPID.
33553_15513509_2436_610X_1
Further investigation on a set of data from 14th December 2018 shows that at time of request there were 16 vehicles returned from GTFSR on the 610X route and the only characters that change on the Vehicle.ID are the last 3 characters of this second block (ignoring the final trip instance number).
Trip Start Time
Vehicle Id
16:59:00
33553_15513240_2436_610X_1
17:22:00
33553_15513509_2436_610X_1
17:32:00
33553_15513512_2436_610X_1
17:40:00
33553_15513717_2436_610X_1
17:52:00
33553_15513206_2436_610X_1
18:09:00
33553_15513511_2436_610X_1
18:19:00
33553_15513503_2436_610X_1
18:19:00
33553_15513503_2436_610X_2
18:28:00
33553_15513250_2436_610X_1
18:39:00
33553_15513252_2436_610X_1
18:49:00
33553_15513253_2436_610X_1
19:09:00
33553_15513254_2436_610X_1
19:19:00
33553_15513719_2436_610X_1
What is interesting is that whilst it’s sequential it’s not contiguous and it appears to “wrap” so we go 240,509,512,717 but then back to 206, 511, 503 (503 again), then 250,252, 253, 254, 719.
Where is this TodisTRIPID generated from ? Is it derived from another value ? 15513 doesn’t seem to tie up to anything useful. Even a PosIX value of 1551324000 to match the “date” part gives us 28th Feb 2019.
On the two records that have the _1, _2 trip instance numbers we can see that they have exactly the same Vehicle.ID as each other (apart from the instance number).
Would be massively grateful if somebody can explain where these two parts come from that make up the TodisTripID.
I don’t think the TODIS trip ID is supposed to give you anything useful. As far as I’m aware, it’s just another sequentially allocated identifier to identify the trip. The TODIS trip ID is not unique to the route, so you might find that 15513503 is for a 610X service but 15513504 might be for another route or a service that doesn’t run that day.
For example (I’m looking at November data here), here are three sequentially allocated TODIS IDs:
33553_12813003_2436_M61_1
33553_12813004_2436_610X_1
33553_12813005_2436_M61_1
As you’ve pointed out, the _1, _2 suffix is the TripInstanceNumber. For the bus feed, the vehicle ID isn’t really a identifier for the vehicle – it’s just another identifier of the trip. There’s no way of tracking a vehicle across the network, if that’s what you’re after.
As to why there might be two trip instances… it usually happens when two drivers log into the same trip from the driver console. The number allows the two trips to be differentiated (although, the trip instance number isn’t necessarily persistant throughout the lifecycle of a trip).
in case you are making a global app, i have seen cases (in LA i think) where they run multiple vehicles for a single GTFS trip ID, so while they appear as duplicates in the GTFS-realtime, they are all servicing the same trip. Staggering the services would make sense to me, but I’m sure they have their reasons.