line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Astro::Montenbruck::Ephemeris::Planet::Saturn; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
1068
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
54
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
53
|
|
5
|
2
|
|
|
2
|
|
9
|
use Math::Trig qw/:pi/; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
236
|
|
6
|
2
|
|
|
2
|
|
11
|
use base qw/Astro::Montenbruck::Ephemeris::Planet/; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
164
|
|
7
|
2
|
|
|
2
|
|
11
|
use Astro::Montenbruck::Ephemeris::Pert qw/pert/; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
74
|
|
8
|
2
|
|
|
2
|
|
10
|
use Astro::Montenbruck::MathUtils qw/frac ARCS/; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
80
|
|
9
|
2
|
|
|
2
|
|
11
|
use Astro::Montenbruck::Ephemeris::Planet qw/$SA/; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
2359
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = 0.01; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new { |
14
|
4
|
|
|
4
|
1
|
7
|
my $class = shift; |
15
|
4
|
|
|
|
|
17
|
$class->SUPER::new( id => $SA ); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub heliocentric { |
19
|
4
|
|
|
4
|
1
|
9
|
my ( $self, $t ) = @_; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# Mean anomalies of planets in [rad] |
22
|
4
|
|
|
|
|
11
|
my $m5 = pi2 * frac( 0.0565314 + 8.4302963 * $t ); |
23
|
4
|
|
|
|
|
10
|
my $m6 = pi2 * frac( 0.8829867 + 3.3947688 * $t ); |
24
|
4
|
|
|
|
|
9
|
my $m7 = pi2 * frac( 0.3969537 + 1.1902586 * $t ); |
25
|
4
|
|
|
|
|
10
|
my $m8 = pi2 * frac( 0.7208473 + 0.6068623 * $t ); |
26
|
|
|
|
|
|
|
|
27
|
4
|
|
|
|
|
8
|
my ( $dl, $dr, $db ) = ( 0, 0, 0 ); # Corrections in longitude ["], |
28
|
4
|
|
|
284
|
|
15
|
my $pert_cb = sub { $dl += $_[0]; $dr += $_[1]; $db += $_[2] }; |
|
284
|
|
|
|
|
322
|
|
|
284
|
|
|
|
|
307
|
|
|
284
|
|
|
|
|
377
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# Perturbations by Saturn |
31
|
4
|
|
|
|
|
14
|
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
|
|
|
|
|
18
|
$term->( 0, -1, 0, 12.0, -1.4, -13.9, 6.4, 1.2, -1.8 ); |
42
|
4
|
|
|
|
|
10
|
$term->( 0, -2, 0, 0.0, -0.2, -0.9, 1.0, 0.0, -0.1 ); |
43
|
4
|
|
|
|
|
11
|
$term->( 1, 1, 0, 0.9, 0.4, -1.8, 1.9, 0.2, 0.2 ); |
44
|
4
|
|
|
|
|
12
|
$term->( 1, 0, 0, -348.3, 22907.7, -52915.5, -752.2, -3266.5, 8314.4 ); |
45
|
4
|
|
|
|
|
11
|
$term->( 1, 0, 1, -225.2, -146.2, 337.7, -521.3, 79.6, 17.4 ); |
46
|
4
|
|
|
|
|
10
|
$term->( 1, 0, 2, 1.3, -1.4, 3.2, 2.9, 0.1, -0.4 ); |
47
|
4
|
|
|
|
|
12
|
$term->( 1, -1, 0, -1.0, -30.7, 108.6, -815.0, -3.6, -9.3 ); |
48
|
4
|
|
|
|
|
11
|
$term->( 1, -2, 0, -2.0, -2.7, -2.1, -11.9, -0.1, -0.4 ); |
49
|
4
|
|
|
|
|
11
|
$term->( 2, 1, 0, 0.1, 0.2, -1.0, 0.3, 0.0, 0.0 ); |
50
|
4
|
|
|
|
|
10
|
$term->( 2, 0, 0, 44.2, 724.0, -1464.3, -34.7, -188.7, 459.1 ); |
51
|
4
|
|
|
|
|
13
|
$term->( 2, 0, 1, -17.0, -11.3, 18.9, -28.6, 1.0, -3.7 ); |
52
|
4
|
|
|
|
|
12
|
$term->( 2, -1, 0, -3.5, -426.6, -546.5, -26.5, -1.6, -2.7 ); |
53
|
4
|
|
|
|
|
11
|
$term->( 2, -1, 1, 3.5, -2.2, -2.6, -4.3, 0.0, 0.0 ); |
54
|
4
|
|
|
|
|
12
|
$term->( 2, -2, 0, 10.5, -30.9, -130.5, -52.3, -1.9, 0.2 ); |
55
|
4
|
|
|
|
|
12
|
$term->( 2, -3, 0, -0.2, -0.4, -1.2, -0.1, -0.1, 0.0 ); |
56
|
4
|
|
|
|
|
14
|
$term->( 3, 0, 0, 6.5, 30.5, -61.1, 0.4, -11.6, 28.1 ); |
57
|
4
|
|
|
|
|
15
|
$term->( 3, 0, 1, -1.2, -0.7, 1.1, -1.8, -0.2, -0.6 ); |
58
|
4
|
|
|
|
|
13
|
$term->( 3, -1, 0, 29.0, -40.2, 98.2, 45.3, 3.2, -9.4 ); |
59
|
4
|
|
|
|
|
16
|
$term->( 3, -1, 1, 0.6, 0.6, -1.0, 1.3, 0.0, 0.0 ); |
60
|
4
|
|
|
|
|
14
|
$term->( 3, -2, 0, -27.0, -21.1, -68.5, 8.1, -19.8, 5.4 ); |
61
|
4
|
|
|
|
|
11
|
$term->( 3, -2, 1, 0.9, -0.5, -0.4, -2.0, -0.1, -0.8 ); |
62
|
4
|
|
|
|
|
10
|
$term->( 3, -3, 0, -5.4, -4.1, -19.1, 26.2, -0.1, -0.1 ); |
63
|
4
|
|
|
|
|
10
|
$term->( 4, 0, 0, 0.6, 1.4, -3.0, -0.2, -0.6, 1.6 ); |
64
|
4
|
|
|
|
|
10
|
$term->( 4, -1, 0, 1.5, -2.5, 12.4, 4.7, 1.0, -1.1 ); |
65
|
4
|
|
|
|
|
13
|
$term->( 4, -2, 0, -821.9, -9.6, -26.0, 1873.6, -70.5, -4.4 ); |
66
|
4
|
|
|
|
|
11
|
$term->( 4, -2, 1, 4.1, -21.9, -50.3, -9.9, 0.7, -3.0 ); |
67
|
4
|
|
|
|
|
12
|
$term->( 4, -3, 0, -2.0, -4.7, -19.3, 8.2, -0.1, -0.3 ); |
68
|
4
|
|
|
|
|
11
|
$term->( 4, -4, 0, -1.5, 1.3, 6.5, 7.3, 0.0, 0.0 ); |
69
|
4
|
|
|
|
|
12
|
$term->( 5, -2, 0, -2627.6, -1277.3, 117.4, -344.1, -13.8, -4.3 ); |
70
|
4
|
|
|
|
|
10
|
$term->( 5, -2, 1, 63.0, -98.6, 12.7, 6.7, 0.1, -0.2 ); |
71
|
4
|
|
|
|
|
9
|
$term->( 5, -2, 2, 1.7, 1.2, -0.2, 0.3, 0.0, 0.0 ); |
72
|
4
|
|
|
|
|
10
|
$term->( 5, -3, 0, 0.4, -3.6, -11.3, -1.6, 0.0, -0.3 ); |
73
|
4
|
|
|
|
|
9
|
$term->( 5, -4, 0, -1.4, 0.3, 1.5, 6.3, -0.1, 0.0 ); |
74
|
4
|
|
|
|
|
11
|
$term->( 5, -5, 0, 0.3, 0.6, 3.0, -1.7, 0.0, 0.0 ); |
75
|
4
|
|
|
|
|
11
|
$term->( 6, -2, 0, -146.7, -73.7, 166.4, -334.3, -43.6, -46.7 ); |
76
|
4
|
|
|
|
|
14
|
$term->( 6, -2, 1, 5.2, -6.8, 15.1, 11.4, 1.7, -1.0 ); |
77
|
4
|
|
|
|
|
9
|
$term->( 6, -3, 0, 1.5, -2.9, -2.2, -1.3, 0.1, -0.1 ); |
78
|
4
|
|
|
|
|
11
|
$term->( 6, -4, 0, -0.7, -0.2, -0.7, 2.8, 0.0, 0.0 ); |
79
|
4
|
|
|
|
|
10
|
$term->( 6, -5, 0, 0.0, 0.5, 2.5, -0.1, 0.0, 0.0 ); |
80
|
4
|
|
|
|
|
9
|
$term->( 6, -6, 0, 0.3, -0.1, -0.3, -1.2, 0.0, 0.0 ); |
81
|
4
|
|
|
|
|
12
|
$term->( 7, -2, 0, -9.6, -3.9, 9.6, -18.6, -4.7, -5.3 ); |
82
|
4
|
|
|
|
|
12
|
$term->( 7, -2, 1, 0.4, -0.5, 1.0, 0.9, 0.3, -0.1 ); |
83
|
4
|
|
|
|
|
10
|
$term->( 7, -3, 0, 3.0, 5.3, 7.5, -3.5, 0.0, 0.0 ); |
84
|
4
|
|
|
|
|
8
|
$term->( 7, -4, 0, 0.2, 0.4, 1.6, -1.3, 0.0, 0.0 ); |
85
|
4
|
|
|
|
|
10
|
$term->( 7, -5, 0, -0.1, 0.2, 1.0, 0.5, 0.0, 0.0 ); |
86
|
4
|
|
|
|
|
9
|
$term->( 7, -6, 0, 0.2, 0.0, 0.2, -1.0, 0.0, 0.0 ); |
87
|
4
|
|
|
|
|
10
|
$term->( 8, -2, 0, -0.7, -0.2, 0.6, -1.2, -0.4, -0.4 ); |
88
|
4
|
|
|
|
|
10
|
$term->( 8, -3, 0, 0.5, 1.0, -2.0, 1.5, 0.1, 0.2 ); |
89
|
4
|
|
|
|
|
9
|
$term->( 8, -4, 0, 0.4, 1.3, 3.6, -0.9, 0.0, -0.1 ); |
90
|
4
|
|
|
|
|
11
|
$term->( 9, -4, 0, 4.0, -8.7, -19.9, -9.9, 0.2, -0.4 ); |
91
|
4
|
|
|
|
|
9
|
$term->( 9, -4, 1, 0.5, 0.3, 0.8, -1.8, 0.0, 0.0 ); |
92
|
4
|
|
|
|
|
11
|
$term->( 10, -4, 0, 21.3, -16.8, 3.3, 3.3, 0.2, -0.2 ); |
93
|
4
|
|
|
|
|
11
|
$term->( 10, -4, 1, 1.0, 1.7, -0.4, 0.4, 0.0, 0.0 ); |
94
|
4
|
|
|
|
|
13
|
$term->( 11, -4, 0, 1.6, -1.3, 3.0, 3.7, 0.8, -0.2 ); |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
# Perturbations by Uranus |
97
|
4
|
|
|
|
|
10
|
$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
|
|
|
|
|
18
|
$term->( 0, -1, 0, 1.0, 0.7, 0.4, -1.5, 0.1, 0.0 ); |
108
|
4
|
|
|
|
|
12
|
$term->( 0, -2, 0, 0.0, -0.4, -1.1, 0.1, -0.1, -0.1 ); |
109
|
4
|
|
|
|
|
12
|
$term->( 0, -3, 0, -0.9, -1.2, -2.7, 2.1, -0.5, -0.3 ); |
110
|
4
|
|
|
|
|
9
|
$term->( 1, -1, 0, 7.8, -1.5, 2.3, 12.7, 0.0, 0.0 ); |
111
|
4
|
|
|
|
|
11
|
$term->( 1, -2, 0, -1.1, -8.1, 5.2, -0.3, -0.3, -0.3 ); |
112
|
4
|
|
|
|
|
10
|
$term->( 1, -3, 0, -16.4, -21.0, -2.1, 0.0, 0.4, 0.0 ); |
113
|
4
|
|
|
|
|
14
|
$term->( 2, -1, 0, 0.6, -0.1, 0.1, 1.2, 0.1, 0.0 ); |
114
|
4
|
|
|
|
|
11
|
$term->( 2, -2, 0, -4.9, -11.7, 31.5, -13.3, 0.0, -0.2 ); |
115
|
4
|
|
|
|
|
10
|
$term->( 2, -3, 0, 19.1, 10.0, -22.1, 42.1, 0.1, -1.1 ); |
116
|
4
|
|
|
|
|
11
|
$term->( 2, -4, 0, 0.9, -0.1, 0.1, 1.4, 0.0, 0.0 ); |
117
|
4
|
|
|
|
|
10
|
$term->( 3, -2, 0, -0.4, -0.9, 1.7, -0.8, 0.0, -0.3 ); |
118
|
4
|
|
|
|
|
20
|
$term->( 3, -3, 0, 2.3, 0.0, 1.0, 5.7, 0.3, 0.3 ); |
119
|
4
|
|
|
|
|
11
|
$term->( 3, -4, 0, 0.3, -0.7, 2.0, 0.7, 0.0, 0.0 ); |
120
|
4
|
|
|
|
|
14
|
$term->( 3, -5, 0, -0.1, -0.4, 1.1, -0.3, 0.0, 0.0 ); |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
# Perturbations by Neptune |
123
|
4
|
|
|
|
|
10
|
$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
|
|
|
|
|
16
|
$term->( 1, -1, 0, -1.3, -1.2, 2.3, -2.5, 0.0, 0.0 ); |
135
|
4
|
|
|
|
|
11
|
$term->( 1, -2, 0, 1.0, -0.1, 0.1, 1.4, 0.0, 0.0 ); |
136
|
4
|
|
|
|
|
13
|
$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
|
|
|
|
|
12
|
my $phi = ( -2 * $m5 + 5 * $m6 - 3 * $m7 ); |
140
|
4
|
|
|
|
|
8
|
my $c = cos($phi); |
141
|
4
|
|
|
|
|
7
|
my $s = sin($phi); |
142
|
|
|
|
|
|
|
|
143
|
4
|
|
|
|
|
8
|
$dl += -0.8 * $c - 0.1 * $s; |
144
|
4
|
|
|
|
|
10
|
$dr += -0.2 * $c + 1.8 * $s; |
145
|
4
|
|
|
|
|
5
|
$db += +0.3 * $c + 0.5 * $s; |
146
|
|
|
|
|
|
|
|
147
|
4
|
|
|
|
|
9
|
$phi = ( -2 * $m5 + 6 * $m6 - 3 * $m7 ); |
148
|
4
|
|
|
|
|
5
|
$c = cos($phi); |
149
|
4
|
|
|
|
|
6
|
$s = sin($phi); |
150
|
4
|
|
|
|
|
6
|
$dl += ( +2.4 - 0.7 * $t ) * $c + ( 27.8 - 0.4 * $t ) * $s; |
151
|
4
|
|
|
|
|
7
|
$dr += +2.1 * $c - 0.2 * $s; |
152
|
|
|
|
|
|
|
|
153
|
4
|
|
|
|
|
7
|
$phi = ( -2 * $m5 + 7 * $m6 - 3 * $m7 ); |
154
|
4
|
|
|
|
|
5
|
$c = cos($phi); |
155
|
4
|
|
|
|
|
7
|
$s = sin($phi); |
156
|
4
|
|
|
|
|
6
|
$dl += +0.1 * $c + 1.6 * $s; |
157
|
4
|
|
|
|
|
6
|
$dr += -3.6 * $c + 0.3 * $s; |
158
|
4
|
|
|
|
|
6
|
$db += -0.2 * $c + 0.6 * $s; |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
# Ecliptic coordinates ([rad],[AU]) |
161
|
4
|
|
|
|
|
14
|
my $l = |
162
|
|
|
|
|
|
|
pi2 * |
163
|
|
|
|
|
|
|
frac( 0.2561136 + $m6 / pi2 + |
164
|
|
|
|
|
|
|
( ( 5018.6 + $t * 1.9 ) * $t + $dl ) / 1296.0e3 ); |
165
|
4
|
|
|
|
|
8
|
my $r = 9.557584 - 0.000186 * $t + $dr * 1.0e-5; |
166
|
4
|
|
|
|
|
7
|
my $b = ( 175.1 - 10.2 * $t + $db ) / ARCS; |
167
|
|
|
|
|
|
|
|
168
|
4
|
|
|
|
|
27
|
$l, $b, $r; |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
} |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
# Intermediate variables for calculating geocentric positions. |
173
|
|
|
|
|
|
|
sub _lbr_geo { |
174
|
4
|
|
|
4
|
|
18
|
my ( $self, $t ) = @_; |
175
|
|
|
|
|
|
|
|
176
|
4
|
|
|
|
|
11
|
my $m = pi2 * frac( 0.8829867 + 3.3947688 * $t ); |
177
|
4
|
|
|
|
|
7
|
my $cm = cos($m); |
178
|
4
|
|
|
|
|
7
|
my $dl = 5.84 + 0.65 * $cm; |
179
|
4
|
|
|
|
|
5
|
my $dr = 3.09 * sin($m); |
180
|
4
|
|
|
|
|
6
|
my $db = 0.24 * $cm; |
181
|
|
|
|
|
|
|
|
182
|
4
|
|
|
|
|
10
|
$dl, $db, $dr; |
183
|
|
|
|
|
|
|
} |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
1; |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
__END__ |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
=pod |
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
=encoding UTF-8 |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
=head1 NAME |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
Astro::Montenbruck::Ephemeris::Planet::Saturn - Saturn. |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
=head1 SYNOPSIS |
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
use Astro::Montenbruck::Ephemeris::Planet::Saturn; |
200
|
|
|
|
|
|
|
my $planet = Astro::Montenbruck::Ephemeris::Planet::Saturn->new(); |
201
|
|
|
|
|
|
|
my @geo = $planet->position($t); # apparent geocentric ecliptical coordinates |
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
=head1 DESCRIPTION |
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
Child class of L<Astro::Montenbruck::Ephemeris::Planet>, responsible for calculating |
206
|
|
|
|
|
|
|
B<Saturn> position. |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
=head1 METHODS |
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
=head2 Astro::Montenbruck::Ephemeris::Planet::Saturn->new |
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
Constructor. |
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
=head2 $self->heliocentric($t) |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
See description in L<Astro::Montenbruck::Ephemeris::Planet>. |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
=head1 AUTHOR |
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
Sergey Krushinsky, C<< <krushi at cpan.org> >> |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
Copyright (C) 2009-2022 by Sergey Krushinsky |
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
227
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
228
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
=cut |