I've done something similar on trains in the UK before, specifically LNER (was Virgin Trains East Coast at the time but don't think the Wi-Fi solution has changed) trains. The icomera captive portal has an endpoint which returns the GPS coordinates of the train along with the speed. And some other endpoints for next stops etc.
Once made a little React app that showed the train on a Leaflet map. Was a good waste of a few hours.