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 #83984 is a reply to message #83983] Sun, 14 April 2013 18:17 Go to previous messageGo to previous message
gpeterso is currently offline  gpeterso
Messages: 22
Registered: February 2013
Junior Member
On Sunday, April 14, 2013 4:49:07 PM UTC-7, wlandsman wrote:
> 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

When ever i tried to use atan2() it said that the variable was undefined. I dont know why that would happen
[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:27:08 PDT 2025

Total time taken to generate the page: 0.00458 seconds