Android的GPS坐标散 [英] Android GPS Coordinates Scattered

查看:275
本文介绍了Android的GPS坐标散的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有低于以下code似乎是美好的工作:

  // GPS阅读器
    //标准
    标准标准=新标准();
    //criteria.setAccuracy(Criteria.ACCURACY_COARSE); //使用的时候,我们无法获得GPS定位
    criteria.setAccuracy(Criteria.ACCURACY_FINE); //使用时,我们可以得到一个GPS定位

    criteria.setAltitudeRequired(假);
    criteria.setBearingRequired(假);
    criteria.setCostAllowed(真正的);
    criteria.setPowerRequirement(Criteria.POWER_LOW);

    LocationListener的LocationListener的=新MyLocationListener();
    LocationManager LM =(LocationManager)getSystemService(Context.LOCATION_SERVICE);
    lm.requestLocationUpdates(lm.getBestProvider(标准,真),0,0,
            LocationListener的);
 

然而,当我绘制我已经收集了关于谷歌地图数据,GPS坐标非常分散在某些情况下,或将沿着一条路径,我走只是觉得和去那么所有的突然跳跃到一个点一英里远,然后返回。有什么办法解决这一问题?某种精确的检查我猜?

更新

基本上我的问题是这样的一个例子 - <一个href="https://1db48f04-a-62cb3a1a-s-sites.googlegroups.com/site/gpsbenchmark/the-mobile-app2/13-Results-edited.png?attachauth=ANoY7cqSdldGcP-XWENOxIIa79hluyRI9spiadiiHw9Kaqhe-apONhPdypQ_pDPprCXbeP37qWD32sBitMVXrPO6sn5-Al1XVpWSEkf_DRf4MJbKqg8rJsb_gXrN1joj6W2Gqecq8DAEbBpOpxxr-wCO9mE93pkI1wZ1pXjilBjl1PedPZS6BdI8ohuTwfR2i74N1ptO2iJ7GCiYPLedoSzYlUFFUMwivor-hdcv3lXnBrmjOWD9jP_mJeuNgyj8VNgXNbTqmcyC&attredirects=0">GPS抖动

更新2

我认为不使之成为一个赏金,但我想我还不如拿的东西是怎么回事一个全面的了解,看看,也许我的做法是超必杀。我仍然有同样的问题,我的坐标有抖动他们尽管我有3米的精度,等等。现在,这可能是现有的卫星,等我不知道,但基本上我想了解在所有这些其他的应用程序,尤其是运动应用程序,能够获得相同的情况下这种流畅的读数。

我是Quora的,是能够找到这个<一个href="http://www.quora.com/Mobile-Applications/Does-any-running-app-have-a-feature-of-filtering-GPS-data-to-get-more-accurate-tracking">Does所有正在运行的应用程序有过滤GPS数据的功能,以获得更准确的跟踪?遗憾的是它并没有提供多少洞悉了我的问题,但你可以使用一个卡尔曼滤波器,如果你想要的,但肯定必须有少复杂的方法,因为我怀疑大多数应用程序在那里正在实施这一点。

不管怎样,如果一个家伙开发商想与大家分享他们在做什么用一些伪code,这将是极大的AP preciated。我的意思是,如果我坚持用卡尔曼我,但我可以肯定得是比较容易实现的算法,并会希望了解那些和如何实现它们,这是体面的配合。

背景:这是一个移动的行人应用

相关SO问题我试图从搜集资料的 <一href="http://stackoverflow.com/questions/9367966/create-a-smooth-curve-from-a-series-of-gps-coordinates">Create从一系列GPS的平滑曲线坐标 平滑的GPS数据:这是一个良好的开端,虽然我不知道什么伪code我需要实现正确窈窕正常进行最小二乘法,让我有一个花键的GPS数据,然后我就可以查看类似谷歌地图来确认我没有做到了。我认为这个问题是如果这是一般的X和Y数据我正在处理,而不是GEO坐标,我可以写的东西在MATLAB测试,并继续下去。

更新3

在搞砸了GPS数据,我recieving的图像 <一href="https://www.dropbox.com/s/ilsf8snao2no65e/gpsdata2.png">https://www.dropbox.com/s/ilsf8snao2no65e/gpsdata2.png

code https://gist.github.com/4505688

解决方案

你做了什么,因为你的标准,确定了最佳供应商为 NETWORK_PROVIDER 。 这并不确定自己的位置,而是让你的手机信号塔,其范围涵盖了您的device.So当你在任何建筑物最好是使用之外的位置 GPS_PROVIDER 来获得地理locations.Why细精度你散统筹是因为你的设备进入到另一个手机信号塔的位置,因此会发生跳跃范围。直接使用 GPS_PROVIDER 是你永远不会得到最好的解决方案。

I have the following code below which seems to be working fine:

    // GPS Reader
    // Criteria
    Criteria criteria = new Criteria();
    //criteria.setAccuracy(Criteria.ACCURACY_COARSE); // Used when we can't get a GPS Fix
    criteria.setAccuracy(Criteria.ACCURACY_FINE); // Used when we can get a GPS Fix

    criteria.setAltitudeRequired(false);
    criteria.setBearingRequired(false);
    criteria.setCostAllowed(true);
    criteria.setPowerRequirement(Criteria.POWER_LOW);

    LocationListener locationListener = new MyLocationListener();
    LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
    lm.requestLocationUpdates(lm.getBestProvider(criteria, true), 0, 0,
            locationListener);

However, when I graph the data I have collected on Google maps, the GPS coordinates are very scattered in some instances, or it will be going along a path I am walking just find and then all of the sudden jump to a point a mile away and then back. Is there any way to fix this? Some sort of accuracy check I guess?

Update:

Basically my problem looks like this as an example - GPS Jitter

Update 2:

I considered not making this a bounty but I figured I might as well get a complete understanding of what is going on here, and see if maybe my approach is over kill. I still have the same problem that my coordinates have jitter in them despite the fact that I have accuracies of 3m, etc. Now this could be to available satellites, etc. I don't know, but basically I'm trying to understand how are all these other applications, especially the exercise apps, able to get such smooth readings under the same circumstances.

I was on Quora and was able to find this Does any running app have a feature of filtering GPS data to get more accurate tracking? Unfortunately it didn't give much insight into my problem, except you can use a Kalman filter if you want, but surely there has to be less complex means, since I doubt most apps out there are implementing this.

Anyways if a fellow developer would like to share what they are doing with some pseudocode that would be greatly appreciated. I mean if I'm stuck with Kalman I am, but I am sure there have to be easier to implement algorithms, and would hope to learn those and how to implement them, that are decent fits.

Context: This is a mobile pedestrian application.

Relevant SO Questions I have tried to glean information from Create a smooth curve from a series of GPS coordinates Smooth gps data : This was a good start, though I am not sure what pseudocode I would need to implement to properly get the Least Squares Fit to work appropriately so that I will have a splines GPS data which I can then view on something like google maps to confirm I did it correctly. I think the issue is if this was general X and Y data I was dealing with, and not GEO coordinates, I could write something up in matlab test it, and go on.

Update 3

An image of the messed up GPS data I am recieving https://www.dropbox.com/s/ilsf8snao2no65e/gpsdata2.png

Code https://gist.github.com/4505688

解决方案

What you are getting is because your criteria identifies best provider as NETWORK_PROVIDER. Which does not identify your location but instead gives you the location of the cell tower whose range covers your device.So when you are outside of any building it is better to use GPS_PROVIDER to get fine accuracy of Geo locations.Why you get scattered co-ordinate is because your device comes to range of another cell tower hence location jump happens. Directly use GPS_PROVIDER is the best solution you will ever get.

这篇关于Android的GPS坐标散的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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