« lib/Astro/Montenbruck/Ephemeris/Planet/Sun.pm
↑ Summary
lib/Astro/Montenbruck/Ephemeris/Planet/Venus.pm »
| 1 | package Astro::Montenbruck::Ephemeris::Planet::Uranus; | ||
| 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 base qw/Astro::Montenbruck::Ephemeris::Planet/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 2 | ▶ | use Math::Trig qw/:pi/; |
|
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/$UR/; |
|
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 => $UR ); | |
| 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.0564472 + 8.4302889 * $t ); | |
| 23 | 4 | my $m6 = pi2 * frac( 0.8829611 + 3.3947583 * $t ); | |
| 24 | 4 | my $m7 = pi2 * frac( 0.3967117 + 1.1902849 * $t ); | |
| 25 | 4 | my $m8 = pi2 * frac( 0.7216833 + 0.6068528 * $t ); | |
| 26 | |||
| 27 | 4 | my ( $dl, $dr, $db ) = ( 0, 0, 0 ); # Corrections in longitude ["], | |
| 28 | 280 | ▶ | my $pert_cb = sub { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 29 | 280 | $dl += $_[0]; | |
| 30 | 280 | $dr += $_[1]; | |
| 31 | 280 | $db += $_[2]; | |
| 32 | 4 | }; | |
| 33 | |||
| 34 | # Perturbations by Uranus | ||
| 35 | 4 | my $term = pert( | |
| 36 | T => $t, | ||
| 37 | M => $m7, | ||
| 38 | m => $m5, | ||
| 39 | I_min => -1, | ||
| 40 | I_max => 3, | ||
| 41 | i_min => -2, | ||
| 42 | i_max => -1, | ||
| 43 | callback => $pert_cb | ||
| 44 | ); | ||
| 45 | |||
| 46 | 4 | $term->( -1, -1, 0, 0.0, 0.0, -0.1, 1.7, -0.1, 0.0 ); | |
| 47 | 4 | $term->( 0, -1, 0, 0.5, -1.2, 18.9, 9.1, -0.9, 0.1 ); | |
| 48 | 4 | $term->( 1, -1, 0, -21.2, 48.7, -455.5, -198.8, 0.0, 0.0 ); | |
| 49 | 4 | $term->( 1, -2, 0, -0.5, 1.2, -10.9, -4.8, 0.0, 0.0 ); | |
| 50 | 4 | $term->( 2, -1, 0, -1.3, 3.2, -23.2, -11.1, 0.3, 0.1 ); | |
| 51 | 4 | $term->( 2, -2, 0, -0.2, 0.2, 1.1, 1.5, 0.0, 0.0 ); | |
| 52 | 4 | $term->( 3, -1, 0, 0.0, 0.2, -1.8, 0.4, 0.0, 0.0 ); | |
| 53 | |||
| 54 | # Perturbations by Saturn | ||
| 55 | 4 | $term = pert( | |
| 56 | T => $t, | ||
| 57 | M => $m7, | ||
| 58 | m => $m6, | ||
| 59 | I_min => 0, | ||
| 60 | I_max => 11, | ||
| 61 | i_min => -6, | ||
| 62 | i_max => 0, | ||
| 63 | callback => $pert_cb | ||
| 64 | ); | ||
| 65 | 4 | $term->( 0, -1, 0, 1.4, -0.5, -6.4, 9.0, -0.4, -0.8 ); | |
| 66 | 4 | $term->( 1, -1, 0, -18.6, -12.6, 36.7, -336.8, 1.0, 0.3 ); | |
| 67 | 4 | $term->( 1, -2, 0, -0.7, -0.3, 0.5, -7.5, 0.1, 0.0 ); | |
| 68 | 4 | $term->( 2, -1, 0, 20.0, -141.6, -587.1, -107.0, 3.1, -0.8 ); | |
| 69 | 4 | $term->( 2, -1, 1, 1.0, 1.4, 5.8, -4.0, 0.0, 0.0 ); | |
| 70 | 4 | $term->( 2, -2, 0, 1.6, -3.8, -35.6, -16.0, 0.0, 0.0 ); | |
| 71 | 4 | $term->( 3, -1, 0, 75.3, -100.9, 128.9, 77.5, -0.8, 0.1 ); | |
| 72 | 4 | $term->( 3, -1, 1, 0.2, 1.8, -1.9, 0.3, 0.0, 0.0 ); | |
| 73 | 4 | $term->( 3, -2, 0, 2.3, -1.3, -9.5, -17.9, 0.0, 0.1 ); | |
| 74 | 4 | $term->( 3, -3, 0, -0.7, -0.5, -4.9, 6.8, 0.0, 0.0 ); | |
| 75 | 4 | $term->( 4, -1, 0, 3.4, -5.0, 21.6, 14.3, -0.8, -0.5 ); | |
| 76 | 4 | $term->( 4, -2, 0, 1.9, 0.1, 1.2, -12.1, 0.0, 0.0 ); | |
| 77 | 4 | $term->( 4, -3, 0, -0.1, -0.4, -3.9, 1.2, 0.0, 0.0 ); | |
| 78 | 4 | $term->( 4, -4, 0, -0.2, 0.1, 1.6, 1.8, 0.0, 0.0 ); | |
| 79 | 4 | $term->( 5, -1, 0, 0.2, -0.3, 1.0, 0.6, -0.1, 0.0 ); | |
| 80 | 4 | $term->( 5, -2, 0, -2.2, -2.2, -7.7, 8.5, 0.0, 0.0 ); | |
| 81 | 4 | $term->( 5, -3, 0, 0.1, -0.2, -1.4, -0.4, 0.0, 0.0 ); | |
| 82 | 4 | $term->( 5, -4, 0, -0.1, 0.0, 0.1, 1.2, 0.0, 0.0 ); | |
| 83 | 4 | $term->( 6, -2, 0, -0.2, -0.6, 1.4, -0.7, 0.0, 0.0 ); | |
| 84 | |||
| 85 | # Keplerian motion and perturbations by Neptune | ||
| 86 | 4 | $term = pert( | |
| 87 | T => $t, | ||
| 88 | M => $m7, | ||
| 89 | m => $m8, | ||
| 90 | I_min => -1, | ||
| 91 | I_max => 7, | ||
| 92 | i_min => -8, | ||
| 93 | i_max => 0, | ||
| 94 | callback => $pert_cb | ||
| 95 | ); | ||
| 96 | |||
| 97 | 4 | $term->( 1, 0, 0, -78.1, 19518.1, -90718.2, -334.7, 2759.5, -311.9 ); | |
| 98 | 4 | $term->( 1, 0, 1, -81.6, 107.7, -497.4, -379.5, -2.8, -43.7 ); | |
| 99 | 4 | $term->( 1, 0, 2, -6.6, -3.1, 14.4, -30.6, -0.4, -0.5 ); | |
| 100 | 4 | $term->( 1, 0, 3, 0.0, -0.5, 2.4, 0.0, 0.0, 0.0 ); | |
| 101 | 4 | $term->( 2, 0, 0, -2.4, 586.1, -2145.2, -15.3, 130.6, -14.3 ); | |
| 102 | 4 | $term->( 2, 0, 1, -4.5, 6.6, -24.2, -17.8, 0.7, -1.6 ); | |
| 103 | 4 | $term->( 2, 0, 2, -0.4, 0.0, 0.1, -1.4, 0.0, 0.0 ); | |
| 104 | 4 | $term->( 3, 0, 0, 0.0, 24.5, -76.2, -0.6, 7.0, -0.7 ); | |
| 105 | 4 | $term->( 3, 0, 1, -0.2, 0.4, -1.4, -0.8, 0.1, -0.1 ); | |
| 106 | 4 | $term->( 4, 0, 0, 0.0, 1.1, -3.0, 0.1, 0.4, 0.0 ); | |
| 107 | 4 | $term->( -1, -1, 0, -0.2, 0.2, 0.7, 0.7, -0.1, 0.0 ); | |
| 108 | 4 | $term->( 0, -1, 0, -2.8, 2.5, 8.7, 10.5, -0.4, -0.1 ); | |
| 109 | 4 | $term->( 1, -1, 0, -28.4, 20.3, -51.4, -72.0, 0.0, 0.0 ); | |
| 110 | 4 | $term->( 1, -2, 0, -0.6, -0.1, 4.2, -14.6, 0.2, 0.4 ); | |
| 111 | 4 | $term->( 1, -3, 0, 0.2, 0.5, 3.4, -1.6, -0.1, 0.1 ); | |
| 112 | 4 | $term->( 2, -1, 0, -1.8, 1.3, -5.5, -7.7, 0.0, 0.3 ); | |
| 113 | 4 | $term->( 2, -2, 0, 29.4, 10.2, -29.0, 83.2, 0.0, 0.0 ); | |
| 114 | 4 | $term->( 2, -3, 0, 8.8, 17.8, -41.9, 21.5, -0.1, -0.3 ); | |
| 115 | 4 | $term->( 2, -4, 0, 0.0, 0.1, -2.1, -0.9, 0.1, 0.0 ); | |
| 116 | 4 | $term->( 3, -2, 0, 1.5, 0.5, -1.7, 5.1, 0.1, -0.2 ); | |
| 117 | 4 | $term->( 3, -3, 0, 4.4, 14.6, -84.3, 25.2, 0.1, -0.1 ); | |
| 118 | 4 | $term->( 3, -4, 0, 2.4, -4.5, 12.0, 6.2, 0.0, 0.0 ); | |
| 119 | 4 | $term->( 3, -5, 0, 2.9, -0.9, 2.1, 6.2, 0.0, 0.0 ); | |
| 120 | 4 | $term->( 4, -3, 0, 0.3, 1.0, -4.0, 1.1, 0.1, -0.1 ); | |
| 121 | 4 | $term->( 4, -4, 0, 2.1, -2.7, 17.9, 14.0, 0.0, 0.0 ); | |
| 122 | 4 | $term->( 4, -5, 0, 3.0, -0.4, 2.3, 17.6, -0.1, -0.1 ); | |
| 123 | 4 | $term->( 4, -6, 0, -0.6, -0.5, 1.1, -1.6, 0.0, 0.0 ); | |
| 124 | 4 | $term->( 5, -4, 0, 0.2, -0.2, 1.0, 0.8, 0.0, 0.0 ); | |
| 125 | 4 | $term->( 5, -5, 0, -0.9, -0.1, 0.6, -7.1, 0.0, 0.0 ); | |
| 126 | 4 | $term->( 5, -6, 0, -0.5, -0.6, 3.8, -3.6, 0.0, 0.0 ); | |
| 127 | 4 | $term->( 5, -7, 0, 0.0, -0.5, 3.0, 0.1, 0.0, 0.0 ); | |
| 128 | 4 | $term->( 6, -6, 0, 0.2, 0.3, -2.7, 1.6, 0.0, 0.0 ); | |
| 129 | 4 | $term->( 6, -7, 0, -0.1, 0.2, -2.0, -0.4, 0.0, 0.0 ); | |
| 130 | 4 | $term->( 7, -7, 0, 0.1, -0.2, 1.3, 0.5, 0.0, 0.0 ); | |
| 131 | 4 | $term->( 7, -8, 0, 0.1, 0.0, 0.4, 0.9, 0.0, 0.0 ); | |
| 132 | |||
| 133 | # Perturbations by Uranus and Uranus | ||
| 134 | 4 | $term = pert( | |
| 135 | T => $t, | ||
| 136 | M => $m7, | ||
| 137 | m => $m6, | ||
| 138 | I_min => -2, | ||
| 139 | I_max => 4, | ||
| 140 | i_min => -6, | ||
| 141 | i_max => -4, | ||
| 142 | phi => 2 * $m5, | ||
| 143 | callback => $pert_cb | ||
| 144 | ); | ||
| 145 | |||
| 146 | 4 | $term->( -2, -4, 0, -0.7, 0.4, -1.5, -2.5, 0.0, 0.0 ); | |
| 147 | 4 | $term->( -1, -4, 0, -0.1, -0.1, -2.2, 1.0, 0.0, 0.0 ); | |
| 148 | 4 | $term->( 1, -5, 0, 0.1, -0.4, 1.4, 0.2, 0.0, 0.0 ); | |
| 149 | 4 | $term->( 1, -6, 0, 0.4, 0.5, -0.8, -0.8, 0.0, 0.0 ); | |
| 150 | 4 | $term->( 2, -6, 0, 5.7, 6.3, 28.5, -25.5, 0.0, 0.0 ); | |
| 151 | 4 | $term->( 2, -6, 1, 0.1, -0.2, -1.1, -0.6, 0.0, 0.0 ); | |
| 152 | 4 | $term->( 3, -6, 0, -1.4, 29.2, -11.4, 1.1, 0.0, 0.0 ); | |
| 153 | 4 | $term->( 3, -6, 1, 0.8, -0.4, 0.2, 0.3, 0.0, 0.0 ); | |
| 154 | 4 | $term->( 4, -6, 0, 0.0, 1.3, -6.0, -0.1, 0.0, 0.0 ); | |
| 155 | |||
| 156 | # Ecliptic coordinates ([rad],[AU]) | ||
| 157 | |||
| 158 | 4 | my $l = | |
| 159 | pi2 * | ||
| 160 | frac( 0.4734843 + $m7 / pi2 + | ||
| 161 | ( ( 5082.3 + 34.2 * $t ) * $t + $dl ) / 1296.0e3 ); | ||
| 162 | 4 | my $r = 19.211991 + ( -0.000333 - 0.000005 * $t ) * $t + $dr * 1.0e-5; | |
| 163 | 4 | my $b = ( -130.61 + ( -0.54 + 0.04 * $t ) * $t + $db ) / ARCS; | |
| 164 | |||
| 165 | 4 | $l, $b, $r; | |
| 166 | |||
| 167 | } | ||
| 168 | |||
| 169 | # Intermediate variables for calculating geocentric positions. | ||
| 170 | 4 | ▶ | sub _lbr_geo { |
|
Subroutine
_lbr_geo: called CC=1 SCAR=0.0
| |||
| 171 | 4 | my ( $self, $t ) = @_; | |
| 172 | |||
| 173 | 4 | my $m = pi2 * frac( 0.3967117 + 1.1902849 * $t ); | |
| 174 | 4 | my $sm = sin($m); | |
| 175 | 4 | my $dl = 2.05 + 0.19 * cos($m); | |
| 176 | 4 | my $dr = 1.86 * $sm; | |
| 177 | 4 | my $db = -0.03 * $sm; | |
| 178 | |||
| 179 | 4 | $dl, $db, $dr; | |
| 180 | } | ||
| 181 | |||
| 182 | 2 | 1; | |
| 183 | |||
| 184 | __END__ | ||