1

2 个不同的 android 设备返回完全相同的 GPS 坐标的概率是多少。根据wiki,小数点后5位给出的精度为1.1m,onLocationChanged返回到小数点后7位,表示精度为1cm。GPS现在我们还必须考虑技术本身会引入一些错误的事实。据我了解(以及我的测试),保持在同一位置的手机返回 0.18143341 米到 22 米之间。

我需要知道这一点才能得出一个现实的算法来通过他们的位置来识别人。问题是,我是否需要在我的等式组合中也关联该人的身份,或者我可以安全地假设完全相同位置的 2 部手机不会返回完全相同GPS(永远)。

有人想吗?

下面的示例(相隔 30 秒)

02-21 14:18:48.679: D/Taxeeta:RegularUpdates(5511): Is location changed 0.13724314
02-21 14:19:18.678: D/Taxeeta:RegularUpdates(5511): Is location changed 0.13724314
02-21 14:19:48.668: D/Taxeeta:RegularUpdates(5511): Is location changed 0.11805124
02-21 14:20:18.797: D/Taxeeta:RegularUpdates(5511): Is location changed 6.563945
02-21 14:20:48.676: D/Taxeeta:RegularUpdates(5511): Is location changed 0.18143341
02-21 14:21:18.725: D/Taxeeta:RegularUpdates(5511): Is location changed 0.13724314
02-21 14:21:48.685: D/Taxeeta:RegularUpdates(5511): Is location changed 2.6022007
02-21 14:22:18.704: D/Taxeeta:RegularUpdates(5511): Is location changed 6.5060697
02-21 14:22:48.703: D/Taxeeta:RegularUpdates(5511): Is location changed 6.572767
02-21 14:23:18.662: D/Taxeeta:RegularUpdates(5511): Is location changed 0.13724314
02-21 14:23:48.772: D/Taxeeta:RegularUpdates(5511): Is location changed 6.563945
02-21 14:24:18.681: D/Taxeeta:RegularUpdates(5511): Is location changed 0.1327054
02-21 14:24:48.720: D/Taxeeta:RegularUpdates(5511): Is location changed 7.176328
02-21 14:25:18.700: D/Taxeeta:RegularUpdates(5511): Is location changed 7.6471653
02-21 14:25:48.609: D/Taxeeta:RegularUpdates(5511): Is location changed 0.13724314
02-21 14:26:18.708: D/Taxeeta:RegularUpdates(5511): Is location changed 7.790146
02-21 14:26:48.717: D/Taxeeta:RegularUpdates(5511): Is location changed 14.501556
02-21 14:27:18.797: D/Taxeeta:RegularUpdates(5511): Is location changed 0.1327054
02-21 14:27:48.676: D/Taxeeta:RegularUpdates(5511): Is location changed 0.13724314
02-21 14:28:18.705: D/Taxeeta:RegularUpdates(5511): Is location changed 0.19548245
02-21 14:28:48.704: D/Taxeeta:RegularUpdates(5511): Is location changed 23.221346
02-21 14:29:18.684: D/Taxeeta:RegularUpdates(5511): Is location changed 0.18143341
02-21 14:29:48.723: D/Taxeeta:RegularUpdates(5511): Is location changed 7.176328
02-21 14:30:18.662: D/Taxeeta:RegularUpdates(5511): Is location changed 0.13724314
02-21 14:30:48.752: D/Taxeeta:RegularUpdates(5511): Is location changed 6.3350186
02-21 14:31:18.691: D/Taxeeta:RegularUpdates(5511): Is location changed 0.18143341
02-21 14:31:48.670: D/Taxeeta:RegularUpdates(5511): Is location changed 0.18143341
02-21 14:32:18.679: D/Taxeeta:RegularUpdates(5511): Is location changed 0.1327054
02-21 14:32:48.699: D/Taxeeta:RegularUpdates(5511): Is location changed 7.411349
02-21 14:33:18.708: D/Taxeeta:RegularUpdates(5511): Is location changed 0.18143341
02-21 14:33:48.697: D/Taxeeta:RegularUpdates(5511): Is location changed 22.613928
02-21 14:34:18.666: D/Taxeeta:RegularUpdates(5511): Is location changed 0.13724314
02-21 14:34:48.686: D/Taxeeta:RegularUpdates(5511): Is location changed 0.11805124
02-21 14:35:18.675: D/Taxeeta:RegularUpdates(5511): Is location changed 0.18143341
02-21 14:35:48.664: D/Taxeeta:RegularUpdates(5511): Is location changed 0.13724314
02-21 14:36:18.663: D/Taxeeta:RegularUpdates(5511): Is location changed 0.19548245
02-21 14:36:48.693: D/Taxeeta:RegularUpdates(5511): Is location changed 22.190514
02-21 14:37:18.782: D/Taxeeta:RegularUpdates(5511): Is location changed 7.2989116
02-21 14:37:48.701: D/Taxeeta:RegularUpdates(5511): Is location changed 20.302017
02-21 14:38:18.721: D/Taxeeta:RegularUpdates(5511): Is location changed 22.503975
02-21 14:38:48.670: D/Taxeeta:RegularUpdates(5511): Is location changed 0.13724314
02-21 14:39:18.699: D/Taxeeta:RegularUpdates(5511): Is location changed 0.11805124
02-21 14:39:48.648: D/Taxeeta:RegularUpdates(5511): Is location changed 0.0
02-21 14:40:18.668: D/Taxeeta:RegularUpdates(5511): Is location changed 0.13724314
02-21 14:40:48.787: D/Taxeeta:RegularUpdates(5511): Is location changed 0.1327054
02-21 14:41:18.876: D/Taxeeta:RegularUpdates(5511): Is location changed 0.11805124
02-21 14:41:48.705: D/Taxeeta:RegularUpdates(5511): Is location changed 0.18583706
02-21 14:42:18.705: D/Taxeeta:RegularUpdates(5511): Is location changed 7.411349
02-21 14:42:48.664: D/Taxeeta:RegularUpdates(5511): Is location changed 0.0
02-21 14:43:18.703: D/Taxeeta:RegularUpdates(5511): Is location changed 0.11805124
02-21 14:43:48.692: D/Taxeeta:RegularUpdates(5511): Is location changed 15.474865
02-21 14:44:18.772: D/Taxeeta:RegularUpdates(5511): Is location changed 0.18143341
02-21 14:44:48.671: D/Taxeeta:RegularUpdates(5511): Is location changed 0.13724314
02-21 14:45:18.700: D/Taxeeta:RegularUpdates(5511): Is location changed 0.13724314
02-21 14:45:48.700: D/Taxeeta:RegularUpdates(5511): Is location changed 7.176328
02-21 14:46:18.699: D/Taxeeta:RegularUpdates(5511): Is location changed 22.503975
02-21 14:46:48.738: D/Taxeeta:RegularUpdates(5511): Is location changed 7.176328
02-21 14:47:18.677: D/Taxeeta:RegularUpdates(5511): Is location changed 0.13724314
02-21 14:47:48.677: D/Taxeeta:RegularUpdates(5511): Is location changed 0.13724314
02-21 14:48:18.676: D/Taxeeta:RegularUpdates(5511): Is location changed 0.13724314
02-21 14:48:48.885: D/Taxeeta:RegularUpdates(5511): Is location changed 0.19548245
02-21 14:49:18.674: D/Taxeeta:RegularUpdates(5511): Is location changed 0.18143341
02-21 14:49:48.694: D/Taxeeta:RegularUpdates(5511): Is location changed 6.524145
02-21 14:50:18.763: D/Taxeeta:RegularUpdates(5511): Is location changed 0.1327054
02-21 14:50:48.702: D/Taxeeta:RegularUpdates(5511): Is location changed 6.4802594
02-21 14:51:18.712: D/Taxeeta:RegularUpdates(5511): Is location changed 6.4802594
02-21 14:51:48.671: D/Taxeeta:RegularUpdates(5511): Is location changed 0.19548245
02-21 14:52:18.690: D/Taxeeta:RegularUpdates(5511): Is location changed 7.790146
02-21 14:52:48.689: D/Taxeeta:RegularUpdates(5511): Is location changed 4.656421
02-21 14:53:18.689: D/Taxeeta:RegularUpdates(5511): Is location changed 6.563945
02-21 14:53:48.768: D/Taxeeta:RegularUpdates(5511): Is location changed 0.13724314
02-21 14:54:18.667: D/Taxeeta:RegularUpdates(5511): Is location changed 0.11805124
02-21 14:54:48.726: D/Taxeeta:RegularUpdates(5511): Is location changed 6.524145
02-21 14:55:18.696: D/Taxeeta:RegularUpdates(5511): Is location changed 6.7189484
02-21 14:55:48.685: D/Taxeeta:RegularUpdates(5511): Is location changed 0.11805124
02-21 14:56:18.854: D/Taxeeta:RegularUpdates(5511): Is location changed 0.18143341
02-21 14:56:48.713: D/Taxeeta:RegularUpdates(5511): Is location changed 6.4802594
02-21 14:57:18.813: D/Taxeeta:RegularUpdates(5511): Is location changed 6.6248784
02-21 14:57:48.692: D/Taxeeta:RegularUpdates(5511): Is location changed 7.176328
02-21 14:58:18.731: D/Taxeeta:RegularUpdates(5511): Is location changed 6.524145
02-21 14:58:48.691: D/Taxeeta:RegularUpdates(5511): Is location changed 0.13724314
02-21 14:59:18.670: D/Taxeeta:RegularUpdates(5511): Is location changed 0.18143341
02-21 14:59:48.749: D/Taxeeta:RegularUpdates(5511): Is location changed 7.176328
02-21 15:00:18.688: D/Taxeeta:RegularUpdates(5511): Is location changed 0.18143341
02-21 15:00:48.748: D/Taxeeta:RegularUpdates(5511): Is location changed 0.22683989
02-21 15:01:18.797: D/Taxeeta:RegularUpdates(5511): Is location changed 0.22683989
02-21 15:01:48.716: D/Taxeeta:RegularUpdates(5511): Is location changed 21.353783
02-21 15:02:18.745: D/Taxeeta:RegularUpdates(5511): Is location changed 0.1327054
02-21 15:02:48.695: D/Taxeeta:RegularUpdates(5511): Is location changed 0.11805124
02-21 15:03:18.684: D/Taxeeta:RegularUpdates(5511): Is location changed 0.1327054
02-21 15:03:48.723: D/Taxeeta:RegularUpdates(5511): Is location changed 6.0702796
02-21 15:04:18.783: D/Taxeeta:RegularUpdates(5511): Is location changed 0.18143341
02-21 15:04:48.682: D/Taxeeta:RegularUpdates(5511): Is location changed 0.11805124
02-21 15:05:18.671: D/Taxeeta:RegularUpdates(5511): Is location changed 0.11805124
02-21 15:05:48.780: D/Taxeeta:RegularUpdates(5511): Is location changed 0.1327054
02-21 15:06:18.710: D/Taxeeta:RegularUpdates(5511): Is location changed 4.9840126
02-21 15:06:48.689: D/Taxeeta:RegularUpdates(5511): Is location changed 0.201804
02-21 15:07:18.728: D/Taxeeta:RegularUpdates(5511): Is location changed 0.18143341
02-21 15:07:48.687: D/Taxeeta:RegularUpdates(5511): Is location changed 0.11805124
4

4 回答 4

2

GPS灵敏度和准确性是两个不同的东西。此处也应考虑的敏感性。使用硬件的 GPS 往往会出现故障(在长时间运行和变化的温度之后),并且精度可能会丢失高达 20 米(就像你说的那样)。一般来说,GPS 有自己的精度,最高可达 5 米(通常)。

我最近使用通过 GPS 跟踪用户的应用程序的经验让我决定:

您肯定需要一个身份来分隔两个设备

因为他们可以返回相同的坐标。

于 2013-02-21T09:57:03.537 回答
2

我相信通过配对一些独特的设备 id + 坐标,你几乎肯定会更好。因为您在手机中获得的坐标可以是基于 WLAN 和手机信号塔的计算,而不仅仅是 GPS 信号(例如当用户在室内时),因此您获得相同坐标的机会更大。还要考虑恶意用户可能会使用某些实用程序伪造他们的位置,这是否可以用来破坏您的用户帐户和/或特定用例?

于 2013-02-21T10:02:28.990 回答
1

您混淆了准确性和精确度。

厘米级精度实际上仅在专业测量 GPS 单元中可用,并且通常是在对数据进行后处理之后。即使是半昂贵的商业模型,一般也只能在 10-20m 范围内精确,虽然它们可以精确到 1m,但这取决于很多外部因素,例如GDOP和您周围的障碍物。我没有做任何分析来验证,但手机 GPS 通常会在相同的准确度范围内。

onLocationChanged方法可能有 7 个小数位的精度,但它不会更准确,它只是意味着他们为您提供了 7 个小数位。我上面提到的相同的半昂贵的商用手持 GPS 型号通常只有 5 个小数位的精度,但它不会改变结果的准确性。

话虽如此,在过去几年中,我花费了大量时间查看在实地调查中完成的 GPS 记录,我发现虽然同一个 GPS 不太可能多次返回完全相同的坐标短暂的连续,它确实发生了。同样,当您考虑处理多个设备和未知时间段时,您很可能会有多个设备返回相同的精确坐标。

您应始终包含标识以识别特定设备,而不是仅依靠 GPS 坐标来识别特定用户或设备。

于 2013-02-21T10:12:09.910 回答
1

我在 GPS 应用程序开发方面拥有多年经验,我所看到的是两个不同的设备不太可能发送完全相同的 GPS 位置(与 7 位相关)。但它可能发生。我没有做这个具体的评估(只是一个类似的评估),但我的感觉是这种情况在大约一万例中发生不超过1次。
您可能可以忍受发生这种情况的最小机会。
许多人将不得不购买可能发生这种情况的应用程序。;-)
您还可以比较以下两个位置,而不是一个。(您可以将这两个组合成一个长值)
但是要考虑位置也可以由信号塔位置计算的论点。在我的应用程序中,我忽略了手机信号塔的位置,我只使用 GPS。

于 2013-02-22T03:05:21.780 回答