currentLocation field empty in Line/Arrivals API for all buses

I’m looking to identify actual positions of buses and the only option seems to be to use the Line/{ids}/Arrivals interface. I’ve seen how previous implementers have guesstimated position from the time to arrive at next stop, most notably the map on traintimes.org.uk but this is a very low accuracy approach, but fine within the scope of the interface.
The API has a field currentLocation, which seems to be always blank on buses and with a helpful definition of “The current location of the vehicle”. Could the API be enhanced to supply the Longitude and Latitude of the vehicle in this field? I assume the buses are sending them back anyway and given the very open-ended definition of the field, it wouldn’t seem to break the interface.

Cheers in advance

1 Like

Welcome @dsemal

Unofficially. As I recall the iBus system uses dedicated GPS hardware supplied by a third party and uses a public messaging system for bus-to-server and server-to-bus messages.

The GPS is actually quite good compared to a phone because it is using an external aerial, unlike in a mobile phone or tablet where the GPS aerial is part of the device.

For GPS to get a highly accurate location, it needs to compare as many signals from the different GPS satellites as possible. The location is worked out by comparing the timing of the reception of the data packet and knowing the path back, via the satellites to the reference point. The more signals, the better the accuracy.

So, out in a field the aerial can get as many satellite signals as is possible. However on city streets GPS becomes poor because the view of the sky from the receiver location reduces the accuracy just when you need it most.

This isn’t always a problem. One thing you can do is just “snap” the location calculation to the nearest street (or railway if you’re on a train). This is great for monitoring service buses because they tend to go in a single direction, run up to 30km/h, have terrible turning circles and can only reverse with a lot of effort.

So… to run a system like “iBus” you can take these assumptions and use them to predict where a bus is with a reasonable level of accuracy from the GPS data, but not 100% precisely.

Also, bus software doesn’t have access to the “location services” which use GSM tower location data and wifi-network location data to enhance the GPS derived location.

So, I don’t think TfL want to put “accurate” lat, long data out there because someone (like me, no doubt) will come back and point out how wrong it is.

So, that’s why you get told that a bus is “at” so-and-so stop or “3 mins between” some other pair of stops. That’s because it’s actually the precision of data they have.

Perhaps in future “bus ticket machines” will be able to use iOS/Android to get better live locations.

Hi dsemal,

I wanted to let you know that there is an ongoing work to provide the real time position of buses. We are working on providing a new API with bus location, direction, route, vehicle ID etc…
It’s a quite complex integration and we are hoping to get the new end point ready by March '21.

We will be posting here more information about this data once we know more precisely the delivery date, so stay tuned!

Kind regards,
Jakub

4 Likes

Hi @JakubGasiorowski,

Thanks for this update. Like @dsemal I’ve been looking for a way to do this for my own application too. But could you explain how traintimes.org.uk is able to do this already? Surely there is an existing API/feed that allows for this to happen?

Thanks

@nathanodong

There’s no official GPS feed from Darwin, so traintimes.org.uk is derriving this from the existing data. IMHO they don’t do it very well because they don’t use a very good model of the train acceleration/decelleration charactsitics. Which would require the collection of data…

We’ve been waiting for real GPS data to be added to Darwin for quite a while now. The update that was supposed to include it was rolled back because it failed.

NRE Darwin is free and is here - National Rail Enquiries -

The pushport is the thing you need for realtime updates.

Hmm, I see. So for the bus tracking part of the site, it’s probably just using the eta from the API and some collection of average speed data to find it’s rough location? It would be interesting to see how it behaves in heavy traffic, as this would probably break it!

EDIT: I’ve just been comparing this feature to CityMapper. Looks like they do it a bit better, but I guess they’d have that huge dataset to play with.

I find that the Google Maps history “raw data” is quite useful to work out where buses actually go.

Go to https://www.google.co.uk/maps/timeline and then click on the cog in the bottom right and pick “show raw data”. It shows you both the location AND error for each point (you have to hover).

Hi @JakubGasiorowski, any word on when this feature will be released? Is it still scheduled for this month?

Thanks!

Also eagerly awaiting this feature.

2 Likes

Sounds very interesting.

Please say there are plans to incorporate running numbers into this feed too?

1 Like

Hi Nathan,
Apologies for the late reply.

We’ve had some delays during the Dev phase and the current estimated delivery date for this project is around summer. We will be communicating with the forum members a more specific date once we have more certainty. That means we should be able to give a few week’s notice, so stay tuned!
Jakub

3 Likes

Hello,

What do you mean by ‘running numbers’? Vehicle’s number plates?
If that’s the case, we are planning to add them to the feed. Hope that helps!
Jakub

2 Likes

Jakob

The running number is allocated to the set of journeys that a vehicle runs during the day. For example, if you look at the timing pages on

you will find a column Bus Run No.

Different vehicles can be used for the same set of workings on different days so no, it is nothing to do with the number plates.

Hi Jakub

mjcarchive explains well in the post above.

If it’s any consolation, bus drivers sign onto their MDT in their cabs with a garage code, running number, trip number and route number. This enables the vehicle to be polled. Since drivers are logging in with the data, it would be nice to get such data in an output too.

Thanks
Dan

@JakubGasiorowski Has there been any update on the real-time positions in the bus data? I’ve been waiting for this to be added for years and so I was pleasantly surprised to see that it’s being worked on.

2 Likes

Hi Jakub,

Any update when this will be released as we approach Autumn?

Thanks

Hi @nathanodong and

Thanks for following up. Apologies @robhawkes for no response earlier.

The public release of this data is currently put on hold / postponed. I should have more information at the end of this month but, at the moment, I’m not able to say anything specific. Sorry about that.

Cheers,
Jakub

2 Likes

No worries, thanks for the update!

@JakubGasiorowski

Is there any update on the provision of data to BODS or is that tied to this?

Thanks in advance,

Simon

Hi Simon,

Apologies for no response earlier.
We are expecting BODS API to be available by the end of this month, but I will send another update once we have a more precise date.

Kind regards,
Jakub

2 Likes