| 1 | package Astro::Montenbruck::Ephemeris::Planet::Venus; | ||
| 2 | |||
| 3 | 3 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 3 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 3 | ▶ | use base qw/Astro::Montenbruck::Ephemeris::Planet/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 3 | ▶ | use Math::Trig qw/:pi/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 3 | ▶ | use Astro::Montenbruck::Ephemeris::Pert qw /pert/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 3 | ▶ | use Astro::Montenbruck::MathUtils qw /frac ARCS/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 3 | ▶ | use Astro::Montenbruck::Ephemeris::Planet qw/$VE/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | 3 | our $VERSION = 0.01; | |
| 14 | |||
| 15 | 6 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||
| 16 | 6 | my $class = shift; | |
| 17 | 6 | $class->SUPER::new( id => $VE ); | |
| 18 | } | ||
| 19 | |||
| 20 | # Venus heliocentric position | ||
| 21 | 6 | ▶ | sub heliocentric { |
|
Subroutine
heliocentric: called CC=1 SCAR=0.0
Pod
documented
| |||
| 22 | 6 | my ( $self, $t ) = @_; | |
| 23 | |||
| 24 | # mean anomalies of planets in [rad] | ||
| 25 | 6 | my $m1 = pi2 * frac( 0.4861431 + 415.2018375 * $t ); | |
| 26 | 6 | my $m2 = pi2 * frac( 0.1400197 + 162.5494552 * $t ); | |
| 27 | 6 | my $m3 = pi2 * frac( 0.9944153 + 99.9982208 * $t ); | |
| 28 | 6 | my $m4 = pi2 * frac( 0.0556297 + 53.1674631 * $t ); | |
| 29 | 6 | my $m5 = pi2 * frac( 0.0567028 + 8.4305083 * $t ); | |
| 30 | 6 | my $m6 = pi2 * frac( 0.8830539 + 3.3947206 * $t ); | |
| 31 | |||
| 32 | 6 | my ( $dl, $dr, $db ) = ( 0, 0, 0 ); # Corrections in longitude ["] | |
| 33 | 6 | ▶ | my $pert_cb = sub { $dl += $_[0]; $dr += $_[1]; $db += $_[2] }; |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 34 | |||
| 35 | # Perturbations by Mercury | ||
| 36 | 6 | my $term = pert( | |
| 37 | T => $t, | ||
| 38 | M => $m2, | ||
| 39 | m => $m1, | ||
| 40 | I_min => 1, | ||
| 41 | I_max => 5, | ||
| 42 | i_min => -2, | ||
| 43 | i_max => -1, | ||
| 44 | callback => $pert_cb | ||
| 45 | ); | ||
| 46 | |||
| 47 | 6 | $term->( 1, -1, 0, 0.00, 0.00, 0.06, -0.09, 0.01, 0.00 ); | |
| 48 | 6 | $term->( 2, -1, 0, 0.25, -0.09, -0.09, -0.27, 0.00, 0.00 ); | |
| 49 | 6 | $term->( 4, -2, 0, -0.07, -0.08, -0.14, 0.14, -0.01, -0.01 ); | |
| 50 | 6 | $term->( 5, -2, 0, -0.35, 0.08, 0.02, 0.09, 0.00, 0.00 ); | |
| 51 | |||
| 52 | # Keplerian motion and perturbations by the Earth | ||
| 53 | 6 | $term = pert( | |
| 54 | T => $t, | ||
| 55 | M => $m2, | ||
| 56 | m => $m3, | ||
| 57 | I_min => 1, | ||
| 58 | I_max => 8, | ||
| 59 | i_min => -8, | ||
| 60 | i_max => 0, | ||
| 61 | callback => $pert_cb | ||
| 62 | ); | ||
| 63 | |||
| 64 | 6 | $term->( 1, 0, 0, 2.37, 2793.23, -4899.07, 0.11, 9995.27, 7027.22 ); | |
| 65 | 6 | $term->( 1, 0, 1, 0.10, -19.65, 34.40, 0.22, 64.95, -86.10 ); | |
| 66 | 6 | $term->( 1, 0, 2, 0.06, 0.04, -0.07, 0.11, -0.55, -0.07 ); | |
| 67 | 6 | $term->( 2, 0, 0, -170.42, 73.13, -16.59, 0.00, 67.71, 47.56 ); | |
| 68 | 6 | $term->( 2, 0, 1, 0.93, 2.91, 0.23, 0.00, -0.03, -0.92 ); | |
| 69 | 6 | $term->( 3, 0, 0, -2.31, 0.90, -0.08, 0.00, 0.04, 2.09 ); | |
| 70 | 6 | $term->( 1, -1, 0, -2.38, -4.27, 3.27, -1.82, 0.00, 0.00 ); | |
| 71 | 6 | $term->( 1, -2, 0, 0.09, 0.00, -0.08, 0.05, -0.02, -0.25 ); | |
| 72 | 6 | $term->( 2, -2, 0, -9.57, -5.93, 8.57, -13.83, -0.01, -0.01 ); | |
| 73 | 6 | $term->( 2, -3, 0, -2.47, -2.40, 0.83, -0.95, 0.16, 0.24 ); | |
| 74 | 6 | $term->( 3, -2, 0, -0.09, -0.05, 0.08, -0.13, -0.28, 0.12 ); | |
| 75 | 6 | $term->( 3, -3, 0, 7.12, 0.32, -0.62, 13.76, -0.07, 0.01 ); | |
| 76 | 6 | $term->( 3, -4, 0, -0.65, -0.17, 0.18, -0.73, 0.10, 0.05 ); | |
| 77 | 6 | $term->( 3, -5, 0, -1.08, -0.95, -0.17, 0.22, -0.03, -0.03 ); | |
| 78 | 6 | $term->( 4, -3, 0, 0.06, 0.00, -0.01, 0.08, 0.14, -0.18 ); | |
| 79 | 6 | $term->( 4, -4, 0, 0.93, -0.46, 1.06, 2.13, -0.01, 0.01 ); | |
| 80 | 6 | $term->( 4, -5, 0, -1.53, 0.38, -0.64, -2.54, 0.27, 0.00 ); | |
| 81 | 6 | $term->( 4, -6, 0, -0.17, -0.05, 0.03, -0.11, 0.02, 0.00 ); | |
| 82 | 6 | $term->( 5, -5, 0, 0.18, -0.28, 0.71, 0.47, -0.02, 0.04 ); | |
| 83 | 6 | $term->( 5, -6, 0, 0.15, -0.14, 0.30, 0.31, -0.04, 0.03 ); | |
| 84 | 6 | $term->( 5, -7, 0, -0.08, 0.02, -0.03, -0.11, 0.01, 0.00 ); | |
| 85 | 6 | $term->( 5, -8, 0, -0.23, 0.00, 0.01, -0.04, 0.00, 0.00 ); | |
| 86 | 6 | $term->( 6, -6, 0, 0.01, -0.14, 0.39, 0.04, 0.00, -0.01 ); | |
| 87 | 6 | $term->( 6, -7, 0, 0.02, -0.05, 0.12, 0.04, -0.01, 0.01 ); | |
| 88 | 6 | $term->( 6, -8, 0, 0.10, -0.10, 0.19, 0.19, -0.02, 0.02 ); | |
| 89 | 6 | $term->( 7, -7, 0, -0.03, -0.06, 0.18, -0.08, 0.00, 0.00 ); | |
| 90 | 6 | $term->( 8, -8, 0, -0.03, -0.02, 0.06, -0.08, 0.00, 0.00 ); | |
| 91 | |||
| 92 | # Perturbations by Mars | ||
| 93 | 6 | $term = pert( | |
| 94 | T => $t, | ||
| 95 | M => $m2, | ||
| 96 | m => $m4, | ||
| 97 | I_min => 1, | ||
| 98 | I_max => 2, | ||
| 99 | i_min => -3, | ||
| 100 | i_max => -2, | ||
| 101 | callback => $pert_cb | ||
| 102 | ); | ||
| 103 | |||
| 104 | 6 | $term->( 1, -3, 0, -0.65, 1.02, -0.04, -0.02, -0.02, 0.00 ); | |
| 105 | 6 | $term->( 2, -2, 0, -0.05, 0.04, -0.09, -0.10, 0.00, 0.00 ); | |
| 106 | 6 | $term->( 2, -3, 0, -0.50, 0.45, -0.79, -0.89, 0.01, 0.03 ); | |
| 107 | |||
| 108 | # Perturbations by Venus | ||
| 109 | 6 | $term = pert( | |
| 110 | T => $t, | ||
| 111 | M => $m2, | ||
| 112 | m => $m5, | ||
| 113 | I_min => 0, | ||
| 114 | I_max => 3, | ||
| 115 | i_min => -3, | ||
| 116 | i_max => -1, | ||
| 117 | callback => $pert_cb | ||
| 118 | ); | ||
| 119 | |||
| 120 | 6 | $term->( 0, -1, 0, -0.05, 1.56, 0.16, 0.04, -0.08, -0.04 ); | |
| 121 | 6 | $term->( 1, -1, 0, -2.62, 1.40, -2.35, -4.40, 0.02, 0.03 ); | |
| 122 | 6 | $term->( 1, -2, 0, -0.47, -0.08, 0.12, -0.76, 0.04, -0.18 ); | |
| 123 | 6 | $term->( 2, -2, 0, -0.73, -0.51, 1.27, -1.82, -0.01, 0.01 ); | |
| 124 | 6 | $term->( 2, -3, 0, -0.14, -0.10, 0.25, -0.34, 0.00, 0.00 ); | |
| 125 | 6 | $term->( 3, -3, 0, -0.01, 0.04, -0.11, -0.02, 0.00, 0.00 ); | |
| 126 | |||
| 127 | # Perturbations by Saturn | ||
| 128 | 6 | $term = pert( | |
| 129 | T => $t, | ||
| 130 | M => $m2, | ||
| 131 | m => $m6, | ||
| 132 | I_min => 0, | ||
| 133 | I_max => 1, | ||
| 134 | i_min => -1, | ||
| 135 | i_max => -1, | ||
| 136 | callback => $pert_cb | ||
| 137 | ); | ||
| 138 | |||
| 139 | 6 | $term->( 0, -1, 0, 0.00, 0.21, 0.00, 0.00, 0.00, -0.01 ); | |
| 140 | 6 | $term->( 1, -1, 0, -0.11, -0.14, 0.24, -0.20, 0.01, 0.00 ); | |
| 141 | |||
| 142 | # Ecliptic coordinates ([rad],[AU]) | ||
| 143 | 6 | $dl += | |
| 144 | +2.74 * sin( pi2 * ( 0.0764 + 0.4174 * $t ) ) + | ||
| 145 | 0.27 * sin( pi2 * ( 0.9201 + 0.3307 * $t ) ); | ||
| 146 | 6 | $dl += +1.9 + 1.8 * $t; | |
| 147 | |||
| 148 | 6 | my $l = | |
| 149 | pi2 * | ||
| 150 | frac( 0.3654783 + $m2 / pi2 + | ||
| 151 | ( ( 5071.2 + 1.1 * $t ) * $t + $dl ) / 1296.0e3 ); | ||
| 152 | 6 | my $r = 0.7233482 - 0.0000002 * $t + $dr * 1.0e-6; | |
| 153 | 6 | my $b = ( -67.70 + ( 0.04 + 0.01 * $t ) * $t + $db ) / ARCS; | |
| 154 | |||
| 155 | 6 | $l, $b, $r; | |
| 156 | } | ||
| 157 | |||
| 158 | # Intermediate variables for calculating geocentric positions. | ||
| 159 | 6 | ▶ | sub _lbr_geo { |
|
Subroutine
_lbr_geo: called CC=1 SCAR=0.0
| |||
| 160 | 6 | my ( $self, $t ) = @_; | |
| 161 | |||
| 162 | 6 | my $m = pi2 * frac( 0.1400197 + 162.5494552 * $t ); | |
| 163 | 6 | my $dl = 280.00 + 3.79 * cos($m); | |
| 164 | 6 | my $dr = 1.37 * sin($m); | |
| 165 | 6 | my $db = 9.54 * cos($m) - 13.57 * sin($m); | |
| 166 | |||
| 167 | 6 | $dl, $db, $dr; | |
| 168 | } | ||
| 169 | |||
| 170 | 3 | 1; | |
| 171 | |||
| 172 | __END__ | ||