comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Finding distance with longitude and latitude
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Finding distance with longitude and latitude [message #83986 is a reply to message #83985] Sun, 14 April 2013 16:49 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Sunday, April 14, 2013 7:45:40 PM UTC-4, wlandsman wrote:
> On Sunday, April 14, 2013 7:22:44 PM UTC-4, gpet...@ucsc.edu wrote:
>
>
>
>> a=sqrt((cos(lat2)*sin(dlon))^2 + (cos(lat1)*sin(lat2)-sin(lat1)*cos(lat2)*cos(dlon))^2)/(sin( lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos(dlat))
>
>
>
> c= atan(a)
>
>
>
> The Wikipedia article you quote says
>
> "When programming a computer, one should use the atan2() function rather than the ordinary arctangent function (atan()), in order to simplify handling of the case where the denominator is zero, and to compute \Delta\widehat{\sigma}\;\! unambiguously in all quadrants"

I accidentally hit SEND too soon, but you want to use the two argument form of ATAN, e.g.

c = atan( numerator, denominator)

--Wayne
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How can I export a few million geocoded points from IDL to ArcMap?
Next Topic: Cubic root finding on a grid

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:29:00 PDT 2025

Total time taken to generate the page: 0.00183 seconds