Project Description

Whoosh Media’s train detector algorithm links live train way-point information with their on-train GPS to determine which train service it is on.


Whoosh Media provides train passengers with access to an extensive range of on-board entertainment. This project was delivered in partnership with specialist rail agency Jnction.

Client brief

Whoosh Media place “in-flight entertainment” systems on trains in the UK, providing popular TV shows and movies to passengers connected to the train’s complementary WiFi system. The content provided is tailored to the relevant train service, for example based on the time remaining in the journey. In order to do this, Whoosh Media needs to know what train service the entertainment system is on.

The train identifier software takes the GPS data from the on-train media server and links it to the rail network’s service information to determine instantly which of the current day’s train services it is currently on.

User benefits

The train detector software provides data that enables Whoosh Media to customise playback options for the current train service and provides real-time information directly to passengers including:

  • which train service they are on
  • scheduled arrival time at remaining stops
  • delays or interruptions, reasons, and expected arrival time.


  • A custom-written system that absorbs all the live train information movement detection events from the “Darwin Push Port” and stores these.
  • A custom-collated set of data covering all GB junctions, stations and other timing points.
  • Uses bounding-box and game-like collision-detection code to instantly determine possible trains from a GPS location (and timing)
  • Uses train speed and custom acceleration profiles to determine which of the possible trains is the best service to GPS match.


  • Components, written in PHP7.2, backend into Amazon Aurora databases and leverage Structured storage (memcached) for super-fast responses.
  • Written from the ground-up in Object Oriented PHP 7.2
  • The Darwin push port (a Stomp interface) provides a live stream of data for same-date planning, as does a TfL HTTP Digest.
  • APIs return SVG data for direct user display.

Success story

The software successfully delivered the required information and Whoosh Media is working to roll it out live for passenger use.

Code extract

Copy to Clipboard

Sample screenshots