Why is the Locationlistener onLocationChanged so inaccurate?

Asked

Viewed 317 times

0

I’m working with Android gps. I’m using the LocationManager.GPS_PROVIDER and it is giving me very bad points, far away from my location. Has anyone ever worked with this tool? is normal? I thank you already.

1 answer

2

The actual accuracy of a device depends on the chipset, the location you are in ( in a closed place, tends to be more inaccurate) among others. All locations generated by Locationmanager include an accuracy: getAccuracy()

This is informed with 68% confidence!

Typically, the accuracy of a device is given as a distance together with the percentage of measurements that are within the distance of that actual location.

The typical accuracy of a handheld GPS device would be something like 30% of your measurements within 50 meters of the actual position (yes, the devices are typically that inaccurate).

For something more accurate, consider using only more accurate Locations :

 if(location.getAccuracy() < 25.0){
 // Usamos esta localização
}
  • 1

    Does Thiago have a link to this data? It is something of interest to me =)

  • 1

    You are in answer! segue : https://developer.android.com/reference/android/location/Location.html#getAccuracy()

Browser other questions tagged

You are not signed in. Login or sign up in order to post.