Astro-Montenbruck

 view release on metacpan or  search on metacpan

lib/Astro/Montenbruck/Ephemeris/Planet/Neptune.pm  view on Meta::CPAN

    $term->( 2, -1, 0, -0.2,  -0.4,  2.4,   -1.4,   0.4,  -0.3 );

    # Perturbations by Saturn
    $term = pert(
        T        => $t,
        M        => $m8,
        m        => $m6,
        I_min    => 0,
        I_max    => 2,
        i_min    => -2,
        i_max    => 0,
        callback => $pert_cb
    );

    $term->( 0, -1, 0, -0.1, 0.0,   0.2,   -1.8,  -0.1, -0.5 );
    $term->( 1, 0,  0, 0.0,  0.0,   -8.3,  -10.4, 0.0,  0.0 );
    $term->( 1, -1, 0, 13.6, -12.7, 187.5, 201.1, 0.0,  0.0 );
    $term->( 1, -2, 0, 0.4,  -0.4,  4.5,   4.5,   0.0,  0.0 );
    $term->( 2, -1, 0, 0.4,  -0.1,  1.7,   -3.2,  0.2,  0.2 );
    $term->( 2, -2, 0, -0.1, 0.0,   -0.2,  2.7,   0.0,  0.0 );

    # Perturbations by Uranus
    $term = pert(
        T        => $t,
        M        => $m8,
        m        => $m7,
        I_min    => 1,
        I_max    => 6,
        i_min    => -6,
        i_max    => 0,
        callback => $pert_cb
    );
    $term->( 1, 0,  0, 32.3, 3549.5, -25880.2, 235.8, -6360.5, 374.0 );
    $term->( 1, 0,  1, 31.2, 34.4,   -251.4,   227.4, 34.9,    29.3 );
    $term->( 1, 0,  2, -1.4, 3.9,    -28.6,    -10.1, 0.0,     -0.9 );
    $term->( 2, 0,  0, 6.1,  68.0,   -111.4,   2.0,   -54.7,   3.7 );
    $term->( 2, 0,  1, 0.8,  -0.2,   -2.1,     2.0,   -0.2,    0.8 );
    $term->( 3, 0,  0, 0.1,  1.0,    -0.7,     0.0,   -0.8,    0.1 );
    $term->( 0, -1, 0, -0.1, -0.3,   -3.6,     0.0,   0.0,     0.0 );
    $term->( 1, 0,  0, 0.0,  0.0,    5.5,      -6.9,  0.1,     0.0 );
    $term->( 1, -1, 0, -2.2, -1.6,   -116.3,   163.6, 0.0,     -0.1 );
    $term->( 1, -2, 0, 0.2,  0.1,    -1.2,     0.4,   0.0,     -0.1 );
    $term->( 2, -1, 0, 4.2,  -1.1,   -4.4,     -34.6, -0.2,    0.1 );
    $term->( 2, -2, 0, 8.6,  -2.9,   -33.4,    -97.0, 0.2,     0.1 );
    $term->( 3, -1, 0, 0.1,  -0.2,   2.1,      -1.2,  0.0,     0.1 );
    $term->( 3, -2, 0, -4.6, 9.3,    38.2,     19.8,  0.1,     0.1 );
    $term->( 3, -3, 0, -0.5, 1.7,    23.5,     7.0,   0.0,     0.0 );
    $term->( 4, -2, 0, 0.2,  0.8,    3.3,      -1.5,  -0.2,    -0.1 );
    $term->( 4, -3, 0, 0.9,  1.7,    17.9,     -9.1,  -0.1,    0.0 );
    $term->( 4, -4, 0, -0.4, -0.4,   -6.2,     4.8,   0.0,     0.0 );
    $term->( 5, -3, 0, -1.6, -0.5,   -2.2,     7.0,   0.0,     0.0 );
    $term->( 5, -4, 0, -0.4, -0.1,   -0.7,     5.5,   0.0,     0.0 );
    $term->( 5, -5, 0, 0.2,  0.0,    0.0,      -3.5,  0.0,     0.0 );
    $term->( 6, -4, 0, -0.3, 0.2,    2.1,      2.7,   0.0,     0.0 );
    $term->( 6, -5, 0, 0.1,  -0.1,   -1.4,     -1.4,  0.0,     0.0 );
    $term->( 6, -6, 0, -0.1, 0.1,    1.4,      0.7,   0.0,     0.0 );

    # Ecliptic coordinates ([rad],[AU])
    my $l =
      pi2 *
      frac( 0.1254046 + $m8 / pi2 +
          ( ( 4982.8 - 21.3 * $t ) * $t + $dl ) / 1296.0e3 );
    my $r = 30.072984 + ( 0.001234 + 0.000003 * $t ) * $t + $dr * 1.0e-5;
    my $b = ( 54.77 + ( 0.26 + 0.06 * $t ) * $t + $db ) / ARCS;

    $l, $b, $r;

}

# Intermediate variables for calculating geocentric positions.
sub _lbr_geo {
    my ( $self, $t ) = @_;

    my $m  = pi2 * frac( 0.7214906 + 0.6068526 * $t );
    my $dl = 1.04 + 0.02 * cos($m);
    my $dr = 0.27 * sin($m);
    my $db = 0.03 * sin($m);

    $dl, $db, $dr;
}

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

Astro::Montenbruck::Ephemeris::Planet::Neptune - Neptune.

=head1 SYNOPSIS

  use Astro::Montenbruck::Ephemeris::Planet::Neptune;
  my $planet = Astro::Montenbruck::Ephemeris::Planet::Neptune->new();
  my @geo = $planet->position($t); # apparent geocentric ecliptical coordinates

=head1 DESCRIPTION

Child class of L<Astro::Montenbruck::Ephemeris::Planet>, responsible for calculating
B<Neptune> position.

=head1 METHODS

=head2 Astro::Montenbruck::Ephemeris::Planet::Neptune->new

Constructor.

=head2 $self->heliocentric($t)

See description in L<Astro::Montenbruck::Ephemeris::Planet>.

=head1 AUTHOR

Sergey Krushinsky, C<< <krushi at cpan.org> >>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2009-2022 by Sergey Krushinsky



( run in 2.646 seconds using v1.01-cache-2.11-cpan-b301d465b3d )