令人难以置信的不准确的GPS点。是什么原因? [英] Unbelievably inaccurate GPS points. What is the reason?

查看:105
本文介绍了令人难以置信的不准确的GPS点。是什么原因?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个Android应用程序,用于存储用户的GPS位置。

我的一位客户给了我他的设备,我注意到有时设备的准确性非常糟糕,令人难以置信。有时,设备会返回离实际位置约200公里的地点。

您可以在以下GPS设备位置示例中看到此信息。您看到两点距离真实位置约200公里。



设备是带有Android 4.2.2的Samsung SM-T111,我只使用GPS提供商( LocationManager.GPS_PROVIDER )。



我想知道导致问题的原因,对于这类不准确?

我直接存储从供应商处收到的积分。这是我在 onLocationChanged 中的代码:



UPDATE

  @Override 
public void onLocationChanged(Location location){
try {

if(location.getAccuracy ()<= MAX_DISTANCE_TOLERANCE){

gotLocation(new GPSLocation(location.getLatitude(),
location.getLongitude(),location.getTime(),
location.getAccuracy (),
location.getProvider(),location.getSpeed()));
}

} catch(Exception e){
MessageBox.showExceptionToast(_context,e);
}
}



解决方案


我想知道这种不准确的问题是什么?


硬件/固件,最有可能的。换句话说,责备三星。



这不太可能是你的应用程序。假设您为这些失败点获得的准确度值在 MAX_DISTANCE_TOLERANCE 内,并且假定 MAX_DISTANCE_TOLERANCE 小于200公里,你忠实地使用你得到的数据。如果这些数据存在缺陷,那么这些缺陷将来自系统本身。



您可以创建更适应性的过滤器。除了测试 MAX_DISTANCE_TOLERANCE 的准确性外,您还可以:


  • 计算时间在给出的最后一个位置和您正在处理的新位置之间
  • 根据您希望设备的某个最大速度计算此时可能覆盖的最大距离

  • 计算这两个位置之间报告的距离(对此, Location 有一个静态方法)

  • 拒绝报告的距离远远超出您认为设备在此期间可能移动的位置 例如,您的第一个不良解决方案是在前一个解决方案后20分钟。除非您认为该设备可能以600公里/小时的速度行驶,否则您会拒绝这个不合理的修补程序,因为这是不现实的。



    只有在您有一些一致的修复程序后, 。您可能会要求快速位置更新几分钟,检查数据,抛出任何异常值,然后应用该设备真的走了那么远吗?测试未来的修补程序。


    I have developed an application for Android, for storing user's GPS location.

    One of my customers gave me his device and I noticed that sometimes the accuracy of the device is really bad and unbelievable. Sometimes the device returns points about 200 kilometers away from the actual location.

    You can see this in the following GPS location samples for that device. You see that two points are about 200 km away from the real location.

    The device is Samsung SM-T111 with Android 4.2.2, and I only use a GPS provider for getting locations (LocationManager.GPS_PROVIDER).

    I want to know what causes the problem, for this kind of inaccuracy?

    I directly store the points received from the provider. This is my code in onLocationChanged:

    UPDATE

            @Override
            public void onLocationChanged(Location location) {
                try {
    
                        if (location.getAccuracy() <= MAX_DISTANCE_TOLERANCE) {
    
                            gotLocation(new GPSLocation(location.getLatitude(),
                                    location.getLongitude(), location.getTime(),
                                    location.getAccuracy(),
                                    location.getProvider(), location.getSpeed()));
                        }               
    
                } catch (Exception e) {
                    MessageBox.showExceptionToast(_context, e);
                }
            }
    

    解决方案

    I want to know what can be the problem for this kind of inaccuracy?

    Hardware/firmware, most likely. In other words, blame Samsung.

    It's unlikely to be your app. Assuming that the accuracy values that you are getting for those failed points are within MAX_DISTANCE_TOLERANCE, and assuming that MAX_DISTANCE_TOLERANCE is less than 200km, you are faithfully using the data that you get. If that data is flawed, those flaws are coming from the system itself.

    You could create a more adaptive filter. In addition to testing the accuracy for MAX_DISTANCE_TOLERANCE, you could:

    • Calculate the time between the last location you were given and the new one that you are processing now
    • Calculate the maximum distance that could be covered in that time, based on some maximum speed that you expect the device to be going
    • Calculate the distance reported between those two locations (there's a static method on Location for this)
    • Reject locations where the reported distance is further than you think the device could have moved in this period of time

    For example, your first bad fix comes 20 minutes after the previous one. Unless you think the device might travel at 600 km/hour, you would reject the bad fix as being unrealistic.

    This algorithm will only work after you have a few consistent fixes. You might ask for rapid location updates for a few minutes, examine that data, throw out any outliers, then apply the "could the device really have travelled that far?" test for future fixes.

    这篇关于令人难以置信的不准确的GPS点。是什么原因?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆