Astro-Montenbruck
view release on metacpan or search on metacpan
lib/Astro/Montenbruck/RiseSet.pm view on Meta::CPAN
=item 2.
L<Astro::Montenbruck::RiseSet::Sunset::riseset_func>, which calculates rise and set times using I<quadratic interpolation>.
=back
Both of them are described in I<"Astronomy On The Personal Computer"> by O.Montenbruck and T.Phleger.
However, they are built on different algorithms: B<riseset_func> utilizes quadratic interpolation
while B<rst> is iterative. Along with rise and set, B<rst> gives transit times. At the other hand,
B<riseset_func> is a base for calculating twilight.
To take into account I<parallax>, I<refraction> and I<apparent radius> of the
bodies, we use average corrections to geometric altitudes:
=over
=item * sunrise, sunset : B<-0 deg 50 min>
=item * moonrise, moonset : B<0 deg 8 min>
=item * stars and planets : B<-0 deg 34 min>
=back
=head2 TWILIGHT
The library also calculates the times of the beginning of the morning twilight
(I<dawn>) and end of the evening twilight (I<dusk>).
Twilight occurs when Earth's upper atmosphere scatters and reflects sunlight
which illuminates the lower atmosphere. Astronomers define the three stages of
twilight â I<civil>, I<nautical>, and I<astronomical> â on the basis of the Sun's
elevation which is the angle that the geometric center of the Sun makes with the
horizon.
=over
=item * I<astronomical>
Sun altitude is B<-18 deg> In the morning, the sky is completely dark before the
onset of astronomical twilight, and in the evening, the sky becomes completely
dark at the end of astronomical twilight. Any celestial bodies that can be
viewed by the naked eye can be observed in the sky after the end of this phase.
=item * I<nautical>
Sun altitude is B<-12 deg>. This twilight period is less bright than civil twilight
and artificial light is generally required for outdoor activities.
=item * I<civil>
Sun altitude is B<-6 deg>. Civil twilight is the brightest form of twilight.
There is enough natural sunlight during this period that artificial light may
not be required to carry out outdoor activities. Only the brightest celestial
objects can be observed by the naked eye during this time.
=back
=head1 CAVEATS
Sometimes rise and set happen on different calendar dates. For example, here is the output of C<riseset.pl>
script:
$ perl .\script\riseset.pl --date=1989-03-28 --place=48.1 -11.6 --timezone=UTC
Date : 1989-03-28 UTC
Place : 48N06, 011E35
Time Zone : UTC
rise transit set
Moon 23:34:17 03:23:59 07:10:54
This directly depends on time zone. Since event time is always given as Julian date,
it is not hard to determine correct order of events.
=head1 EXPORT
=head2 FUNCTIONS
=over
=item * L</rst( %args )>
=item * L</riseset( %args )>
=item * L</twilight( %args )>
=back
=head1 FUNCTIONS
=head2 rst( %args )
Returns function for calculating times of rises, sets and transits of celestial bodies. See
L<Astro::Montenbruck::RiseSet::Plarise/rst> .
=head3 Named Arguments
=over
=item *
B<date> - array of B<year> (astronomical, zero-based), B<month> [1..12] and B<day>, [1..31].
=item *
B<phi> - geographical latitude, degrees, positive northward
=item *
B<lambda> - geographical longitude, degrees, positive westward
=back
=head3 Returns
function, which calculates rise, set and transit for a celestial body.
It accepts celestial body identifier as positional argument (see L<Astro::Montenbruck::Ephemeris::Planet>)
and two optional callbacks as named arguments:
( run in 0.530 second using v1.01-cache-2.11-cpan-5e09290becf )