these are the trains I worked on, so I can elaborate here! The train computer uses GPS, and dead reckoning when no signal is available (eg city circle). Every few seconds, the trains send a snapshot of the data to the “shore” (Sydney Trains and Downer servers). ST then uses this snapshot to do the real time location data.
Fun fact - the estimates of how full carriages are is based on the air pressure required to keep the airbag suspension level with the platform.