使用以米为单位的精度作为经纬圆的半径?
我正在尝试检查一组 GPS 坐标(以度为单位的经纬度)是否与“智能空间”的预定义定义匹配。为此,我将以计算出的 GPS 坐标为中心,以 GPS 读数的精度(以米为单位)为半径形成一个圆。
然后我将检查我的预定义点列表中是否有任何点落在该圆内,如果该计算出的圆内确实存在任何点,那么我将假设当前位置确实是一个“智能空间”以进行进一步处理。
我现在面临的问题是如何形成这个圈子。 GPS 点的单位是度,而半径的单位是米。我需要将这一米距离转换为度数以形成我的圆。 对我如何做到这一点有什么建议吗? 提前致谢。
I am trying to check if a set of GPS coordinates (lat-long in degrees) is matching a predefined definition of a "smart space". For this I will be forming a circle with the calculated GPS coordinates as the center and the accuracy of the GPS reading (in meters) as the radius.
Then I will be checking if any of my list of predefined points fall inside this circle, if any point does exist inside this calculated circle then I will be assuming the current location is indeed a "smart space" for further processing.
The issue I face now is with forming this circle. While the GPS points are in degrees, the radius is in meters. I need to convert this meter distance into degrees to form my circle.
Any suggestion to how I can do this?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
http://en.wikipedia.org/wiki/Haversine_formula
http://en.wikipedia.org/wiki/Haversine_formula
你不能,因为度数不对应于任何长度:赤道处经度的长度比极点附近经度的长度长得多。
相反,找到从给定点到智能空间中心(您暗示是圆形)的距离。如果它足够小,那么您就处于智能空间内。
You can't, because a degree does not correspond to any one length: the length of a degree of longitude at the equator is much longer than a degree of longitude near a pole.
Instead, find the distance from the given point to the centre of your smart space (which you imply is circular). If that is small enough, you are within the smart space.