Live travel information – The inside story

February 21st, 2007 by Alistair MacDonald Leave a reply »

This is a quick summary of my BarCampLondon2 presentation that may be interest to you if wanting to code a travel related mashup.

Introduction…

Many people know me for many reasons, but many do not know that I am fascinated by live travel information as much as I am packet switched network optimisation. Normally neither of these is a subject I talk about a parties. :-)

This story starts when I purchased a Psion WaveFinder DAB digital radio but was not overly impressed with the software, so developed my own. This was called DAB Bar and was surprisingly popular. The project is still going and is supported by many users and industry professionals.

So what about the travel?

I started many side projects associated with the DAB services available in the UK and produced a TPEG decoder that decoded the BBC’s experimental service on the national multiplex. TPEG is a protocol that was being developed by an EBU working group when and was designed to deliver travel information to the end user using broadcast technology.

TPEG is a propriety data specification and transport protocol that was designed for broadcast and not access across the Internet, but the object structure of the protocol can be presented nicely as XML, now called tpegML. The one key difference is that TPEG can rely on the data being ordered within an object while this is not so in XML. This is a problem parsing a records with multiple locations.

What information is available for mashing then?

The complete database of travel information is available through the BBC travel news web site. You may be interested to know that the text is the same that is presented to the travel presenters on the radio who somehow convert it to English on the fly.

The data is also available in tpegML and RSS from through BBC Backstage. This is licensed for personal use.

A feed of the raw TPEG data is available over the air on the BBC nation DAB multiplex, and over HTTP thorough the BBC R&D web site. Sadly this feed only contains 27 items and has not been updated since 2004, but is still good for testing. Source code libraries are also available through the R&D web site if you are interested in playing further with TPEG.

I use the tpegXL feeds for my Google Earth Backstage Mashup that pulls down all the required regional feeds, caches them, and overlays the incidents on the amazing Google Earth.

After demonstrating this to a friend working at the Highways Agency National Traffic Control Centre I was given access to the NTCC tpegML feed and the new OTAP feed. OTAP is a protocol designed to move data between various transport related organisations unlike TPEG that is designed to feed consumer devices. I did a Google Earth mashup with these feeds as well.

So what is the inside story then?

Well I can tell you how the BBC data gets put together. Trafficlink compiles the travel information from multiple sources including local councils, the police and public calls and traffic/webcams. This information is used to feed many services including BBC and ILR radio stations, and the BBC web site. Originally this information was made available to Serco who edited it to produce the national travel news. The TPEG stream came from the Serco database and this is the reason why the national feed over DAB has only a small number of records.

Eventually Serco outsourced all the editorial to Trafficlink. Unfortunately not all the systems has been updated and this is why the TPEG feed is stuck in 2004. I believe this is also the cause of the current failure of the motorway and national tpegML feeds.

So where are the trains?

We made mention of Matthew Somerville’s superb live train times map mashup and he joined us later on in the presentation. His system screen scrapes the live departure board with permission of National Rail and predicts the position of current trains. It is not using any of the public transport tpegML feeds that are mostly entered by hand and only show severe delays, but it is very much worth a play with anyway.

What for the future?

I have resisted releasing my TPEG decoder library because of pressure from the industry, but now I am not working for the industry I intend to release a TPEG to tpegML application. This will allow users to transcode the data from the DAB broadcasts and is primarily intended to homebrew navigation systems. This is naturally useless without the full travel database being broadcast on DAB, but I am pleased to say that I have been in discussion with the BBC in relation to it’s bid for a second nation DAB multiplex and it is intended that this will happen. Following a discussion earlier this year it is possible that this information will be licensed in the same way at other Backstage feeds have been.

The BBC web service is well tuned to supply the main BBC content to the masses, but it is not best configured for serving live information. The data is cached for a period of time and no ETAG is used so a full set of data needs retrieving just to check for updates. Also with the national feed down each region needs to be pulled separately with significant data duplication across feeds. My intention it to produce a server that pools and caches the data and implement ETAG implemented. Doing so will reduce bandwidth if used by more than one project and increase the speed.

That’s all folks…

At last, I have finished waffling on. If you have any questions then please ask. You may also be interested to know that I will be posting my thoughts on BarCampLondon2 when I have a moment and my views on how we can improve BarCamps it in the future, not that there is much scope to make it better. Last time my advice was to remember a bottle opener. O, yes, and I did admit in the presentation that I did get a job as a travel presenter in the middle of this so you might as well have a listen. :-)

Advertisement

2 comments

  1. Chris Hills says:

    Does the BBC still provide a TPEG feed? I could not find it on their website.

  2. Sadly not. After BBC Backstage died the feeds were eventually pulled. The raw feed on DAB and from the R&D server has also gone. You can easily get the national data from the Traffic England site and it is covered by the government open data licence if that is of help.

Leave a Reply

css.php