-
Notifications
You must be signed in to change notification settings - Fork 17
Detecting Inefficient Location API Configurations
This page briefly explains our typestate configuration for detecting inefficient location API configurations based on our upcoming ICSME paper.
The various configurations of Standard Location Service and Visits Location Service (among other services) are categorized in terms of optimality in the paper. Adding the foreground and background optimality scores for each configuration, we get a total score for optimal configuration (higher is less optimal). We then classify ranges of the score (x) that we deem good (x<5, π’), nonoptimal (5<=x<=6, π‘), and very nonoptimal (x>6, π΄). The following tables show the configurations and their scores.
Standard Location Service
The user can configure the desiredAccuracy
and distanceFilter
fields of the CLLocationManager
. The columns represent desiredAccuracy
settings, and the rows represent distanceFilter
settings. S<X> represents the configuration identifiers from the paper.
Best | 100m | 1km | Navigation | |
---|---|---|---|---|
16 | S1, 5 π‘ | S6, 3 π’ | S11, 4 π’ | S16, 6 π‘ |
256 | S2, 5 π‘ | S7, 3 π’ | S12, 2 π’ | S17, 6 π‘ |
4096 | S3, 9 π΄ | S8, 6 π‘ | S13, 4 π’ | S18, 8 π΄ |
4096 | S4, 10 π΄ | S9, 5 π‘ | S14, 3 π’ | S19, 8 π΄ |
65536 | S5, 4 π’ (default) | S10, 2 π’ | S15, 2 π’ | S20, 4 π’ |
Example:
locationManager.startUpdatingLocation()
locationManager.desiredAccuracy = kCLLocationAccuracyBest
locationManager.distanceFilter = 4096
This configuration is very non-optimal. Note that startUpdatingLocation()
must be called in order to activate the service.
Visits Location Service
The user can configure the activityType
field of the CLLocationManager
. V<X> represents the configuration identifiers from the paper.
airborne | automotiveNavigation | fitness | other | otherNavigation |
---|---|---|---|---|
V1, 2 π’ | V2, 5 π‘ | V4, 7 π΄ | V5, 5 π‘ (default) | V6, 8 π΄ |
Example:
locationManager.startMonitoringVisits()
locationManager.activityType = CLActivityType.fitness
This configuration is very non-optimal. Note that startMonitoringVisits()
must be called in order to activate the service.