从 UTM(纬度、经度)计算方位角
我想计算两个地理坐标点之间的相对方位。我已经将坐标转换为 UTM,但需要帮助来确定实际方位。我知道 UTM 仅适用于同区域计算,这很好,因为计算将在非常小的距离上完成。
假设 point1 是我的位置 44.4N,-97.7W point2 是我想要获得相对方位的位置:44.4N,-103.3W
由于点 2 直接位于点 1 的左侧,因此我将其解释为 270 度(北为 0 或 360 度) 。
我找到了这个公式:arctan((y1-y2)/(x1-x2)) 但当我绘制点并测量角度时,它的结果对我来说没有意义。
I want to calculate the relative bearing between two geo-coordinate points. I've gone ahead and converted the coordinates to UTM, but need assistance on figuring out the actual bearing. I'm aware that UTM is only good enough for same-zone calculations, which is fine as the computation will be done across very small distances.
Say point1 is my location 44.4N,-97.7W
and point2 is the location I'd like to get the relative bearing to: 44.4N, -103.3W
Since point 2 is directly to the left of point 1, I'd interpret that as 270 degrees (North being 0 or 360 degrees).
I found this formula: arctan((y1-y2)/(x1-x2))
but it's result don't make sense to me when I plot the points and measure the angles.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
仅供参考 - 目前,我正在使用 SQL Server 2008 空间数据类型、空间函数以及我在 Web 上找到的一些 T-SQL 函数。
FYI- For now, I'm using SQL Server 2008 Spatial Data Types, Spatial Functions, and some T-SQL function I found on the web.
请在此处找到我的答案相关到开源 坐标转换器。鉴于您的需要,这可能对您有帮助。
Please find here my answer related to an open source coordinates converter. It might be helpfull for you given your need.
我在Javascript中的回答 http://jsfiddle.net/efwjames/NVhg6/
My answer in Javascript http://jsfiddle.net/efwjames/NVhg6/