line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Astro::Montenbruck::Ephemeris::Planet::Jupiter; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
1320
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
67
|
|
4
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
71
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
12
|
use base qw/Astro::Montenbruck::Ephemeris::Planet/; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
180
|
|
7
|
2
|
|
|
2
|
|
12
|
use Math::Trig qw/:pi/; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
293
|
|
8
|
2
|
|
|
2
|
|
18
|
use Astro::Montenbruck::Ephemeris::Pert qw/pert/; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
107
|
|
9
|
2
|
|
|
2
|
|
14
|
use Astro::Montenbruck::MathUtils qw /frac ARCS/; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
120
|
|
10
|
2
|
|
|
2
|
|
14
|
use Astro::Montenbruck::Ephemeris::Planet qw/$JU/; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
2223
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = 0.01; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
5
|
|
|
5
|
1
|
15
|
my $class = shift; |
16
|
5
|
|
|
|
|
29
|
$class->SUPER::new( id => $JU); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub heliocentric { |
21
|
5
|
|
|
5
|
1
|
16
|
my ($self, $t) = @_; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# Mean anomalies of planets in [rad] |
24
|
5
|
|
|
|
|
17
|
my $m5 = pi2 * frac ( 0.0565314 + 8.4302963 * $t ); |
25
|
5
|
|
|
|
|
16
|
my $m6 = pi2 * frac ( 0.8829867 + 3.3947688 * $t ); |
26
|
5
|
|
|
|
|
17
|
my $m7 = pi2 * frac ( 0.3969537 + 1.1902586 * $t ); |
27
|
|
|
|
|
|
|
|
28
|
5
|
|
|
|
|
15
|
my ($dl, $dr, $db) = (0, 0, 0); # Corrections in longitude ["], |
29
|
5
|
|
|
250
|
|
21
|
my $pert_cb = sub { $dl += $_[0]; $dr += $_[1]; $db += $_[2] }; |
|
250
|
|
|
|
|
374
|
|
|
250
|
|
|
|
|
358
|
|
|
250
|
|
|
|
|
387
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# Perturbations by Saturn |
32
|
5
|
|
|
|
|
20
|
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
|
5
|
|
|
|
|
28
|
$term->(-1, -1,0, -0.2, 1.4, 2.0, 0.6, 0.1, -0.2); |
44
|
5
|
|
|
|
|
20
|
$term->( 0, -1,0, 9.4, 8.9, 3.9, -8.3, -0.4, -1.4); |
45
|
5
|
|
|
|
|
18
|
$term->( 0, -2,0, 5.6, -3.0, -5.4, -5.7, -2.0, 0.0); |
46
|
5
|
|
|
|
|
15
|
$term->( 0, -3,0, -4.0, -0.1, 0.0, 5.5, 0.0, 0.0); |
47
|
5
|
|
|
|
|
18
|
$term->( 0, -5,0, 3.3, -1.6, -1.6, -3.1, -0.5, -1.2); |
48
|
5
|
|
|
|
|
19
|
$term->( 1, 0,0,-113.1,19998.6,-25208.2,-142.2,-4670.7,288.9); |
49
|
5
|
|
|
|
|
16
|
$term->( 1, 0,1, -76.1, 66.9, -84.2, -95.8, 21.6, 29.4); |
50
|
5
|
|
|
|
|
16
|
$term->( 1, 0,2, -0.5, -0.3, 0.4, -0.7, 0.1, -0.1); |
51
|
5
|
|
|
|
|
17
|
$term->( 1, -1,0, 78.8, -14.5, 11.5, 64.4, -0.2, 0.2); |
52
|
5
|
|
|
|
|
17
|
$term->( 1, -2,0, -2.0, -132.4, 28.8, 4.3, -1.7, 0.4); |
53
|
5
|
|
|
|
|
18
|
$term->( 1, -2,1, -1.1, -0.7, 0.2, -0.3, 0.0, 0.0); |
54
|
5
|
|
|
|
|
17
|
$term->( 1, -3,0, -7.5, -6.8, -0.4, -1.1, 0.6, -0.9); |
55
|
5
|
|
|
|
|
18
|
$term->( 1, -4,0, 0.7, 0.7, 0.6, -1.1, 0.0, -0.2); |
56
|
5
|
|
|
|
|
18
|
$term->( 1, -5,0, 51.5, -26.0, -32.5, -64.4, -4.9,-12.4); |
57
|
5
|
|
|
|
|
19
|
$term->( 1, -5,1, -1.2, -2.2, -2.7, 1.5, -0.4, 0.3); |
58
|
5
|
|
|
|
|
15
|
$term->( 2, 0,0, -3.4, 632.0, -610.6, -6.5, -226.8, 12.7); |
59
|
5
|
|
|
|
|
16
|
$term->( 2, 0,1, -4.2, 3.8, -4.1, -4.5, 0.2, 0.6); |
60
|
5
|
|
|
|
|
16
|
$term->( 2, -1,0, 5.3, -0.7, 0.7, 6.1, 0.2, 1.1); |
61
|
5
|
|
|
|
|
16
|
$term->( 2, -2,0, -76.4, -185.1, 260.2,-108.0, 1.6, 0.0); |
62
|
5
|
|
|
|
|
27
|
$term->( 2, -3,0, 66.7, 47.8, -51.4, 69.8, 0.9, 0.3); |
63
|
5
|
|
|
|
|
27
|
$term->( 2, -3,1, 0.6, -1.0, 1.0, 0.6, 0.0, 0.0); |
64
|
5
|
|
|
|
|
16
|
$term->( 2, -4,0, 17.0, 1.4, -1.8, 9.6, 0.0, -0.1); |
65
|
5
|
|
|
|
|
18
|
$term->( 2, -5,0,1066.2, -518.3, -1.3, -23.9, 1.8, -0.3); |
66
|
5
|
|
|
|
|
18
|
$term->( 2, -5,1, -25.4, -40.3, -0.9, 0.3, 0.0, 0.0); |
67
|
5
|
|
|
|
|
16
|
$term->( 2, -5,2, -0.7, 0.5, 0.0, 0.0, 0.0, 0.0); |
68
|
5
|
|
|
|
|
19
|
$term->( 3, 0,0, -0.1, 28.0, -22.1, -0.2, -12.5, 0.7); |
69
|
5
|
|
|
|
|
20
|
$term->( 3, -2,0, -5.0, -11.5, 11.7, -5.4, 2.1, -1.0); |
70
|
5
|
|
|
|
|
28
|
$term->( 3, -3,0, 16.9, -6.4, 13.4, 26.9, -0.5, 0.8); |
71
|
5
|
|
|
|
|
16
|
$term->( 3, -4,0, 7.2, -13.3, 20.9, 10.5, 0.1, -0.1); |
72
|
5
|
|
|
|
|
16
|
$term->( 3, -5,0, 68.5, 134.3, -166.9, 86.5, 7.1, 15.2); |
73
|
5
|
|
|
|
|
17
|
$term->( 3, -5,1, 3.5, -2.7, 3.4, 4.3, 0.5, -0.4); |
74
|
5
|
|
|
|
|
19
|
$term->( 3, -6,0, 0.6, 1.0, -0.9, 0.5, 0.0, 0.0); |
75
|
5
|
|
|
|
|
50
|
$term->( 3, -7,0, -1.1, 1.7, -0.4, -0.2, 0.0, 0.0); |
76
|
5
|
|
|
|
|
16
|
$term->( 4, 0,0, 0.0, 1.4, -1.0, 0.0, -0.6, 0.0); |
77
|
5
|
|
|
|
|
16
|
$term->( 4, -2,0, -0.3, -0.7, 0.4, -0.2, 0.2, -0.1); |
78
|
5
|
|
|
|
|
22
|
$term->( 4, -3,0, 1.1, -0.6, 0.9, 1.2, 0.1, 0.2); |
79
|
5
|
|
|
|
|
27
|
$term->( 4, -4,0, 3.2, 1.7, -4.1, 5.8, 0.2, 0.1); |
80
|
5
|
|
|
|
|
18
|
$term->( 4, -5,0, 6.7, 8.7, -9.3, 8.7, -1.1, 1.6); |
81
|
5
|
|
|
|
|
21
|
$term->( 4, -6,0, 1.5, -0.3, 0.6, 2.4, 0.0, 0.0); |
82
|
5
|
|
|
|
|
15
|
$term->( 4, -7,0, -1.9, 2.3, -3.2, -2.7, 0.0, -0.1); |
83
|
5
|
|
|
|
|
23
|
$term->( 4, -8,0, 0.4, -1.8, 1.9, 0.5, 0.0, 0.0); |
84
|
5
|
|
|
|
|
20
|
$term->( 4, -9,0, -0.2, -0.5, 0.3, -0.1, 0.0, 0.0); |
85
|
5
|
|
|
|
|
22
|
$term->( 4,-10,0, -8.6, -6.8, -0.4, 0.1, 0.0, 0.0); |
86
|
5
|
|
|
|
|
16
|
$term->( 4,-10,1, -0.5, 0.6, 0.0, 0.0, 0.0, 0.0); |
87
|
5
|
|
|
|
|
19
|
$term->( 5, -5,0, -0.1, 1.5, -2.5, -0.8, -0.1, 0.1); |
88
|
5
|
|
|
|
|
16
|
$term->( 5, -6,0, 0.1, 0.8, -1.6, 0.1, 0.0, 0.0); |
89
|
5
|
|
|
|
|
17
|
$term->( 5, -9,0, -0.5, -0.1, 0.1, -0.8, 0.0, 0.0); |
90
|
5
|
|
|
|
|
18
|
$term->( 5,-10,0, 2.5, -2.2, 2.8, 3.1, 0.1, -0.2); |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
# Perturbations by Uranus |
93
|
5
|
|
|
|
|
19
|
$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
|
5
|
|
|
|
|
24
|
$term->( 1, -1,0, 0.4, 0.9, 0.0, 0.0, 0.0, 0.0); |
105
|
5
|
|
|
|
|
23
|
$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
|
5
|
|
|
|
|
17
|
my $phi = ( 2 * $m5 - 6 * $m6 + 3 * $m7); |
110
|
5
|
|
|
|
|
13
|
my $c = cos($phi); |
111
|
5
|
|
|
|
|
9
|
my $s = sin($phi); |
112
|
5
|
|
|
|
|
9
|
$dl += -0.8 * $c + 8.5 * $s; |
113
|
5
|
|
|
|
|
12
|
$dr += -0.1 * $c; |
114
|
|
|
|
|
|
|
|
115
|
5
|
|
|
|
|
10
|
$phi = (3 * $m5 - 6 * $m6 + 3 * $m7); |
116
|
5
|
|
|
|
|
11
|
$c = cos($phi); |
117
|
5
|
|
|
|
|
7
|
$s = sin($phi); |
118
|
5
|
|
|
|
|
9
|
$dl += +0.4 * $c + 0.5 * $s; |
119
|
5
|
|
|
|
|
11
|
$dr += -0.7 * $c + 0.5 * $s; |
120
|
5
|
|
|
|
|
9
|
$db += -0.1 * $c; |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
# Ecliptic coordinates ([rad],[AU]) |
123
|
5
|
|
|
|
|
24
|
my $l = pi2 * frac (0.0388910 + $m5 / pi2 + ( (5025.2+0.8 * $t ) * $t + $dl ) / 1296.0e3); |
124
|
5
|
|
|
|
|
12
|
my $r = 5.208873 + 0.000041 * $t + $dr * 1.0E-5; |
125
|
5
|
|
|
|
|
21
|
my $b = ( 227.3 - 0.3 * $t + $db ) / ARCS; |
126
|
|
|
|
|
|
|
|
127
|
5
|
|
|
|
|
47
|
$l, $b, $r |
128
|
|
|
|
|
|
|
} |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
# Intermediate variables for calculating geocentric positions. |
132
|
|
|
|
|
|
|
sub _lbr_geo { |
133
|
5
|
|
|
5
|
|
12
|
my ($self, $t) = @_; |
134
|
|
|
|
|
|
|
|
135
|
5
|
|
|
|
|
16
|
my $m = pi2 * frac(0.0565314+8.4302963 * $t); |
136
|
5
|
|
|
|
|
10
|
my $sm = sin($m); |
137
|
5
|
|
|
|
|
13
|
my $dl = 14.50 + 1.41 * cos($m); |
138
|
5
|
|
|
|
|
9
|
my $dr = 3.66 * $sm; |
139
|
5
|
|
|
|
|
9
|
my $db = 0.33 * $sm; |
140
|
|
|
|
|
|
|
|
141
|
5
|
|
|
|
|
14
|
$dl, $db, $dr; |
142
|
|
|
|
|
|
|
} |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
1; |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
__END__ |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
=pod |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=encoding UTF-8 |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=head1 NAME |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
Astro::Montenbruck::Ephemeris::Planet::Jupiter - Jupiter. |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=head1 SYNOPSIS |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
use Astro::Montenbruck::Ephemeris::Planet::Jupiter; |
160
|
|
|
|
|
|
|
my $planet = Astro::Montenbruck::Ephemeris::Planet::Jupiter->new(); |
161
|
|
|
|
|
|
|
my @geo = $planet->position($t); # apparent geocentric ecliptical coordinates |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
=head1 DESCRIPTION |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
Child class of L<Astro::Montenbruck::Ephemeris::Planet>, responsible for calculating |
166
|
|
|
|
|
|
|
B<Jupiter> position. |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
=head1 METHODS |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
=head2 Astro::Montenbruck::Ephemeris::Planet::Jupiter->new |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
Constructor. |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
=head2 $self->heliocentric($t) |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
See description in L<Astro::Montenbruck::Ephemeris::Planet>. |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
=head1 AUTHOR |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
Sergey Krushinsky, C<< <krushi at cpan.org> >> |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
Copyright (C) 2009-2019 by Sergey Krushinsky |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
187
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
=cut |