ETA

The ETA RuBAN module, allows to predict the estimated time of arrival on mass transit, by collecting in real time the train/bus gps position and learning over-time what its arrival time on the various stops.

In order to tell RuBAN what are the stops, their location and what routes the transit system contains, it  uses information extracted from GTFS feeds.

The figure bellow, show the various systems that are in use.

 

 

 

In this case, a Cisco 819 router is deployed in each of the trains on the transit system.
The router, using over 3G, allow to report to ruban in realtime the current train position. Also, on the router a script is running to allow to inform RuBAN what is the GTFS trip the train is on.
With this information, the ETA module calculate for all the stops on the given trip, what is the estimated arrival time for this train.
The ETA module also, over-time, learns what the ETAs is and so refined its predictions.
In order to made the ETA information available to the public, and so displayed in signs located on each station, the ETA module convert it to a format that a DVS system understands.
Its then the DVS system that sends this information to the signs on the stations.  

1 - Installation

 

Download the ETA-xx.tar.gz file and uncompress it to the /opt/Davra/RuBAN directory.
Run,  sh /opt/Davra/RuBAN/ETA/install.sh to install it.

The ETA add-on to RuBAN creates the following services:

  • rbanetaservice
    • Log locate at, /var/Davra/RuBAN/log/rubanetaservice.out
  • rubanETASignsService
    • Log locate at, /var/Davra/RuBAN/log/ETASignsService.out
  • rubanetavalidatorservice
    • Log locate at, /var/Davra/RuBAN/log/rubanetavalidatorservice.out
  • rubangtfsservice
    • Log locate at, /var/Davra/RuBAN/log/rubangtfsservice.out
  • rubanMTSMapperService
    • Log locate at, /var/Davra/RuBAN/log/rubanMTSMapperService.out

2 - Configuration

There are two configuration files needed for the ETA module to work:

  1. The gtfs feed file, that needs to be located in, /var/Davra/RuBAN/ETA/gtfs_feed.zip
    An example of an gps feed file, for the San Diego Metropolitan Transit System, could be obtain from:
    http://www.gtfs-data-exchange.com/agency/mts/
     
  2. The mapping file, that allow to map from the trip Id extracted from the train CCU to the gtfs trip Id.
    This information, should be inserted in /opt/Davra/RuBAN/MTSMapperService/main/routesMapping.txt
    This file is contains the data comma separated, with the following header:
    route_short_name,route_number,stop_short_name,stop_id,route_id 
    Where,  route_short_name and route_number, are information retrieve from the CCU.
    The rest of the fields are extracted from the GTFS Feed.
    Example file for the  San Diego Metropolitan Transit System

    route_short_name,route_number,stop_short_name,stop_id,route_id
    GRN,31,SNT,75020,530
    GRN,32,IMT,75100,530
    GRN,34,IMT,75100,530
    GRN,36,IMT,75100,530
    GRN,38,IMT,75100,530
    GRN,41,GIL,75022,530
    GRN,42,IMT,75100,530
    GRN,43,Qualcomm,75057,530

3 - Cisco 819 Router Configuration

In the cisco 819 router deployed on the trains, beside the ruban heartbeat agent, another script needs to be deployed.
This script allows to transmit the information taken from the CCU, regarding what trip is the train is doing.
This script could be installed by doing the following commands in the router :

conf t
do copy http://<rubanIP>:58000/eem/tcl/public/Trip_Serial_mapping.tcl flash:/RuBAN/Trip_Serial_mapping.tcl
ev m p Trip_Serial_mapping.tcl
exit 


4 - Report of ETA to Station Signs

The ETAs for the trips are displayed on the sign in each station by using a DVS server.
The ETA Ruban Module comunicates with the DVS server by, writing the information to a file in the DVS supported format, creating a file for each station.
All this files are created on the following directory on the RuBAN server:  /var/Davra/RuBAN/DVS
The DVS server can access this files by sharing the /var/Davra/RuBAN/DVS on ruban using Samba.