Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.
barbeau edited this page Aug 21, 2012 · 40 revisions

This project retrieves real-time transit data from Hillsborough Area Regional Transit (HART)'s OrbCAD Automatic Vehicle Location (AVL) system and formats the data into the General Transit Feed Specification (GTFS)-realtime format.

In this project, we serve up two types of GTFS-realtime data for HART:

We use the OneBusAway GTFS-realtime Exporter project to help produce and serve the GTFS-realtime feed.

Running the application

Below are the 5 arguments that we can feed into the program:

  1. tripUpdatesUrl - The url tripUpdates feed will be located
  2. vehiclePositionsUrl - The url vehiclePositions feed will be located
  3. tripUpdatesPath - The location on disk where tripUpdates feed will be stored
  4. vehiclePositionsPath - The location on disk where vehiclePositions feed will be stored
  5. refreshInterval - The amount of time (in second) between two consecutive queries to update new information. The default time is set to 30 seconds.

Execute the following via the command line to start the software that retrieves the real-time data from HART and hosts the Trip Updates and Vehicle Positions GTFS-realtime files on a web server:

java -jar cutr-gtfs-realtime-hart-0.0.1-SNAPSHOT-withAllDependencies.jar 
  --tripUpdatesUrl=http://localhost:8088/trip-updates  
  --vehiclePositionsUrl=http://localhost:8088/vehicle-positions 
  --tripUpdatesPath=C:\Test\tripUpdates.pb 
  --vehiclePositionsPath=C:\Test\vehiclePositions.pb 
  --refreshInterval=20

Testing the application

Trip Updates Feed

While the application is running, we can check the Trip Updates feed by browsing to links in an internet browser on the machine this application is running on:

  • Check http://localhost:8088/trip-updates?debug to see the Trip Updates feed in plain text, for HART debugging purposes only.
  • Check http://localhost:8088/trip-updates to see the feed in Protocol Buffer format, which is the default GTFS-realtime format that would be consumed by applications.

Vehicle Positions Feed

While the application is running, we can check the Vehicle Positions feed by browsing to following links in an internet browser on the machine this application is running on:

  • Check http://localhost:8088/vehicle-positions?debug to see the feed in plain text, for HART debugging purposes only.
  • Check http://localhost:8088/vehicle-positions to see the feed in Protocol Buffer format, which is the default GTFS-realtime format that would be consumed by applications.
Clone this wiki locally