Skip to content
brentlongstaff edited this page Jul 11, 2012 · 3 revisions

Mobility requires that two other services be installed: WiFiGPSService and AccelService.

WiFiGPSService collects Wi-Fi scan and GPS information. Mobility uses differences in WiFi scans to infer speed, to distinguish still and driving. In some locations, there are no nearby access points. GPS's speed is used instead of Wi-Fi in these scenarios. Originally, GPS speed was always used, but its unreliability in urban environments and indoors made it unsuitable. However, areas with no Wi-Fi are usually outdoors and away from large urban structures, so GPS tends to work better in the scenarios when it is required.

There are two versions of WiFiGPSService. One runs GPS all the time, and provides more accurate location information. The other only activates GPS when there are no nearby WiFi access points to use for speed estimation. It can give unreliable location values when it is relying on the network for location and GPS is off. However, it saves energy and makes running the application all day more feasible.

Mobility only uses GPS and Wi-Fi to estimate speed as described above. This is used to discern between being still and driving. The other modes, walking and running, are inferred solely based on accelerometer data received from AccelService. Mobility polls WiFiGPSService and AccelService for new data points, and first uses the accelerometer data to classify walking or running. If the user's activity is classified as either of those, Wi-Fi and GPS are not used. Otherwise, GPS or Wi-Fi are used to determine whether the user is still, and that is used to classify still vs. driving.

The driving detection can fail in cases where Wi-Fi and GPS are both unreliable, as in a steep canyon with no nearby buildings and limited access to the sky. Also, mobile hotspots can present a problem, either by moving past the user when he is still (causing the algorithm to decide he is driving) or if the user is traveling in a bus or car with people who are tethering (in the absence of outside access points, this could cause false still classifications).

Clone this wiki locally