« lib/Astro/Montenbruck/Ephemeris/Planet/Neptune.pm
↑ Summary
lib/Astro/Montenbruck/Ephemeris/Planet/Sun.pm »
| 1 | package Astro::Montenbruck::Ephemeris::Planet::Saturn; | ||
| 2 | |||
| 3 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 2 | ▶ | use Math::Trig qw/:pi/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 2 | ▶ | use base qw/Astro::Montenbruck::Ephemeris::Planet/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 2 | ▶ | use Astro::Montenbruck::Ephemeris::Pert qw/pert/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 2 | ▶ | use Astro::Montenbruck::MathUtils qw/frac ARCS/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 2 | ▶ | use Astro::Montenbruck::Ephemeris::Planet qw/$SA/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 2 | our $VERSION = 0.01; | |
| 12 | |||
| 13 | 4 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||
| 14 | 4 | my $class = shift; | |
| 15 | 4 | $class->SUPER::new( id => $SA ); | |
| 16 | } | ||
| 17 | |||
| 18 | 4 | ▶ | sub heliocentric { |
|
Subroutine
heliocentric: called CC=1 SCAR=0.0
Pod
documented
| |||
| 19 | 4 | my ( $self, $t ) = @_; | |
| 20 | |||
| 21 | # Mean anomalies of planets in [rad] | ||
| 22 | 4 | my $m5 = pi2 * frac( 0.0565314 + 8.4302963 * $t ); | |
| 23 | 4 | my $m6 = pi2 * frac( 0.8829867 + 3.3947688 * $t ); | |
| 24 | 4 | my $m7 = pi2 * frac( 0.3969537 + 1.1902586 * $t ); | |
| 25 | 4 | my $m8 = pi2 * frac( 0.7208473 + 0.6068623 * $t ); | |
| 26 | |||
| 27 | 4 | my ( $dl, $dr, $db ) = ( 0, 0, 0 ); # Corrections in longitude ["], | |
| 28 | 4 | ▶ | my $pert_cb = sub { $dl += $_[0]; $dr += $_[1]; $db += $_[2] }; |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 29 | |||
| 30 | # Perturbations by Saturn | ||
| 31 | 4 | my $term = pert( | |
| 32 | T => $t, | ||
| 33 | M => $m6, | ||
| 34 | m => $m5, | ||
| 35 | I_min => 0, | ||
| 36 | I_max => 11, | ||
| 37 | i_min => -6, | ||
| 38 | i_max => 0, | ||
| 39 | callback => $pert_cb | ||
| 40 | ); | ||
| 41 | 4 | $term->( 0, -1, 0, 12.0, -1.4, -13.9, 6.4, 1.2, -1.8 ); | |
| 42 | 4 | $term->( 0, -2, 0, 0.0, -0.2, -0.9, 1.0, 0.0, -0.1 ); | |
| 43 | 4 | $term->( 1, 1, 0, 0.9, 0.4, -1.8, 1.9, 0.2, 0.2 ); | |
| 44 | 4 | $term->( 1, 0, 0, -348.3, 22907.7, -52915.5, -752.2, -3266.5, 8314.4 ); | |
| 45 | 4 | $term->( 1, 0, 1, -225.2, -146.2, 337.7, -521.3, 79.6, 17.4 ); | |
| 46 | 4 | $term->( 1, 0, 2, 1.3, -1.4, 3.2, 2.9, 0.1, -0.4 ); | |
| 47 | 4 | $term->( 1, -1, 0, -1.0, -30.7, 108.6, -815.0, -3.6, -9.3 ); | |
| 48 | 4 | $term->( 1, -2, 0, -2.0, -2.7, -2.1, -11.9, -0.1, -0.4 ); | |
| 49 | 4 | $term->( 2, 1, 0, 0.1, 0.2, -1.0, 0.3, 0.0, 0.0 ); | |
| 50 | 4 | $term->( 2, 0, 0, 44.2, 724.0, -1464.3, -34.7, -188.7, 459.1 ); | |
| 51 | 4 | $term->( 2, 0, 1, -17.0, -11.3, 18.9, -28.6, 1.0, -3.7 ); | |
| 52 | 4 | $term->( 2, -1, 0, -3.5, -426.6, -546.5, -26.5, -1.6, -2.7 ); | |
| 53 | 4 | $term->( 2, -1, 1, 3.5, -2.2, -2.6, -4.3, 0.0, 0.0 ); | |
| 54 | 4 | $term->( 2, -2, 0, 10.5, -30.9, -130.5, -52.3, -1.9, 0.2 ); | |
| 55 | 4 | $term->( 2, -3, 0, -0.2, -0.4, -1.2, -0.1, -0.1, 0.0 ); | |
| 56 | 4 | $term->( 3, 0, 0, 6.5, 30.5, -61.1, 0.4, -11.6, 28.1 ); | |
| 57 | 4 | $term->( 3, 0, 1, -1.2, -0.7, 1.1, -1.8, -0.2, -0.6 ); | |
| 58 | 4 | $term->( 3, -1, 0, 29.0, -40.2, 98.2, 45.3, 3.2, -9.4 ); | |
| 59 | 4 | $term->( 3, -1, 1, 0.6, 0.6, -1.0, 1.3, 0.0, 0.0 ); | |
| 60 | 4 | $term->( 3, -2, 0, -27.0, -21.1, -68.5, 8.1, -19.8, 5.4 ); | |
| 61 | 4 | $term->( 3, -2, 1, 0.9, -0.5, -0.4, -2.0, -0.1, -0.8 ); | |
| 62 | 4 | $term->( 3, -3, 0, -5.4, -4.1, -19.1, 26.2, -0.1, -0.1 ); | |
| 63 | 4 | $term->( 4, 0, 0, 0.6, 1.4, -3.0, -0.2, -0.6, 1.6 ); | |
| 64 | 4 | $term->( 4, -1, 0, 1.5, -2.5, 12.4, 4.7, 1.0, -1.1 ); | |
| 65 | 4 | $term->( 4, -2, 0, -821.9, -9.6, -26.0, 1873.6, -70.5, -4.4 ); | |
| 66 | 4 | $term->( 4, -2, 1, 4.1, -21.9, -50.3, -9.9, 0.7, -3.0 ); | |
| 67 | 4 | $term->( 4, -3, 0, -2.0, -4.7, -19.3, 8.2, -0.1, -0.3 ); | |
| 68 | 4 | $term->( 4, -4, 0, -1.5, 1.3, 6.5, 7.3, 0.0, 0.0 ); | |
| 69 | 4 | $term->( 5, -2, 0, -2627.6, -1277.3, 117.4, -344.1, -13.8, -4.3 ); | |
| 70 | 4 | $term->( 5, -2, 1, 63.0, -98.6, 12.7, 6.7, 0.1, -0.2 ); | |
| 71 | 4 | $term->( 5, -2, 2, 1.7, 1.2, -0.2, 0.3, 0.0, 0.0 ); | |
| 72 | 4 | $term->( 5, -3, 0, 0.4, -3.6, -11.3, -1.6, 0.0, -0.3 ); | |
| 73 | 4 | $term->( 5, -4, 0, -1.4, 0.3, 1.5, 6.3, -0.1, 0.0 ); | |
| 74 | 4 | $term->( 5, -5, 0, 0.3, 0.6, 3.0, -1.7, 0.0, 0.0 ); | |
| 75 | 4 | $term->( 6, -2, 0, -146.7, -73.7, 166.4, -334.3, -43.6, -46.7 ); | |
| 76 | 4 | $term->( 6, -2, 1, 5.2, -6.8, 15.1, 11.4, 1.7, -1.0 ); | |
| 77 | 4 | $term->( 6, -3, 0, 1.5, -2.9, -2.2, -1.3, 0.1, -0.1 ); | |
| 78 | 4 | $term->( 6, -4, 0, -0.7, -0.2, -0.7, 2.8, 0.0, 0.0 ); | |
| 79 | 4 | $term->( 6, -5, 0, 0.0, 0.5, 2.5, -0.1, 0.0, 0.0 ); | |
| 80 | 4 | $term->( 6, -6, 0, 0.3, -0.1, -0.3, -1.2, 0.0, 0.0 ); | |
| 81 | 4 | $term->( 7, -2, 0, -9.6, -3.9, 9.6, -18.6, -4.7, -5.3 ); | |
| 82 | 4 | $term->( 7, -2, 1, 0.4, -0.5, 1.0, 0.9, 0.3, -0.1 ); | |
| 83 | 4 | $term->( 7, -3, 0, 3.0, 5.3, 7.5, -3.5, 0.0, 0.0 ); | |
| 84 | 4 | $term->( 7, -4, 0, 0.2, 0.4, 1.6, -1.3, 0.0, 0.0 ); | |
| 85 | 4 | $term->( 7, -5, 0, -0.1, 0.2, 1.0, 0.5, 0.0, 0.0 ); | |
| 86 | 4 | $term->( 7, -6, 0, 0.2, 0.0, 0.2, -1.0, 0.0, 0.0 ); | |
| 87 | 4 | $term->( 8, -2, 0, -0.7, -0.2, 0.6, -1.2, -0.4, -0.4 ); | |
| 88 | 4 | $term->( 8, -3, 0, 0.5, 1.0, -2.0, 1.5, 0.1, 0.2 ); | |
| 89 | 4 | $term->( 8, -4, 0, 0.4, 1.3, 3.6, -0.9, 0.0, -0.1 ); | |
| 90 | 4 | $term->( 9, -4, 0, 4.0, -8.7, -19.9, -9.9, 0.2, -0.4 ); | |
| 91 | 4 | $term->( 9, -4, 1, 0.5, 0.3, 0.8, -1.8, 0.0, 0.0 ); | |
| 92 | 4 | $term->( 10, -4, 0, 21.3, -16.8, 3.3, 3.3, 0.2, -0.2 ); | |
| 93 | 4 | $term->( 10, -4, 1, 1.0, 1.7, -0.4, 0.4, 0.0, 0.0 ); | |
| 94 | 4 | $term->( 11, -4, 0, 1.6, -1.3, 3.0, 3.7, 0.8, -0.2 ); | |
| 95 | |||
| 96 | # Perturbations by Uranus | ||
| 97 | 4 | $term = pert( | |
| 98 | T => $t, | ||
| 99 | M => $m6, | ||
| 100 | m => $m7, | ||
| 101 | I_min => 0, | ||
| 102 | I_max => 3, | ||
| 103 | i_min => -5, | ||
| 104 | i_max => -1, | ||
| 105 | callback => $pert_cb | ||
| 106 | ); | ||
| 107 | 4 | $term->( 0, -1, 0, 1.0, 0.7, 0.4, -1.5, 0.1, 0.0 ); | |
| 108 | 4 | $term->( 0, -2, 0, 0.0, -0.4, -1.1, 0.1, -0.1, -0.1 ); | |
| 109 | 4 | $term->( 0, -3, 0, -0.9, -1.2, -2.7, 2.1, -0.5, -0.3 ); | |
| 110 | 4 | $term->( 1, -1, 0, 7.8, -1.5, 2.3, 12.7, 0.0, 0.0 ); | |
| 111 | 4 | $term->( 1, -2, 0, -1.1, -8.1, 5.2, -0.3, -0.3, -0.3 ); | |
| 112 | 4 | $term->( 1, -3, 0, -16.4, -21.0, -2.1, 0.0, 0.4, 0.0 ); | |
| 113 | 4 | $term->( 2, -1, 0, 0.6, -0.1, 0.1, 1.2, 0.1, 0.0 ); | |
| 114 | 4 | $term->( 2, -2, 0, -4.9, -11.7, 31.5, -13.3, 0.0, -0.2 ); | |
| 115 | 4 | $term->( 2, -3, 0, 19.1, 10.0, -22.1, 42.1, 0.1, -1.1 ); | |
| 116 | 4 | $term->( 2, -4, 0, 0.9, -0.1, 0.1, 1.4, 0.0, 0.0 ); | |
| 117 | 4 | $term->( 3, -2, 0, -0.4, -0.9, 1.7, -0.8, 0.0, -0.3 ); | |
| 118 | 4 | $term->( 3, -3, 0, 2.3, 0.0, 1.0, 5.7, 0.3, 0.3 ); | |
| 119 | 4 | $term->( 3, -4, 0, 0.3, -0.7, 2.0, 0.7, 0.0, 0.0 ); | |
| 120 | 4 | $term->( 3, -5, 0, -0.1, -0.4, 1.1, -0.3, 0.0, 0.0 ); | |
| 121 | |||
| 122 | # Perturbations by Neptune | ||
| 123 | 4 | $term = pert( | |
| 124 | T => $t, | ||
| 125 | M => $m6, | ||
| 126 | m => $m8, | ||
| 127 | I_min => 1, | ||
| 128 | I_max => 2, | ||
| 129 | i_min => -2, | ||
| 130 | i_max => -1, | ||
| 131 | callback => $pert_cb | ||
| 132 | ); | ||
| 133 | |||
| 134 | 4 | $term->( 1, -1, 0, -1.3, -1.2, 2.3, -2.5, 0.0, 0.0 ); | |
| 135 | 4 | $term->( 1, -2, 0, 1.0, -0.1, 0.1, 1.4, 0.0, 0.0 ); | |
| 136 | 4 | $term->( 2, -2, 0, 1.1, -0.1, 0.2, 3.3, 0.0, 0.0 ); | |
| 137 | |||
| 138 | # Perturbations by Saturn and Uranus | ||
| 139 | 4 | my $phi = ( -2 * $m5 + 5 * $m6 - 3 * $m7 ); | |
| 140 | 4 | my $c = cos($phi); | |
| 141 | 4 | my $s = sin($phi); | |
| 142 | |||
| 143 | 4 | $dl += -0.8 * $c - 0.1 * $s; | |
| 144 | 4 | $dr += -0.2 * $c + 1.8 * $s; | |
| 145 | 4 | $db += +0.3 * $c + 0.5 * $s; | |
| 146 | |||
| 147 | 4 | $phi = ( -2 * $m5 + 6 * $m6 - 3 * $m7 ); | |
| 148 | 4 | $c = cos($phi); | |
| 149 | 4 | $s = sin($phi); | |
| 150 | 4 | $dl += ( +2.4 - 0.7 * $t ) * $c + ( 27.8 - 0.4 * $t ) * $s; | |
| 151 | 4 | $dr += +2.1 * $c - 0.2 * $s; | |
| 152 | |||
| 153 | 4 | $phi = ( -2 * $m5 + 7 * $m6 - 3 * $m7 ); | |
| 154 | 4 | $c = cos($phi); | |
| 155 | 4 | $s = sin($phi); | |
| 156 | 4 | $dl += +0.1 * $c + 1.6 * $s; | |
| 157 | 4 | $dr += -3.6 * $c + 0.3 * $s; | |
| 158 | 4 | $db += -0.2 * $c + 0.6 * $s; | |
| 159 | |||
| 160 | # Ecliptic coordinates ([rad],[AU]) | ||
| 161 | 4 | my $l = | |
| 162 | pi2 * | ||
| 163 | frac( 0.2561136 + $m6 / pi2 + | ||
| 164 | ( ( 5018.6 + $t * 1.9 ) * $t + $dl ) / 1296.0e3 ); | ||
| 165 | 4 | my $r = 9.557584 - 0.000186 * $t + $dr * 1.0e-5; | |
| 166 | 4 | my $b = ( 175.1 - 10.2 * $t + $db ) / ARCS; | |
| 167 | |||
| 168 | 4 | $l, $b, $r; | |
| 169 | |||
| 170 | } | ||
| 171 | |||
| 172 | # Intermediate variables for calculating geocentric positions. | ||
| 173 | 4 | ▶ | sub _lbr_geo { |
|
Subroutine
_lbr_geo: called CC=1 SCAR=0.0
| |||
| 174 | 4 | my ( $self, $t ) = @_; | |
| 175 | |||
| 176 | 4 | my $m = pi2 * frac( 0.8829867 + 3.3947688 * $t ); | |
| 177 | 4 | my $cm = cos($m); | |
| 178 | 4 | my $dl = 5.84 + 0.65 * $cm; | |
| 179 | 4 | my $dr = 3.09 * sin($m); | |
| 180 | 4 | my $db = 0.24 * $cm; | |
| 181 | |||
| 182 | 4 | $dl, $db, $dr; | |
| 183 | } | ||
| 184 | |||
| 185 | 2 | 1; | |
| 186 | |||
| 187 | __END__ | ||