It is actually bonkers that in this day and age the NYC subway cannot install accurate speed gauges on their trains. You can get an accurate bike speedometer for $20 on amazon, but the NYC subway cannot provide an accurate speedometer for train carrying a couple of hundred people. It is true that trains require more rigorous standards, but it is not a difficult problem. For example you can put a sensor on the electri…
Read the rails like a card magstrip.
Trains first traverse the track scanning the entire length in detail with careful speed and location tracking.
Then trains can subsequently pattern match to the rail for location and speed.
The rails can also be coded with info like patterns although that's not generally needed. Trains get loaded with info about the track they'll be on and then can monitor progress themselves.