1
$\begingroup$

I have a question, I am trying to calculate a radius between two latitude and longitude points on the Google map.

I understand the coding part, but I do not understand the mathematical side to it. I would appericate if you guys can give me some guidance to this.

Here is the code, maybe you can get some understanding on what I am trying to achive

( 3959 * acos( cos( radians(in_end_lat) ) * cos( radians( lat ) ) * cos( radians( lng ) - radians(in_end_lng) ) + sin( radians(in_end_lat) ) * sin( radians( lat ) ) ) )

Cheers!

  • 1
    You need to clarify your question. What do you mean by 'calculate a radius between to latitude and longitude points'?2012-04-18
  • 0
    I answered a [similar question](http://math.stackexchange.com/questions/132671/converting-lat-long-coords-to-cartesian-x-y-then-calculating-shortest-distance#comment306000_132671). I think you're looking for the great arc distance between two points on the sphere, in miles.2012-04-18

1 Answers 1