Skip to main content

App Specification

General Requirement

The general requirement is to develop an app which records the amount of time a user spends within the vicinity of a location. Data on the wait time and the location where the wait was made should be transmitted to a server.

  1. Starting and ending recording is user-initiated. Thus the app should enable the user to toggle between start recording and end recording.
  2. The app should be able to recover in case the user forgot to initiate end of recording. Thus the app should check for location change at fixed intervals and therefrom determine if circumstances suggest that the user has forgotten to initiate end of recording.
  3. The app should send data to the server, but in case there is no data connection, it should be able to queue the data for transmission and send it out once a data connection is established next time the app is activated.
Assumptions

The following assumptions are made and included as business rule:

First, polling of location data is at 5 minutes interval. This saves battery life while still acceptable as practical and realistic noting that wait times less than 15 minutes (polling is less than 3 times) can be discarded for being reasonable.

Second, trucks are allowed to move for 500 meters in any 5-minute interval before it can be assumed to have left a queue and is back on the road. It can be that the truck has moved up the queue or the driver found a more suitable parking spot. If the truck has changed location for more than 500 meters in a 5-minute interval, the truck is assumed to have left the vicinity.

Software Algorithm

The following is the recommended app algorithm:

01 On app activation, determine if it is the initial run or the app is just being resumed. If the app is being resumed, re-establish app state, else initialise the app and record time and location. This is known as starting time and starting location. The current location and the current time is initially the same as the starting time and starting location.

02 Check if there is data pending transmission. If there is data pending transmission, check data connection and attempt to transmit. If transmission is successful, mark off transmitted data else keep data in queue pending transmission.

03 While app is not manually stopped, record time and location data every 5 minutes. This is known as polled time and polled location. Compare the polled data with the current data. If within a 5-minute interval the location data has changed for more than 500 meters, the truck is assumed to be moving towards cruising speed. The user is then prompted for confirmation.

04 If the user confirms that the truck is already on the road, the current location and the current time is transmitted to the server and the app state is reset to that of Step 01. If the user indicates that the truck is still waiting or in queue, the current time is updated with the polled time and the current location is updated with the polled location.

05 If the user does not provide any feedback, it will be assumed that indeed the truck is moving towards cruising speed already. The current location and the current time is transmitted to the server and the app state is reset to that of Step 01.

06 If the app is manually stopped, the time is recorded as ending time and the location is recorded as ending location. The ending data is compared with the starting data, and if the time interval is less than 15 minutes, the app state is reset to that of Step 01. If the time interval is 15 minutes or more, the ending time and ending location is transmitted to the server and the app state is reset to that of Step 01.

Comments

Popular posts from this blog

Project Overview

The Wait Advisor is an app which truck drivers can use to record wait times. A typical user story will be like this: Use of the app is as simple and straightforward as possible. When a truck is stuck in a queue, the truck driver can quickly activate the app and when the wait is over, the truck driver simply deactivates the app to signal that the truck is ready to move to its next destination. What happens in the background is that when the truck driver activates the app, it records the current time and location. When the app is deactivated, it records the time and location at the time of deactivation. The wait time is then calculated as the time that has elapsed between the time when recording was started to the time when it was stopped. The app then transmits this data to the server in the cloud. Data is gathered in this way. The more truck drivers use the app, the more data the server will receive. When there is sufficient number of users, data can then be aggregated to make

The Wait Advisor in Big Rigs

In the lead up to the Technology and Maintenance Conference in Melbourne, News Corporation Australia's Big Rigs published an article about the Wait Advisor. Our thanks to Bob Riley for writing this up.