Hi,
I'm writing a simple app that allows me to pick arrival and departure destination and it provides the next few trips for Metro North Railroad.
I am using both gtfs realtime and static data
The issue is that the IDs i am seeing in the feed updates are a different format then the static data.
My the trip ids from realtime look like this
eg. 2761672
While the trip ids in trips.txt are much longer.
eg. 246084024608405+1302415+1
I did a manual check and 2761672 doesn't exist in my trips.txt
Are the trip ids supposed to match in two data sets.
My understanding is that you are supposed to get all base data from static files and then use RT to augment the data.
Any help would be greatly appreciated
def get_trip_updates(self):
response = requests.get(GTFS_REALTIME_URL)
response.raise_for_status()
feed = gtfs_realtime_pb2.FeedMessage()
feed.ParseFromString(response.content)
updates = {}
for entity in feed.entity:
if not entity.HasField("trip_update"):
continue
trip_id = entity.trip_update.trip.trip_id