I am writing a UWP application and in one case I need to use geolocation from Windows. For this I use Windows.Devices.Geolocation.Geolocator
. However, there is a problem with accuracy. For example, if the location sensor gives me data with error radius of 3.87
, then the Geocoordinate shows this value as 3
, even though Accuracy
property has double
type.
Data in location sensor:
What I receive from Geolocator:
Accuracy property is double:
It seems that the Geolocator simply takes the integer part of the number and ignores the fractional. However, a problem occurs when error radius value is less than one.
Data in sensor:
What I receive from Geolocator:
In this case, I get an Accuracy
value of 0
.
The documentation (here) says that if the Accuracy
value is 0
, then accuracy level is unknown and Location API gives priority to sensors that provide a non-zero value.
SENSOR_CATEGORY_LOCATION doc:
Geolocator begins to take data by IP address with an Accuracy
of 165852
meters (for him, this data is more accurate than 0
)
Geoposition using IP address:
The fact is that I always need to work with a sensor that gives an accuracy of less than 1 meter.
Has anyone encountered such a problem? And what decision did you make?