将 GPS 坐标转换为坐标平面 [英] Convert GPS coordinates to coordinate plane

查看:56
本文介绍了将 GPS 坐标转换为坐标平面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这与我问的另一个问题有些相关:翻译 GPS 坐标到 PDF 地图上的位置.这让我走到了这一步,现在我被困在数学上.

This is somewhat related to another question I asked: Translate GPS coordinates to location on PDF Map. That got me to this point, now I'm stuck on the math.

假设我有一个建筑物的平面图,我已经从建筑物的每个角落获取了 gps 坐标读数.还假设平面图与经纬度对齐.

Let's say I have a floor plan of a building, I've taken gps coordinate readings from each corner of the building. Also assume that the floor plan is lined up with the latitude and longitude.

如何将 GPS 坐标转换为此地图上的 X、Y 位置?我似乎无法正确计算.

How do I convert a GPS coordinate to a X,Y position on this map? I can't seem to get the math right.

推荐答案

delta_longdelta_lat 为建筑物角落的 GPS 坐标中的度数差异.让 delta_x = 320delta_y = 480 (假设是英尺).那么:

Let delta_long and delta_lat be the differences, in degrees, in the GPS coordinates of the building's corners. Let delta_x = 320 and delta_y = 480 (feet, let's say). Then:

vertical_scale = delta_y/delta_lat 单位英尺/纬度

horizo​​ntal_scale = delta_x/(cos(latitude)*delta_long) 单位为英尺/度经度.

horizontal_scale = delta_x/(cos(latitude)*delta_long) with units feet/degree longitude.

cos(latitude) 因子补偿 1 度经度的变化长度当一个人从赤道移动到两极时.对于这个应用程序,我们可以假设它不会在建筑物的南北端之间发生明显变化.

The cos(latitude) factor compensates for the varying length of 1 degree of longitude as one moves from the equator to the poles. We can assume for this application that it won't change appreciably between the north and south ends of the building.

然后对于任何附近的(纬度,经度)点,减去西南的坐标建筑物的角落,并在明显的地方应用垂直和水平尺度相对于建筑布局定位该点的方法.

Then for any nearby (lat,long) point, subtract off the coordinates of the southwest corner of the building, and apply the vertical and horizontal scales in the obvious way to locate that point with respect to the building layout.

这篇关于将 GPS 坐标转换为坐标平面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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