计算三个GPS坐标之间的角度 [英] Calculate angle between three GPS coordinates

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

问题描述

也许这是一个简单的问题. 我有3个GPS坐标(一个是当前用户位置).我现在想要的是计算用户位置和两个GPS坐标之间的角度.想象用户位置在其他两个点的中心,这三个点可以看作是三角形.我想在用户位置计算角度. 我希望有人能帮助我,因为我不知道如何使用球坐标(例如GPS坐标)来做到这一点.

perhaps this is a simple question. I have 3 GPS coordinates (one is the current user location). What I want now is to calculate the angle between the user location and the two GPS coordinates. Imagine the user location in the center of the two other points, the three points can be seen as a triangle. And I want to calculate the angle at the user location. I hope someone can help me because I have no idea how to do this with spherical coordinates like the GPS coordinates I have.

THX-nekro

THX - nekro

推荐答案

对于短距离(例如小于100公里),您可以安全地忽略计算的球面性质,并将该问题视为2笛卡尔坐标问题.对于较大的距离,球形几何形状会变得粗糙.我可能可以弄清楚,但我现在不想这么难.

For short distances (less than 100km, say) you can safely ignore the spherical nature of the calculation and treat the problem as a 2 cartesian coordinate problem. For large distances the spherical geometry gets pretty gnarly. I could probably figure it out, but I don't want to think that hard right now.

您需要做的就是将两个坐标都转换为KM,然后将其视为笛卡尔问题. (在小比例尺上,您可以忽略线"的弯曲性质,并将其视为正常的笛卡尔网格线,因为曲率小到可以在该比例尺上忽略)

All you need to do is to convert both coordinates to KM, and then treat it as a cartesian problem. (At a small scale, you can ignore the curved nature of the "lines" and treat them as normal cartesian grid lines, since the curvature is small enough to ignore at that scale)

每个纬度的距离是恒定的.经度的距离会根据纬度而变化.

The distance per degree of latitude is constant. The distance for a degree of longitude changes based on latitude.

在Google上搜索每经度的KM",然后找到一个可以清楚解释该链接的链接.这是一个: http://www.colorado.edu/geography/gcraft/warmup/aquifer/html/distance.html

Do a google search on "KM per degree of longitude" and find a link that explains it clearly. Here's one: http://www.colorado.edu/geography/gcraft/warmup/aquifer/html/distance.html

这篇关于计算三个GPS坐标之间的角度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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