Gps or antenna triangulation - How to know the accuracy of the location?

4

I have an app that uses the api Location and works right on most devices, but it has one that even the GPS does not work with proper accuracy (goes over the house and not on the street).

By the test I made it uses triangulation of antennas even with the gps connected.

Does anyone know if there is a way to validate which type of location the device is using.

If it is with low precision (antenna triangulation) then I can draw a route between two points. If I do not use the route that GPS showed.

    
asked by anonymous 20.04.2016 / 16:37

1 answer

6

After you get a Location you can use the getAccuracy () to get the estimated precision in meters from that location.

Estimated accuracy is defined as the 68% confidence radius: If you draw a circle centered on this latitude and longitude, with a radius equal to the precision, there is a probability that 68% of the true location is within the circle.

You can use this value to decide whether to route between the two points or use the route that GPS showed.

The lower the value returned by the getAccuracy() method, the greater the accuracy of the location obtained.

    
20.04.2016 / 16:58