Astro-Montenbruck
view release on metacpan or search on metacpan
lib/Astro/Montenbruck/Time/DeltaT.pm view on Meta::CPAN
2016 => 70.0
);
Readonly our $TAB_SINCE => 1620;
Readonly our $TAB_UNTIL => 2016;
sub _interpolate {
my ( $jd, $ye ) = @_;
# For a historical range from 1620 to a recent year, we interpolate from a
# table of observed values. Outside that range we use formulae.
# Last value in the table
if ( $ye == $TAB_UNTIL ) {
return $HISTORICAL{$TAB_UNTIL};
}
# 1620 - 20xx
my $y0 =
$ye % 2 == 0 ? $ye : $ye - 1; # there are only even numbers in the table
my $y1 = $y0 + 2;
lib/Astro/Montenbruck/Time/DeltaT.pm view on Meta::CPAN
=back
=head1 SUBROUTINES
=head2 delta_t( $jd )
Returns approximate Delta-T in seconds for a given Julian Day.
C<Delta-T = ET - UT>
For a historical range from 1620 to recent years, we interpolate from a
table of observed values. Outside that range we use formulae from
I<Astronomical Algorithms> by I<J.Meeus>, second edition.
=head3 Arguments
=over
=item * B<$jd> â Standard Julian Date.
=back
( run in 0.479 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )