Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我想将世界划分为四个象限并在这些象限中创建区域并想找到从我的位置到我所站立区域中的点的距离,那么在 iPhone 中使用 Objective c 怎么可能?或任何其他可能的解决方案
如果您知道如何计算这两个点的纬度和经度,那么您可以使用 Harvesian 方法找到两点之间的距离。
**Haversine formula: R = earth’s radius (mean radius = 6,371km) Δlat = lat2− lat1 Δlong = long2− long1 a = sin²(Δlat/2) + cos(lat1).cos(lat2).sin²(Δlong/2) c = 2.atan2(√a, √(1−a)) d = R.c**