SlugLife


SlugLife is a mobile application for Android and iOS devices:

The Community's Voice:



Campus Transportation
  • Displays the realtime geographical positions of campus shuttles on a map centered on UCSC

How It Works

The on-campus base stations pick up signals from GPS transmitters located on each individual campus shuttle and pass along the GPS coordinates to the central server as NMEA sentences.


The central server stores information about each active campus shuttle  in a database. Every three seconds, a PHP script queries the database and builds an XML file containing this information on all active campus shuttles. We parse the XML file and use Apple Mapkit (iOS) and Google Maps SDK (Android) to display the campus shuttles on SlugLife as markers on a campus map.

 

  • Organizes buses, from closest to furthest, depending on user's current location.
  • Displays the ETA of each active shuttle to the user's closest bus stop.

How It Works

SlugLife works best when it knows the user's current location. As a result, we use public libraries, such as MKDirections, to determine all the ETAs of active campus shuttles to the user's closest bus stop.

SlugLife initiates a query to Apple's central servers by using MKDirections' methods to pass two distinct geographic coordinates. This asynchronous method waits for Apple's servers to return a length of time (in seconds) it would take for an automobile to traverse the roads between the two coordinates.

  • Notifies the user when a bus is 1, 2, or 3 bus stops away from the user specified bus stop.

How It Works

We use the midpoint formula



to define points around which we draw artificial circles between bus stops. We use this to determine the number of stops a campus shuttle is from a specific bus stop. Based on a customizable setting for number of bus stops away, a notification fires when the campus shuttle hits the threshold.




Events
  • Lists current and upcoming Events happening on or close to the UCSC campus.   

How It Works

To gather Event data, we scraped UCSC’s Events page using a REST API placing the data in a JSON file. We then used JSON parsing libraries, JSONReader (Android) and SwiftyJSON (iOS), to display the data. We use Google’s Material Design Standards for the Modern Day User Interface. One outcome of the standards is to use Google Now Cards which we use to display Events.


  


OPERS Facility Counts
  • Lets the user know how the current count of people at various popular OPERS facilities.

How It Works

OPERS facility counts are scraped from UCSC official web pages using an open source library, Portia. We use a REST API to build a JSON file with the scraped data and parse the JSON file to display it on SlugLife.




Dining Options
  • (Future) Displays all dining hall menus and hours of operation.