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 #83983 is a reply to message #83982] Sun, 14 April 2013 19:38 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
IDL doesn't have an ATAN2 function. Instead, you call ATAN with two arguments. Look at the online help for ATAN

On Sunday, April 14, 2013 9:17:41 PM UTC-4, gpet...@ucsc.edu wrote:
> 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:32:40 PDT 2025

Total time taken to generate the page: 0.00489 seconds