I am using the Geolocation functionality of Xamarin Essentials in my app as a foreground service running all the time and I have noticed on several devices that I sometimes (although rarely) get locations which are really far away from where they should actually be, looking like this:
Location history with incorrect location
For the location I set a timeout of 60 seconds and the best accuracy possible. The incorrect location on the screenshot has an Accuracy
value of '8' but is much further away than 8 metres of the correct location. This raises the following questions:
- The location has the mentioned attribute
Accuracy
which refers to "horizontal accuracy". There is also an attributeVerticalAccuracy
but it is not clear whether this refers to an y-Axis if the coordinates are seen on a plain or if it means accuracy of the altitude? - What could be the reason for this single location to have such bad accuracy? All other points with similar accuracy values are actually very accurate. In this case it was the last location to be tracked but it also happens sometimes during longer tracking sessions.
- Is there any way to prevent this? I was thinking about implementing some level of statistical function to collect multiple points and get an average of them but that does not fix the root of the problem.
2条答案
按热度按时间ecr0jaav1#
我发现,如果我使用“提高定位精度=开”,我会得到一个奇怪的位置约每6 - 7秒。与它关闭(只使用GPS)没有奇怪的位置。S21+与双频gss/GPS。但如果我移动到一个新的位置,报告的位置不会改变,直到我得到可能20 yds从第一个位置。似乎在报告新值之前需要某个阈值距离。
lc8prwob2#
设备三星Galaxy S21 + 5G具有双频GPS/GNSS。请注意,如果我运行应用程序"GPSTest",我看不到位置的跳跃,当我移动时,我会实时看到位置的变化。