Search code examples
iosiphoneswiftgeolocation

Accurate geolocation range variables


How can I get accurate geolocations coordinates for my app. For some cases I need to know where the phone is with an error ~8 meters.

Does swift location manager handles all the algorithmic stuff? Can it be made more accurate?

My app will target cities which may be a useful information.


Solution

  • The location accuracy delivered by Core Location will depend on a number of factors, in particular

    • The quality of GPS signals; these can be degraded or non-existent indoors or underground. Large buildings in a city centre can also reflect these signals causing location inaccuracy
    • The availability of known WiFi networks
    • How long location services has been active

    You can request a specific level of location accuracy using the desiredAccuracy property on your CLLocationManager instance. The default value is kCLLocationAccuracyBest, which is the highest level of accuracy, but typically no better than 10m due to the limitations of the GPS signals.

    When location updates are delivered to your didUpdateLocations: delegate method you can examine the horizontalAccuracy attribute for an indication of the positional accuracy of the location.