[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Heliocentric julian date adjustment



Nice work! That's really great. I tested it with my C version and it looks 
damn close. I couldn't say which is closer:

Yours:
digital [12:01pm] % ./test.pl 2452431.77366 179.463657 6.451305
Correction is 0.00116879682269064

Mine:
digital [12:04pm] % ./jd2hjd 2452431.77366 179.463657 6.451305
0.00116879706317932100

My only suggestion is to make the POD a bit more intuitive i.e:

my ($correction, $orig_jd, $corr_jd) = correction( $jd, $ra, $dec );

...so you don't have to read the description to know how to use it. I'm 
not sure why you are returning the original JD since we already have that.
  I would probably just make it return the scalar correction so you could 
call it like:

$jd += correction( $jd, $ra, $dec );

It is by design that if you call it from scalar context rather than array 
context you get the corrected JD? That seems reasonable, I guess, although 
I think I prefer the correction so I can know what is going on.

Very nice.

Michael Koppelman



On Friday, July 12, 2002, at 11:24  AM, Creager, Robert S wrote:

>
> Hey folks,
>
> I've a mostly complete (README still needs some attention) perl module 
> which
> does the hjd conversion.  I also forgot to mention Michael K. in the 
> Authors
> of the documentation.  The link below contains the HTML documentation, and
> version 0.01 of the file.  I plan to put this up on CPAN, but it may fold
> into the current Astro::Time module.  I've yet to contact the author of
> those modules to get his take.
>
> All suggestions welcome.
>
> http://www.logicalchaos.org/perl/
>
> Robert Creager
> Senior Software Engineer
> ATS Library Engineering
> 303.673.2365 V
> 303.661.5379 F
> 888.912.4458 P
> StorageTek
> INFORMATION made POWERFUL
>
>
>