Running Speed Estimator


The running speed estimator allows you to monitor the running speed of the user carrying the client device using collected accelerometer data. The estimator implements the learning based algorithm described in to predict the running speed. This estimator works periodically approximately every 2.5 seconds as accelerometer data is collected.

This tutorial will cover how to initialize the estimator and read running speed estimates periodically.

Initializing The Running Speed Estimator


In order to estimate the running speed of a client, the client device must be equipped with a triaxial accelerometer. Most smartphones and other Android-capable devices come equipped with an accelerometer, so we assume that the current device has one. If, however, there are some prerequisites that the estimator does not meet, the function reqSatisfied() will throw an ExtractorPrerequisiteUnsatisfiedException instead of returning void ,  which is exemplified by the try-catch in  the code snippet below.

Holding Data

Once you have verified that the estimator can run on the client device using the  reqSatisfied() method, we can create a place to store the data we are hoping to collect. This is done by creating a  BackableEncapsulator  instance as shown in the following snippet. Note: we must define a collection period of either 2.56 seconds or 5.12 seconds:

Adding a Listener

We can now add a new listener for the extractor. This listener will be triggered whenever a new datapoint is added to the encapsulator.

Running the Estimator

Finally, once we have a secure location to store our running speed data, we can initialize the estimator. This requires a single line of code as shown bellow:

That’s it!

Running Example

(TODO: complete)


Park, Jun-geun, Ami Patel, Dorothy Curtis, Seth Teller, and Jonathan Ledlie. 2012. “Online Pose Classification and Walking Speed Estimation Using Handheld Devices.” In Proceedings of the 2012 ACM Conference on Ubiquitous Computing, 113–22.