Stop_code - Determining when a train is at a station


Apologies if this has been discussed already…

I’ve received a sample of GTFS-R data and noticed the sample of the vehicle position real-time feed has stop_code, not stop_id, and can’t find any information about how to decode / understand vehicle positions using this attribute.

I figured this (stop_code) was the best way to determine vehicle locations, as latitude and longitude appear to remain the same between particular stations (i.e. Ashfield and Burwood sometimes have the same longitude and latitudes applied). Does anyone have any experience with the stop_code attribute?

Otherwise, what is the best way to determine if a train is at a station (for arrival / departure times)?

I’ve looked into other forum posts such as: