In their defence, there are a number of problems which cause the problems we all experience using the APIs from TfL.
One problem is the reliability of GPS. Which isn’t to say that the network of NASA satellites providing the signals are anything by totally reliable, but connections to them to use microsecond adjustments to get highly accurate lat, long positions were designed to target military buildings outside of cities: the lack of a clear view of the whole sky for a London bus in many places can cause known accuracy problems.
The second problem is the reliability of the 3G/4G phone networks for the uploading of GPS location and Oyster information data.
Another issue is that the on-street countdown timers are sent updates only when iBus detects a change to the arrival schedule. If the above two problems stop data coming in, the rest of the system just assumes that everything is fine, thanks.
On the buses, there is no ability to take in data (like Google does via Wayz) about the state of traffic flow, just waiting for GPS data to detect a delay, not predict it.
Onto trains. One large issue here is that unlike petrol/diesel machines they are powered by electricity have can access a lot of torque from halt.
From elsewhere, I’ve been looking at the issues with Darwin, the system for National Rail trains. However the concepts are very similar to those on the tfl API.
Over the last few years I’ve sat on many station platforms comparing the data in Darwin with what is happening at stations. I’ve also spent time with a GPS recording system monitoring the acceleration and deceleration characterises of the trains.
One of the reasons that the “public Darwin” system rather blurs the time of a train by +/- 2 minutes is that there are problems with definitions that at first seem very clear.
One way of measuring the “arrival time” of a train is when the front of a train passes the monitoring device at the start of the platform.
However, the Class 345 trains can brake at 0.2m/s² but can cruise at 113m/s so the train has to being breaking for almost 60 seconds.
So to get from 113m/s to stand-still so the doors can open with the train occupying the platform of a 200 metre-long train takes about 24 seconds.
Now, and only now can the doors being to open and the passengers on the platform will stand aside to let those detaining off. Once clear the waiting customers on the platform board the train, and once they’re done the signal is given, the doors close and when the interlocks are done, they train can start to move.
A/C powered trains - most of those in London - can draw a lot of power to get moving quickly and can to 35m/s in the first 12 seconds, but then reaches a limit and then only accelerates at about 0.03m/s²
So, the “departure time” of a train could be the moment the wheels start moving, or when the whole 200m long train has moved off the platform, some 21 seconds later.
Working with the platform interface people, the customer perception of a train being “catchable” is the wheel-to-wheel dwell time: the moment from the doors opening to the train moving from the platform.
Standing watching the Darwin data on the platforms leads to the conclusion that “control” thinks a train has arrived about 24-30 seconds before the doors open.
If we are defining the intervals between services departures, a train arriving at the platform isn’t a departure, it is an event some time before the train passes the track side counter showing it has left.
To this end, we can look at many months of Darwin data to see how much time a “stopping” train takes in seconds between the recorded “darwin arrival” and “darwin departure”.
This is why “live” train systems need to compensate to show when trains are in platforms, because the only way to show it is to interpolate from the live actual data.
Anyway, back to the data. The limitations of data collection (no GPS underground) to trains with transponders passing track data collections marker, it’s actually quite hard for even people in the control rooms to know when a platform is over-busy, a person is taken sick or whatever actually delays the trains.