-
Notifications
You must be signed in to change notification settings - Fork 6
Home
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. GTFS-realtime feeds can be consumed by applications such as OneBusAway to provide real-time transit data updates.
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.
Here's the architecture that is being used, with this project ("HART GTFS-realtime Generator") being the module in the middle:
Below are the 5 arguments that we can feed into the program:
- tripUpdatesUrl - The url tripUpdates feed will be located
- vehiclePositionsUrl - The url vehiclePositions feed will be located
- tripUpdatesPath - The location on disk where tripUpdates feed will be stored
- vehiclePositionsPath - The location on disk where vehiclePositions feed will be stored
- 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
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.
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.