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

Home » Public Forums » archive » wrong results...
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: wrong results... [message #43924 is a reply to message #43811] Tue, 03 May 2005 15:56 Go to previous message
Ken Mankoff is currently offline  Ken Mankoff
Messages: 158
Registered: February 2000
Senior Member
On Tue, 3 May 2005, yp wrote:

> Kenneth Bowman wrote:
>>
>> lon = (lon + 360.0) MOD 360.0
>>
>
> Thats brilliant!
>
>> By the way, the reverse transformation is
>>
>> lon = lon - (LONG(lon)/180)*360.0
>>
>
> This is great too; but how to parse the last element? Using the
> above transformation, 180.0 becomes -180.0 at both ends. This does
> transform the coordinate exactlty for all elements except +180.0.
> Of course, zonally 180 = -180 from a geographic perspective.

The IDL astronomy library has a CIRRANGE procedure (circle range)
that forces things to 0->360. It is pretty easy to modify it to a
RANGECIR procedure that does the -180 to 180 range. Works for
radians too via a keyword. Check it out, it might be a good starting
place.

-k.

--
http://spacebit.dyndns.org/
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Determining install directory
Next Topic: Adding flexibility at run time question

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

Current Time: Wed Oct 15 16:28:55 PDT 2025

Total time taken to generate the page: 0.00507 seconds