1. Project Idea

  • Razorback Transit (University of Arkansas bus) Riders need to know when is the right time to walk to the bus stop and hence do not spend much time waiting at the bus stop.
  • This reason becomes more critical in cold Fall/Winter to reduce the chance of freezing in the bus stop.
  • Based on already available data (from other people or estimation based on distance and crosswalk). However, as the more data collected from a particular user, it can be fitted and personalized to each user’s walking pace.

bus

This problem has not been addressed before. This problem is also a hard problem, not a trivial one to do it automatically. To do it manually, a student must looks up to where he want to be at certain time and matches with the bus schedule. However, a student must also count how long he needs to walk to the bus stop to catch it at the right time. The best way to address this problem is by triggering notification in user’s phone at the right time. However, we must carefully consider anything that might help in deciding the right time to walk to the bus stop. Because the best notification should be sent at the right time.

Razorback-Transit-Notification-Final-Demo2

Razorback-Transit-Notification-Final-Demo12. System Design

After careful considerations, following are the most important things that will help deciding the right time to the bus stop:

design1

design2

3. Implementation

The system design was implemented is iOS App.  The development was done using following tools:

Xcode 6.1.1, iOS 8, Swift, Mac OS X 10.10.

Following are the formal implementation of the system design:

  • When the app is launched, the user will be asked for permission to send notifications. If the user answered Don’t Allow, then the app will be pointless.
  • The app will then show options
    • to select or enter destination;
    • to detect or enter current location;
    • to enter or allow accessing calendar events to fetch desired arrival at the destination
  • Then the app will calculate the notification time by accessing current time an other things as described in system design. The app will use initial data from experiment.
  • The app sends the first notification, if the response is number 1 (Okay, I’ll start walking now), start counting walking time; then stop counting walking time when the accelerometer motion is very low; which indicates arriving at the nearest bus stop; this can be controlled further with the previous average walking time;
  • If the response is number 2 (Wait, I have to finish something first), prepare second and third notifications.
  • Repeat the process.

Screenshot of the notifications:

notif notif2
Figure 1a. The app is asking permission to send notifications. Figure 1b. The looks of the notification.

 

4. Experiment Results

  • 7xx S Stadium Dr to Lot 56 East Bus Stop, Green Route
  • 22 samples
  • Average walking time: 0:07:06, Stdev: 0.000396755
  • Average time taking a crosswalk: 0:00:47, Stdev: 0.00022868
  • Average total walking time: 0:07:52, Stdev: 0.000433772
2aFigure 2a. 2bFigure 2b.
2cFigure 2c. Figure 2a. Graphs of total walking timeFigure 2b. Graphs of walking time without taking a crosswalkFigure 2c. Graphs of taking a crosswalk

 

Lessons Learned:

  • Push notifications are always sent by a server. For development you can use your Mac as the server but for production use, you need at least something like a VPS (Virtual Private Server).
  • A cheap shared hosting account is not good enough. You need to be able to run a background process on the server, install an SSL certificate, and be able to make outgoing TLS connections on certain ports.
  • Most shared hosting providers do not let you do this, although they might if you ask.
  • To send push notification, need to have a paid Apple Developer Membership, $99 per year.
  • Need to setup many kind of keys and certificates from Apple Developer Center website and inside the app, to securely send push notifications.
  • Local notification does not need those, but the bus schedule needs to be stored on the phone.
  • Notification can not be done in the iOS Simulator, must be done on a real iOS device.

Further Use Cases and Development:

  • Should also count the walking time from destination bus stop to the actual destination building. For example, walking time from Union bus stop to JB Hunt or Mullins Library building.
  • Invitation email can be enhanced with a function that says “notify me to go to the bus stop for this event”. Gmail has a feature offering us to save an event to calendar, when it detects date and time in an email.
  • With social context, can help people from different places who want to meet at a particular bus stop at the same time to go together
  • Riders can rate bus drivers who provide best service, then some people can choose to be notified when a particular driver is available
  • Schedule notification plan for one day, for example: at 10am notify to go to class, at 2pm notify to go to Walmart.