question

LewCarlson-7949 avatar image
0 Votes"
LewCarlson-7949 asked LeonLu-MSFT commented

Xamarin Essentials Location Real Time Accuracy:

Newer Phones with Dual Frequency GNSS/GPS may provide better horizontal location with GPS only. This maybe achieved with controls on the phone. With out going to "GPS only" a "strange" location seem to be returned every some number of seconds (6 - 7 in my Testing using Best Accuracy), otherwise the location is solid. This is at a static location with clear view to sky. But when moving from this spot the returned location values do not change until a large distance 20+ yds or more have been traversed.

I know altitude maybe an issue with "GPS only" but altitude from other sources with out using their horizontal location may be a possible solution.

There seem to be some threshold before a new value is returned. My App needs real time position as a person walks. I know this is possible as I see this with an App like "GPSTest". Is there a way to allow the override of this threshold, or if it's not a threshold, get a more real time location?

dotnet-xamarin
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

You can set GeolocationAccuracy.Best. For iOS you can get the real time accuray, For Android, you can check the source code about Xamarin.Essentials: Geolocation
You can re-write PlatformLocationAsync method, get the location data just from GPS( you can see the line 66 in source code, it add NetworkProvider )

And you can re-write GetBestProvider, it set accuracyDistance = 50, you can set it to smaller value.

case GeolocationAccuracy.Best:
                    criteria.Accuracy = Accuracy.Fine;
                    criteria.HorizontalAccuracy = Accuracy.High;
                    criteria.PowerRequirement = LocationPower.High;
                    accuracyDistance = 50;



https://github.com/xamarin/Essentials/blob/main/Xamarin.Essentials/Geolocation/Geolocation.android.cs

0 Votes 0 ·

0 Answers