【问题标题】:CoreLocation get latitude and longitude at a certain distance and direction from coordinateCoreLocation 从坐标获取一定距离和方向的经纬度
【发布时间】:2012-04-15 22:23:24
【问题描述】:

我正在尝试确定距另一个位置一定距离的位置。我在 iOS 中使用 CoreLocation 中的纬度、经度。

谢谢。

【问题讨论】:

标签: ios iphone objective-c core-location


【解决方案1】:
lat2 = asin(sin(lat1)*cos(d/R) + cos(lat1)*sin(d/R)*cos(θ))
lon2 = lon1 + atan2(sin(θ)*sin(d/R)*cos(lat1), cos(d/R)−sin(lat1)*sin(lat2))

R 是您首选单位的地球半径。 (6371 公里)

【讨论】:

  • 能否详细说明。 d和R是什么?我假设 R 是球体的半径。我应该在哪里应用我希望从第 1 点开始测量的方向?编辑:我用谷歌搜索了这个公式,找到了这个网页movable-type.co.uk/scripts/latlong.html
  • d 是经过的距离。 θ 是标题。
猜你喜欢
  • 2016-07-17
  • 2014-12-16
  • 2016-02-03
  • 1970-01-01
  • 2018-04-01
  • 2023-03-22
  • 1970-01-01
  • 2010-12-13
  • 2015-04-20
相关资源
最近更新 更多