0

Simmilar with Direction between 2 Latitude/Longitude points in C#

but with objective-c

Also I want a formula that works for large distance near the pole if it's possible.

Community
  • 1
  • 1
user4951
  • 32,206
  • 53
  • 172
  • 282

2 Answers2

2

You'll need the following complete but rather difficult stuff. A slightly easier description is found on wikipedia.

ILa
  • 49
  • 3
1

Or you could save yourself a lot of time and use CLLocation's distanceFromLocation method:

distanceFromLocation:

Returns the distance (in meters) from the receiver’s location to the specified location.

Discussion This method measures the distance between the two locations by tracing a line between them that follows the curvature of the Earth. The resulting arc is a smooth curve and does not take into account specific altitude changes between the two locations.

http://developer.apple.com/library/ios/DOCUMENTATION/CoreLocation/Reference/CLLocation_Class/CLLocation/CLLocation.html#//apple_ref/occ/instm/CLLocation/distanceFromLocation:

Rog
  • 18,602
  • 6
  • 76
  • 97