Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Track shuttles on your smartphone.

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.mdown

Shuttle Tracker

A suite of applications to make community transportation more useful.

About

The Shuttle Tracker project lets users view a public or semi-public transportation system's routes and stops, and track the locations of its vehicles. It also provides estimated times of arrival (ETAs) for each of the stops.

The project's main focus is to build mobile versions of the RPI Shuttle Tracker website at http://shuttles.rpi.edu/. The program provides information on the RPI campus shuttles, including their current locations and when they will arrive at each stop.

The applications are written generically, so adapting them to a new system is simple.

It consists of several parts:

  1. A data processing program, fetching data from the Shuttle Tracker website and calculating ETAs for the shuttles.

  2. A web server which serves data to the mobile clients, and displays these ETAs on a mobile-friendly website, meant to run on the same machine as 1. Examples of the data output by this server are available in the example data/ directory.

  3. Android and iOS applications, which display recent shuttle positions, the normal shuttle routes and the stops on these routes. These applications also display ETAs. The applications poll 2 for shuttle position and ETA information. Examples of the data expected by these applications are available in the example data/ directory.

The data processor is found in the server/ directory. The web server is in the webinterface/ directory, and the Android and iOS programs are found in the android/ and ios/ directories, respectively.

License

The Android application, in the 'android/' directory, and the server applications, in the 'server/' directory, are available under the GNU GPLv3 license as specified in the COPYING file. Files under different licenses will say so in their headers.

The iOS application, in the ios/ directory, is available under the Simplified BSD License. It also incorporates code under the MIT License. Licenses are specified in the LICENSE_ files in the ios/ directory, unless otherwise specified in a file.

Data Processor

Note: Certain values have been hard-coded into certain java files, such as the link to the shuttle data in JSONExtractor.java, while other values are being read in from the sts.properties file, which is designed to hold information to connect to the database.

The Java runnable in the "java" folder is meant to be run simultaneously with the web server in the top level webinterface folder.

Compiling

Import the contents of Shuttle-Tracker/server to your preferred Java IDE (e.g. NetBeans or Eclipse). If you choose to use Eclipse, then just use the project file located in Shuttle-Tracker/server. The shuttle data processing code is contained within the src folder.

Execution

To run the Java program, several pieces of information are required:

  1. The http link to the shuttle data (located in JSONExtractor.java as shuttleURL)

  2. The http link to the route and stop data (located in JSONExtractor.java as routeURL)

  3. A file called sts.properties, which should contain the link* to your MySQL database as well as the username and password to access that database (in that order). This file should be located in the working directory of the project, or where ever you choose to place the runnable executable. It should be noted that JSONSender,java, which gets the data from this file will, by default, look for the file in the current working directory.

After inputting this information, run the main method located in ShuttleTrackerServer.java. When creating the java runnable file, make sure to package all of the used libraries with the project. *This link would look as follows: jdbc:mysql://PortName/ServerName, where ServerName is the name of the server you are trying to connect to and PortName is the port you are connecting to. If the database is located locally on your machine, then replace PortName with localhost.

Web Server

Information coming soon

Android

Environment Configuration

This application is written using Eclipse. The easiest way to compile is to configure Eclipse according to the instructions at http://developer.android.com/sdk/eclipse-adt.html#installing

Compiling

Load the project into Eclipse using File->Import... Add a class called MapsApiKey to the com.abstractedsheep.shuttletracker package. Add a static String variable to the class called MAPS_API_KEY, set to your Google Maps API key. (public static final String MAPS_API_KEY = "";) Build the project using Project->Build Project (If there are build errors, try Project->Clean...)

Installing

Create a Run configuration for the project set to launch the default activity with the target set to manual. Run project normally. -OR- Use the adb program in android-sdk/platform-tools with the command 'adb install '

iOS (iPhone/iPod Touch/iPad)

Compiling

Open ios/Shuttle-Tracker.xcodeproj in XCode and compile normally.

Installing

Note: You must be a registered and paying iOS developer to install this way. With the project open in XCode, set up code signing as instructed at the iOS provisioning center, https://developer.apple.com/ios/manage/overview/index.action

Connect your provisioned device and set XCode's target to your device name. Compile and run the program, using Run or Build and Go.

Contact

If you need help compiling or otherwise need to get in touch, brendonjustin can be found on #rcos on irc.freenode.net as bjustin

Something went wrong with that request. Please try again.