Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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

— asked August 8th 2010 by u no
  • accuracy
  • android
  • geolocation
0 Comments

2 Answers

  • Would be great to know, anyone knows the answer what would be faster?

    — answered December 9th 2011 by Darius H.
    permalink
    0 Comments
  • 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

    — answered January 22nd 2014 by Glen McPherson
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.