计算经度/纬度
给定以下输入:
- 1..n 个位置的已知经度/纬度 位置
- 1..n 与另一个位置“m”之间的已知距离
如何计算位置“m”的经度/纬度?
Given the following input:
- known longitudes/latitudes of 1..n locations
- known distance between locations 1..n and another location "m"
How can I calculate the longitude/latitude of the location "m"?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这听起来像是一个基本的经纬度三角测量问题。 Yahoo! 中概述了常见的方法。 答案主题此处。 可能有多种语言的库可以做到这一点。 谷歌搜索“纬度经度三角测量”加上您选择的语言可能会显示一些可供使用的现有代码。 “地理编码”是类似库中的另一个常见任务,因此这可能是另一个有用的关键字。
编辑:正如其他人提到的,“三边测量”似乎是最好的术语。 但是,根据您的数据和要求,有更简单的近似解决方案可以满足您的要求。
雅虎! 为了方便起见,将答案帖子引用如下:
This sounds like a basic latitude-longitude triangulation question. The common approaches are outlined in a Yahoo! Answers topic here. There are likely libraries to do this in many languages. A google search for "latitude longitude triangulation" plus your language of choice will likely reveal some existing code to use. "Geocoding" is another common task rolled into similar libraries, so that may be another useful keyword.
Edit: As others have mentioned, "trilateration" seems to be the best term. However, depending on your data and requirements, there are simpler approximation solutions that may satisfy your requirements.
The Yahoo! Answers post is quoted below for convenience:
三边测量就是你想要的。 这仅需要 3 个参考点,但是如果您想变得非常聪明,则可以使用其余参考点来提高准确性。
最棘手的部分是使用长/纬度而不是笛卡尔坐标,特别是因为地球不是一个完美的球体。
Trilateration is what you want. This only requires 3 of your reference points, however the rest can be used to increase accuracy if you want to get really clever.
The trickiest part is working with long/lat as opposed to Cartesian coordinates, especially as the earth is not a perfect sphere.
这是一个三边测量问题。 在您的情况下,您有多个参考点,因此您可以最小化给定距离与对应于 m 最佳位置的距离之间的平方误差之和。
This is a trilateration problem. In your case, you have multiple points of reference, so you can minimize the sum of squared-errors between the given distances and those corresponding to the optimal position of m.