geolocation accuracy vs. distanceFilter
hello, i'm trying to figure out the fastet and/or most accurate method to get a geolocation, and how that does affect how often the geolocation listener fires.
i.e., does
Titanium.Geolocation.accuracy = Titanium.Geolocation.ACCURACY_BEST;
Titanium.Geolocation.distanceFilter = 10;
result in less but more accurate geolocation events than, lets say
Titanium.Geolocation.accuracy = Titanium.Geolocation.ACCURACY_HUNDRED_METERS;
Titanium.Geolocation.distanceFilter = 10;
i don't understand completely how these both constants relate together. thanks for any tip, uno
2 Answers
-
Would be great to know, anyone knows the answer what would be faster?
-
The settings aren't really based on speed, but rather accuracy and battery consumption. So as you rightly stated, "ACCURACY_HUNDRED_METERS" is less accurate than "ACCURACY_BEST", however "ACCURACY_BEST" will consume more battery power as it's working harder to find the most accurate location.
You don't use them together - you choose one or the other depending on what you're trying to geolocate.
You can read a good explanation and a complete list of parameters by clicking this link.
In order from most accurate to least accurate:
- ACCURACY_BEST (highest accuracy and power consumption)
- ACCURACY_HIGH
- ACCURACY_NEAREST_TEN_METERS
- ACCURACY_HUNDRED_METERS
- ACCURACY_KILOMETER
- ACCURACY_LOW
- ACCURACY_THREE_KILOMETERS (lowest accuracy and power consumption).
There's also a setting for navigation apps:
- ACCURACY_BEST_FOR_NAVIGATION (Available in iOS 6.0 and above)
Hope that helps,
Glen