We are evaluating WP8 for one of our app. It makes use of GPS for tracking contractor working in area. We are seeing Nokia Lumia as very good hardware platform but facing issue with software stack.
a.We tried geolocator feature of this platform along with MovementThreshold set as 100 along with accuracy set as HIGH. b. Still we are seeing error in data(even if we move for about a meter we get interrupt and location too far from the actual). After searching on web and docs, we found that 'On WP8, Satelite GPS based locations will only availed if location info can not be fetched from WiFi/Cellular network.
This is killing the fine tuned tracking of object. Is there any way (like in android we can choose provider) we can force Sat. based GPS?
I am sorry if it is kind of duplicate.
Any help will be appreciated.
PS : We have already applied formula for calculating diff between to points and do filtering with threshold but its not good approach. Regards...
There are 2 Geocoordinate classes 1 Geo*C*oordinate which comes under System.Device.Location namespace 2 Geo*c*oordinate which comes under Windows.Devices.Geolocation namespace
if you use Geolocator in your tracking code then the coordinate you get is Geocoordinate as both comes in same namespace as mentioned in 2 ,Windows.Devices.Geolocation and if you use geocoordinatewatcher it gives you GeoCoordinate as both comes in 1 System.Device.Location.
If you are using Geocoordinatewatcher above code works fine but if you are using Geolocator then HorizontalAccuracy property wont be available there for you, instead you have to use Accuracy Property .
private const double ACCURACY_THRESHOLD = 20;
private void LocationChanged(Geocoordinate coordinate)
{
if (coordinate.Accuracy < ACCURACY_THRESHOLD)
{
// use point
}
else
{
// ignore and wait for better accuracy
}
}
or what you can do is you can convert Geocoordinate to GeoCoordinate and use the code mentioned in above answer .
You cannot force satellite based tracking, but by choosing high accuracy they will be enabled. You can then evaluate the accuracy of the location that is received, and choose not to use ones that are inaccurate. Accuracy is part of the GeoCoordinate class, in meters.
private const double ACCURACY_THRESHOLD = 20;
private void LocationChanged(GeoCoordinate coordinate)
{
if (coordinate.HorizontalAccuracy < ACCURACY_THRESHOLD)
{
// use point
}
else
{
// ignore and wait for better accuracy
}
}
See http://msdn.microsoft.com/en-us/library/system.device.location.geocoordinate.horizontalaccuracy.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With