title: How to find the angular direction to a point in the map (respect to north)
body: <p>I need to find the angle between the north and a point in a map (21.4167, -39.8167).</p>
  
  <p>here is my code</p>
  
  <pre><code>double MECCA_LONGITUDE = 21.4167;
  double MECCA_LATITUDE = -39.8167;
  
  -(void) getAngle :(float) phoneAngle: (float) lon:(float) lat
  {
  
   float ad = atan (sin (lon - MECCA_LATITUDE) /  ( (cos (lat)) * (tan (MECCA_LATITUDE)) ) - ( (sin (lat)) * (cos (lon - MECCA_LONGITUDE)) ));
  
  NSLog(@"###### %f", CC_RADIANS_TO_DEGREES(ad));
  }
  </code></pre>
  
  <p>I'm still not getting the correct answer. Any tips would be appreciated. Thanks.</p>