Astro:...:Sunset(3pm)

πŸ“¦ version 1.26, in alpine 3.24

✨ NAME ✨

okay so bestie, this is the Astro:...:Sunset(3pm) page for Astro::Montenbruck::RiseSet::Sunset, from the User Contributed Perl Documentation manual β€” and it's literally all about rise and set. πŸ’…


🌸 SYNOPSIS 🌸

like, here's the whole vibe in code, no cap:

use Astro::Montenbruck::MathUtils qw/frac/;
use Astro::Montenbruck::RiseSet::Constants qw/:events :altitudes/;
use Astro::Montenbruck::RiseSet::Sunset qw/:riseset_func/;

my $func = riseset_func(
    date     => [1989, 3, 23],
    phi    => 48.1,
    lambda => -11.6
);

$func->(
    get_position => sub {
        my $jd = shift;
        # return equatorial coordinates of the celestial body for the Julian Day.
    },
    sin_h0       => sin( deg2rad($H0_PLANET) ),
    on_event     => sub {
        my ($evt, $jd) = @_;
        say "$evt: $jd";
    },
    on_noevent   => sub {
        my $state = shift;
        say $state;
    }
);

πŸŽ€ VERSION πŸŽ€

Version 0.01 β€” iconic. ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

these are low level routines for calculating rise and set times of celestial bodies. πŸͺ

πŸ’… FUNCTIONS πŸ’…

πŸ“ riseset_func ( %args ) πŸ“

this is the time of rise and set events. ⏰

πŸ’– Named Arguments πŸ’–

  • get_position β€” a function that, given the Standard Julian Day, returns the equatorial coordinates of the celestial body, in radians.
  • date β€” array of year (astronomical, zero-based), month [1..12] and day, [1..31].
  • phi β€” geographic latitude, degrees, positive northward.
  • lambda β€” geographic longitude, degrees, positive westward.
  • get_position β€” a function that, given the Standard Julian Day, returns the equatorial coordinates of the celestial body, in radians. yes bestie, it's listed twice in the original β€” keeping both, no cap πŸ’€
  • sin_h0 β€” sine of the standard altitude, i.e. the geometric altitude of the center of the body at the time of apparent rising or setting.
  • on_event callback β€” called when the event time is determined. The arguments are:
    • event type, one of $EVT_RISE or $EVT_SET
    • Universal time of the event
on_event => sub { my ($evt, $ut) = @_; ... }
  • on_noevent β€” called when the event does not happen at the given date, either because the body never rises, or is circumpolar. The argument is respectively $STATE_NEVER_RISES or $STATE_CIRCUMPOLAR.
on_noevent => sub { my $state = shift; ... }

πŸ‘‘ AUTHOR πŸ‘‘

shoutout to the iconic author line: Sergey Krushinsky, "<krushi at cpan.org>" β€” periodt. πŸ‘‘

Copyright (C) 2010-2022 by Sergey Krushinsky

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

πŸ’– okay that's the whole page, bestie! source/version: Astro:...:Sunset(3pm); footer version: perl v5.42.2; date: 2026-02-15 β€” bye, love u, mwah! πŸ’–

πŸ“¦ where this page comes from