objective-c - 如何检查两条GPS路线是否相等?

标签 objective-c algorithm gps coordinates core-location

想象一下有人在同一条街上跑了两次。但由于 GPS 并非 100% 准确,因此这两条路线是不同的。看看下面的图片你会更明白: enter image description here

Red Line - First time run
Blue Line - Second time run
Black Line - Street
Dots - GPS coordinates (latitude and longitude)

我想要实现的是确认这两条路线是相同的。有人知道吗?

最佳答案

尝试使用 Fréchet 距离来应用 G. Bach 的建议。在维基百科上可以找到对其的详细描述(http://en.wikipedia.org/wiki/Frechet_distance):

The Fréchet distance between two curves is the minimum length of a leash required to connect a dog and its owner, constrained on two separate paths, as they walk without backtracking along their respective curves from one endpoint to the other. The definition is symmetric with respect to the two curves. Imagine a dog walking along one curve and the dog's owner walking along the other curve, connected by a leash. Both walk continuously along their respective curve from the prescribed start point to the prescribed end point of the curve. Both may vary their speed, and even stop, at arbitrary positions and for arbitrarily long. However, neither can backtrack. The Fréchet distance between the two curves is the length of the shortest leash (not the shortest leash that is sufficient for all walks, but the shortest leash of all the leashes) that is sufficient for traversing both curves in this manner.

关于objective-c - 如何检查两条GPS路线是否相等?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25656120/

相关文章:

ios - 如何在多行上显示 UIButton 标签?

java - 递归搜索数组 - CodingBat

python - 计算元素仅为相邻整数的矩阵的排列数

ios - 如何使用 iPhone 传感器数据计算 GPS DoP(精度因子)?

objective-c - 基于文档的应用程序的 'New Document' 停靠菜单项将无法打开新文档

ios - 在真正的 Apple Watch 上调试 WatchKit - 没有任何反应

javascript - 根据字符数动态拆分数组

使用C语言转换GPS坐标单位

java - 谷歌地图 GPS : longitude and latitude returns zero

iphone - 比 AVAudioPlayer 更快的替代品?