| 1 | package Astro::Montenbruck::Ephemeris::Planet::Jupiter; | ||
| 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 | |||
| 6 | 2 | ▶ | use base qw/Astro::Montenbruck::Ephemeris::Planet/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 2 | ▶ | use Math::Trig qw/:pi/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 2 | ▶ | use Astro::Montenbruck::Ephemeris::Pert qw/pert/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 2 | ▶ | use Astro::Montenbruck::MathUtils qw /frac ARCS/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 2 | ▶ | use Astro::Montenbruck::Ephemeris::Planet qw/$JU/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 2 | our $VERSION = 0.01; | |
| 13 | |||
| 14 | 4 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||
| 15 | 4 | my $class = shift; | |
| 16 | 4 | $class->SUPER::new( id => $JU); | |
| 17 | } | ||
| 18 | |||
| 19 | |||
| 20 | 4 | ▶ | sub heliocentric { |
|
Subroutine
heliocentric: called CC=1 SCAR=0.0
Pod
documented
| |||
| 21 | 4 | my ($self, $t) = @_; | |
| 22 | |||
| 23 | # Mean anomalies of planets in [rad] | ||
| 24 | 4 | my $m5 = pi2 * frac ( 0.0565314 + 8.4302963 * $t ); | |
| 25 | 4 | my $m6 = pi2 * frac ( 0.8829867 + 3.3947688 * $t ); | |
| 26 | 4 | my $m7 = pi2 * frac ( 0.3969537 + 1.1902586 * $t ); | |
| 27 | |||
| 28 | 4 | my ($dl, $dr, $db) = (0, 0, 0); # Corrections in longitude ["], | |
| 29 | 4 | ▶ | my $pert_cb = sub { $dl += $_[0]; $dr += $_[1]; $db += $_[2] }; |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 30 | |||
| 31 | # Perturbations by Saturn | ||
| 32 | 4 | my $term = pert( | |
| 33 | T => $t, | ||
| 34 | M => $m5, | ||
| 35 | m => $m6, | ||
| 36 | I_min =>-1, | ||
| 37 | I_max => 5, | ||
| 38 | i_min =>-10, | ||
| 39 | i_max =>-0, | ||
| 40 | callback => $pert_cb | ||
| 41 | ); | ||
| 42 | |||
| 43 | 4 | $term->(-1, -1,0, -0.2, 1.4, 2.0, 0.6, 0.1, -0.2); | |
| 44 | 4 | $term->( 0, -1,0, 9.4, 8.9, 3.9, -8.3, -0.4, -1.4); | |
| 45 | 4 | $term->( 0, -2,0, 5.6, -3.0, -5.4, -5.7, -2.0, 0.0); | |
| 46 | 4 | $term->( 0, -3,0, -4.0, -0.1, 0.0, 5.5, 0.0, 0.0); | |
| 47 | 4 | $term->( 0, -5,0, 3.3, -1.6, -1.6, -3.1, -0.5, -1.2); | |
| 48 | 4 | $term->( 1, 0,0,-113.1,19998.6,-25208.2,-142.2,-4670.7,288.9); | |
| 49 | 4 | $term->( 1, 0,1, -76.1, 66.9, -84.2, -95.8, 21.6, 29.4); | |
| 50 | 4 | $term->( 1, 0,2, -0.5, -0.3, 0.4, -0.7, 0.1, -0.1); | |
| 51 | 4 | $term->( 1, -1,0, 78.8, -14.5, 11.5, 64.4, -0.2, 0.2); | |
| 52 | 4 | $term->( 1, -2,0, -2.0, -132.4, 28.8, 4.3, -1.7, 0.4); | |
| 53 | 4 | $term->( 1, -2,1, -1.1, -0.7, 0.2, -0.3, 0.0, 0.0); | |
| 54 | 4 | $term->( 1, -3,0, -7.5, -6.8, -0.4, -1.1, 0.6, -0.9); | |
| 55 | 4 | $term->( 1, -4,0, 0.7, 0.7, 0.6, -1.1, 0.0, -0.2); | |
| 56 | 4 | $term->( 1, -5,0, 51.5, -26.0, -32.5, -64.4, -4.9,-12.4); | |
| 57 | 4 | $term->( 1, -5,1, -1.2, -2.2, -2.7, 1.5, -0.4, 0.3); | |
| 58 | 4 | $term->( 2, 0,0, -3.4, 632.0, -610.6, -6.5, -226.8, 12.7); | |
| 59 | 4 | $term->( 2, 0,1, -4.2, 3.8, -4.1, -4.5, 0.2, 0.6); | |
| 60 | 4 | $term->( 2, -1,0, 5.3, -0.7, 0.7, 6.1, 0.2, 1.1); | |
| 61 | 4 | $term->( 2, -2,0, -76.4, -185.1, 260.2,-108.0, 1.6, 0.0); | |
| 62 | 4 | $term->( 2, -3,0, 66.7, 47.8, -51.4, 69.8, 0.9, 0.3); | |
| 63 | 4 | $term->( 2, -3,1, 0.6, -1.0, 1.0, 0.6, 0.0, 0.0); | |
| 64 | 4 | $term->( 2, -4,0, 17.0, 1.4, -1.8, 9.6, 0.0, -0.1); | |
| 65 | 4 | $term->( 2, -5,0,1066.2, -518.3, -1.3, -23.9, 1.8, -0.3); | |
| 66 | 4 | $term->( 2, -5,1, -25.4, -40.3, -0.9, 0.3, 0.0, 0.0); | |
| 67 | 4 | $term->( 2, -5,2, -0.7, 0.5, 0.0, 0.0, 0.0, 0.0); | |
| 68 | 4 | $term->( 3, 0,0, -0.1, 28.0, -22.1, -0.2, -12.5, 0.7); | |
| 69 | 4 | $term->( 3, -2,0, -5.0, -11.5, 11.7, -5.4, 2.1, -1.0); | |
| 70 | 4 | $term->( 3, -3,0, 16.9, -6.4, 13.4, 26.9, -0.5, 0.8); | |
| 71 | 4 | $term->( 3, -4,0, 7.2, -13.3, 20.9, 10.5, 0.1, -0.1); | |
| 72 | 4 | $term->( 3, -5,0, 68.5, 134.3, -166.9, 86.5, 7.1, 15.2); | |
| 73 | 4 | $term->( 3, -5,1, 3.5, -2.7, 3.4, 4.3, 0.5, -0.4); | |
| 74 | 4 | $term->( 3, -6,0, 0.6, 1.0, -0.9, 0.5, 0.0, 0.0); | |
| 75 | 4 | $term->( 3, -7,0, -1.1, 1.7, -0.4, -0.2, 0.0, 0.0); | |
| 76 | 4 | $term->( 4, 0,0, 0.0, 1.4, -1.0, 0.0, -0.6, 0.0); | |
| 77 | 4 | $term->( 4, -2,0, -0.3, -0.7, 0.4, -0.2, 0.2, -0.1); | |
| 78 | 4 | $term->( 4, -3,0, 1.1, -0.6, 0.9, 1.2, 0.1, 0.2); | |
| 79 | 4 | $term->( 4, -4,0, 3.2, 1.7, -4.1, 5.8, 0.2, 0.1); | |
| 80 | 4 | $term->( 4, -5,0, 6.7, 8.7, -9.3, 8.7, -1.1, 1.6); | |
| 81 | 4 | $term->( 4, -6,0, 1.5, -0.3, 0.6, 2.4, 0.0, 0.0); | |
| 82 | 4 | $term->( 4, -7,0, -1.9, 2.3, -3.2, -2.7, 0.0, -0.1); | |
| 83 | 4 | $term->( 4, -8,0, 0.4, -1.8, 1.9, 0.5, 0.0, 0.0); | |
| 84 | 4 | $term->( 4, -9,0, -0.2, -0.5, 0.3, -0.1, 0.0, 0.0); | |
| 85 | 4 | $term->( 4,-10,0, -8.6, -6.8, -0.4, 0.1, 0.0, 0.0); | |
| 86 | 4 | $term->( 4,-10,1, -0.5, 0.6, 0.0, 0.0, 0.0, 0.0); | |
| 87 | 4 | $term->( 5, -5,0, -0.1, 1.5, -2.5, -0.8, -0.1, 0.1); | |
| 88 | 4 | $term->( 5, -6,0, 0.1, 0.8, -1.6, 0.1, 0.0, 0.0); | |
| 89 | 4 | $term->( 5, -9,0, -0.5, -0.1, 0.1, -0.8, 0.0, 0.0); | |
| 90 | 4 | $term->( 5,-10,0, 2.5, -2.2, 2.8, 3.1, 0.1, -0.2); | |
| 91 | |||
| 92 | # Perturbations by Uranus | ||
| 93 | 4 | $term | |
| 94 | = pert(T => $t, | ||
| 95 | M => $m5, | ||
| 96 | m => $m7, | ||
| 97 | I_min => 1, | ||
| 98 | I_max => 1, | ||
| 99 | i_min =>-2, | ||
| 100 | i_max =>-1, | ||
| 101 | callback => $pert_cb); | ||
| 102 | |||
| 103 | |||
| 104 | 4 | $term->( 1, -1,0, 0.4, 0.9, 0.0, 0.0, 0.0, 0.0); | |
| 105 | 4 | $term->( 1, -2,0, 0.4, 0.4, -0.4, 0.3, 0.0, 0.0); | |
| 106 | |||
| 107 | |||
| 108 | # Perturbations by Saturn and Uranus | ||
| 109 | 4 | my $phi = ( 2 * $m5 - 6 * $m6 + 3 * $m7); | |
| 110 | 4 | my $c = cos($phi); | |
| 111 | 4 | my $s = sin($phi); | |
| 112 | 4 | $dl += -0.8 * $c + 8.5 * $s; | |
| 113 | 4 | $dr += -0.1 * $c; | |
| 114 | |||
| 115 | 4 | $phi = (3 * $m5 - 6 * $m6 + 3 * $m7); | |
| 116 | 4 | $c = cos($phi); | |
| 117 | 4 | $s = sin($phi); | |
| 118 | 4 | $dl += +0.4 * $c + 0.5 * $s; | |
| 119 | 4 | $dr += -0.7 * $c + 0.5 * $s; | |
| 120 | 4 | $db += -0.1 * $c; | |
| 121 | |||
| 122 | # Ecliptic coordinates ([rad],[AU]) | ||
| 123 | 4 | my $l = pi2 * frac (0.0388910 + $m5 / pi2 + ( (5025.2+0.8 * $t ) * $t + $dl ) / 1296.0e3); | |
| 124 | 4 | my $r = 5.208873 + 0.000041 * $t + $dr * 1.0E-5; | |
| 125 | 4 | my $b = ( 227.3 - 0.3 * $t + $db ) / ARCS; | |
| 126 | |||
| 127 | 4 | $l, $b, $r | |
| 128 | } | ||
| 129 | |||
| 130 | |||
| 131 | # Intermediate variables for calculating geocentric positions. | ||
| 132 | 4 | ▶ | sub _lbr_geo { |
|
Subroutine
_lbr_geo: called CC=1 SCAR=0.0
| |||
| 133 | 4 | my ($self, $t) = @_; | |
| 134 | |||
| 135 | 4 | my $m = pi2 * frac(0.0565314+8.4302963 * $t); | |
| 136 | 4 | my $sm = sin($m); | |
| 137 | 4 | my $dl = 14.50 + 1.41 * cos($m); | |
| 138 | 4 | my $dr = 3.66 * $sm; | |
| 139 | 4 | my $db = 0.33 * $sm; | |
| 140 | |||
| 141 | 4 | $dl, $db, $dr; | |
| 142 | } | ||
| 143 | |||
| 144 | |||
| 145 | 2 | 1; | |
| 146 | |||
| 147 | __END__ | ||