line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Astro::Montenbruck::Ephemeris::Planet::Uranus; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
468
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
25
|
|
5
|
1
|
|
|
1
|
|
4
|
use base qw/Astro::Montenbruck::Ephemeris::Planet/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
60
|
|
6
|
1
|
|
|
1
|
|
5
|
use Math::Trig qw/:pi/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
104
|
|
7
|
1
|
|
|
1
|
|
6
|
use Astro::Montenbruck::Ephemeris::Pert qw /pert/; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
40
|
|
8
|
1
|
|
|
1
|
|
5
|
use Astro::Montenbruck::MathUtils qw /frac ARCS/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
9
|
1
|
|
|
1
|
|
6
|
use Astro::Montenbruck::Ephemeris::Planet qw/$UR/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1029
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = 0.01; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new { |
14
|
2
|
|
|
2
|
1
|
5
|
my $class = shift; |
15
|
2
|
|
|
|
|
8
|
$class->SUPER::new( id => $UR ); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub heliocentric { |
19
|
2
|
|
|
2
|
1
|
5
|
my ( $self, $t ) = @_; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# Mean anomalies of planets in [rad] |
22
|
2
|
|
|
|
|
6
|
my $m5 = pi2 * frac( 0.0564472 + 8.4302889 * $t ); |
23
|
2
|
|
|
|
|
6
|
my $m6 = pi2 * frac( 0.8829611 + 3.3947583 * $t ); |
24
|
2
|
|
|
|
|
6
|
my $m7 = pi2 * frac( 0.3967117 + 1.1902849 * $t ); |
25
|
2
|
|
|
|
|
6
|
my $m8 = pi2 * frac( 0.7216833 + 0.6068528 * $t ); |
26
|
|
|
|
|
|
|
|
27
|
2
|
|
|
|
|
5
|
my ( $dl, $dr, $db ) = ( 0, 0, 0 ); # Corrections in longitude ["], |
28
|
|
|
|
|
|
|
my $pert_cb = sub { |
29
|
140
|
|
|
140
|
|
166
|
$dl += $_[0]; |
30
|
140
|
|
|
|
|
157
|
$dr += $_[1]; |
31
|
140
|
|
|
|
|
195
|
$db += $_[2]; |
32
|
2
|
|
|
|
|
9
|
}; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
# Perturbations by Uranus |
35
|
2
|
|
|
|
|
8
|
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
|
2
|
|
|
|
|
8
|
$term->( -1, -1, 0, 0.0, 0.0, -0.1, 1.7, -0.1, 0.0 ); |
47
|
2
|
|
|
|
|
8
|
$term->( 0, -1, 0, 0.5, -1.2, 18.9, 9.1, -0.9, 0.1 ); |
48
|
2
|
|
|
|
|
6
|
$term->( 1, -1, 0, -21.2, 48.7, -455.5, -198.8, 0.0, 0.0 ); |
49
|
2
|
|
|
|
|
6
|
$term->( 1, -2, 0, -0.5, 1.2, -10.9, -4.8, 0.0, 0.0 ); |
50
|
2
|
|
|
|
|
6
|
$term->( 2, -1, 0, -1.3, 3.2, -23.2, -11.1, 0.3, 0.1 ); |
51
|
2
|
|
|
|
|
6
|
$term->( 2, -2, 0, -0.2, 0.2, 1.1, 1.5, 0.0, 0.0 ); |
52
|
2
|
|
|
|
|
7
|
$term->( 3, -1, 0, 0.0, 0.2, -1.8, 0.4, 0.0, 0.0 ); |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
# Perturbations by Saturn |
55
|
2
|
|
|
|
|
6
|
$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
|
2
|
|
|
|
|
10
|
$term->( 0, -1, 0, 1.4, -0.5, -6.4, 9.0, -0.4, -0.8 ); |
66
|
2
|
|
|
|
|
6
|
$term->( 1, -1, 0, -18.6, -12.6, 36.7, -336.8, 1.0, 0.3 ); |
67
|
2
|
|
|
|
|
6
|
$term->( 1, -2, 0, -0.7, -0.3, 0.5, -7.5, 0.1, 0.0 ); |
68
|
2
|
|
|
|
|
6
|
$term->( 2, -1, 0, 20.0, -141.6, -587.1, -107.0, 3.1, -0.8 ); |
69
|
2
|
|
|
|
|
6
|
$term->( 2, -1, 1, 1.0, 1.4, 5.8, -4.0, 0.0, 0.0 ); |
70
|
2
|
|
|
|
|
6
|
$term->( 2, -2, 0, 1.6, -3.8, -35.6, -16.0, 0.0, 0.0 ); |
71
|
2
|
|
|
|
|
6
|
$term->( 3, -1, 0, 75.3, -100.9, 128.9, 77.5, -0.8, 0.1 ); |
72
|
2
|
|
|
|
|
6
|
$term->( 3, -1, 1, 0.2, 1.8, -1.9, 0.3, 0.0, 0.0 ); |
73
|
2
|
|
|
|
|
6
|
$term->( 3, -2, 0, 2.3, -1.3, -9.5, -17.9, 0.0, 0.1 ); |
74
|
2
|
|
|
|
|
6
|
$term->( 3, -3, 0, -0.7, -0.5, -4.9, 6.8, 0.0, 0.0 ); |
75
|
2
|
|
|
|
|
6
|
$term->( 4, -1, 0, 3.4, -5.0, 21.6, 14.3, -0.8, -0.5 ); |
76
|
2
|
|
|
|
|
6
|
$term->( 4, -2, 0, 1.9, 0.1, 1.2, -12.1, 0.0, 0.0 ); |
77
|
2
|
|
|
|
|
6
|
$term->( 4, -3, 0, -0.1, -0.4, -3.9, 1.2, 0.0, 0.0 ); |
78
|
2
|
|
|
|
|
5
|
$term->( 4, -4, 0, -0.2, 0.1, 1.6, 1.8, 0.0, 0.0 ); |
79
|
2
|
|
|
|
|
4
|
$term->( 5, -1, 0, 0.2, -0.3, 1.0, 0.6, -0.1, 0.0 ); |
80
|
2
|
|
|
|
|
6
|
$term->( 5, -2, 0, -2.2, -2.2, -7.7, 8.5, 0.0, 0.0 ); |
81
|
2
|
|
|
|
|
6
|
$term->( 5, -3, 0, 0.1, -0.2, -1.4, -0.4, 0.0, 0.0 ); |
82
|
2
|
|
|
|
|
5
|
$term->( 5, -4, 0, -0.1, 0.0, 0.1, 1.2, 0.0, 0.0 ); |
83
|
2
|
|
|
|
|
5
|
$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
|
2
|
|
|
|
|
6
|
$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
|
2
|
|
|
|
|
9
|
$term->( 1, 0, 0, -78.1, 19518.1, -90718.2, -334.7, 2759.5, -311.9 ); |
98
|
2
|
|
|
|
|
7
|
$term->( 1, 0, 1, -81.6, 107.7, -497.4, -379.5, -2.8, -43.7 ); |
99
|
2
|
|
|
|
|
8
|
$term->( 1, 0, 2, -6.6, -3.1, 14.4, -30.6, -0.4, -0.5 ); |
100
|
2
|
|
|
|
|
6
|
$term->( 1, 0, 3, 0.0, -0.5, 2.4, 0.0, 0.0, 0.0 ); |
101
|
2
|
|
|
|
|
5
|
$term->( 2, 0, 0, -2.4, 586.1, -2145.2, -15.3, 130.6, -14.3 ); |
102
|
2
|
|
|
|
|
7
|
$term->( 2, 0, 1, -4.5, 6.6, -24.2, -17.8, 0.7, -1.6 ); |
103
|
2
|
|
|
|
|
6
|
$term->( 2, 0, 2, -0.4, 0.0, 0.1, -1.4, 0.0, 0.0 ); |
104
|
2
|
|
|
|
|
5
|
$term->( 3, 0, 0, 0.0, 24.5, -76.2, -0.6, 7.0, -0.7 ); |
105
|
2
|
|
|
|
|
4
|
$term->( 3, 0, 1, -0.2, 0.4, -1.4, -0.8, 0.1, -0.1 ); |
106
|
2
|
|
|
|
|
4
|
$term->( 4, 0, 0, 0.0, 1.1, -3.0, 0.1, 0.4, 0.0 ); |
107
|
2
|
|
|
|
|
6
|
$term->( -1, -1, 0, -0.2, 0.2, 0.7, 0.7, -0.1, 0.0 ); |
108
|
2
|
|
|
|
|
6
|
$term->( 0, -1, 0, -2.8, 2.5, 8.7, 10.5, -0.4, -0.1 ); |
109
|
2
|
|
|
|
|
7
|
$term->( 1, -1, 0, -28.4, 20.3, -51.4, -72.0, 0.0, 0.0 ); |
110
|
2
|
|
|
|
|
7
|
$term->( 1, -2, 0, -0.6, -0.1, 4.2, -14.6, 0.2, 0.4 ); |
111
|
2
|
|
|
|
|
5
|
$term->( 1, -3, 0, 0.2, 0.5, 3.4, -1.6, -0.1, 0.1 ); |
112
|
2
|
|
|
|
|
5
|
$term->( 2, -1, 0, -1.8, 1.3, -5.5, -7.7, 0.0, 0.3 ); |
113
|
2
|
|
|
|
|
5
|
$term->( 2, -2, 0, 29.4, 10.2, -29.0, 83.2, 0.0, 0.0 ); |
114
|
2
|
|
|
|
|
4
|
$term->( 2, -3, 0, 8.8, 17.8, -41.9, 21.5, -0.1, -0.3 ); |
115
|
2
|
|
|
|
|
4
|
$term->( 2, -4, 0, 0.0, 0.1, -2.1, -0.9, 0.1, 0.0 ); |
116
|
2
|
|
|
|
|
5
|
$term->( 3, -2, 0, 1.5, 0.5, -1.7, 5.1, 0.1, -0.2 ); |
117
|
2
|
|
|
|
|
6
|
$term->( 3, -3, 0, 4.4, 14.6, -84.3, 25.2, 0.1, -0.1 ); |
118
|
2
|
|
|
|
|
6
|
$term->( 3, -4, 0, 2.4, -4.5, 12.0, 6.2, 0.0, 0.0 ); |
119
|
2
|
|
|
|
|
6
|
$term->( 3, -5, 0, 2.9, -0.9, 2.1, 6.2, 0.0, 0.0 ); |
120
|
2
|
|
|
|
|
6
|
$term->( 4, -3, 0, 0.3, 1.0, -4.0, 1.1, 0.1, -0.1 ); |
121
|
2
|
|
|
|
|
5
|
$term->( 4, -4, 0, 2.1, -2.7, 17.9, 14.0, 0.0, 0.0 ); |
122
|
2
|
|
|
|
|
6
|
$term->( 4, -5, 0, 3.0, -0.4, 2.3, 17.6, -0.1, -0.1 ); |
123
|
2
|
|
|
|
|
6
|
$term->( 4, -6, 0, -0.6, -0.5, 1.1, -1.6, 0.0, 0.0 ); |
124
|
2
|
|
|
|
|
6
|
$term->( 5, -4, 0, 0.2, -0.2, 1.0, 0.8, 0.0, 0.0 ); |
125
|
2
|
|
|
|
|
5
|
$term->( 5, -5, 0, -0.9, -0.1, 0.6, -7.1, 0.0, 0.0 ); |
126
|
2
|
|
|
|
|
4
|
$term->( 5, -6, 0, -0.5, -0.6, 3.8, -3.6, 0.0, 0.0 ); |
127
|
2
|
|
|
|
|
6
|
$term->( 5, -7, 0, 0.0, -0.5, 3.0, 0.1, 0.0, 0.0 ); |
128
|
2
|
|
|
|
|
5
|
$term->( 6, -6, 0, 0.2, 0.3, -2.7, 1.6, 0.0, 0.0 ); |
129
|
2
|
|
|
|
|
5
|
$term->( 6, -7, 0, -0.1, 0.2, -2.0, -0.4, 0.0, 0.0 ); |
130
|
2
|
|
|
|
|
5
|
$term->( 7, -7, 0, 0.1, -0.2, 1.3, 0.5, 0.0, 0.0 ); |
131
|
2
|
|
|
|
|
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
|
2
|
|
|
|
|
6
|
$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
|
2
|
|
|
|
|
8
|
$term->( -2, -4, 0, -0.7, 0.4, -1.5, -2.5, 0.0, 0.0 ); |
147
|
2
|
|
|
|
|
6
|
$term->( -1, -4, 0, -0.1, -0.1, -2.2, 1.0, 0.0, 0.0 ); |
148
|
2
|
|
|
|
|
4
|
$term->( 1, -5, 0, 0.1, -0.4, 1.4, 0.2, 0.0, 0.0 ); |
149
|
2
|
|
|
|
|
5
|
$term->( 1, -6, 0, 0.4, 0.5, -0.8, -0.8, 0.0, 0.0 ); |
150
|
2
|
|
|
|
|
5
|
$term->( 2, -6, 0, 5.7, 6.3, 28.5, -25.5, 0.0, 0.0 ); |
151
|
2
|
|
|
|
|
6
|
$term->( 2, -6, 1, 0.1, -0.2, -1.1, -0.6, 0.0, 0.0 ); |
152
|
2
|
|
|
|
|
7
|
$term->( 3, -6, 0, -1.4, 29.2, -11.4, 1.1, 0.0, 0.0 ); |
153
|
2
|
|
|
|
|
6
|
$term->( 3, -6, 1, 0.8, -0.4, 0.2, 0.3, 0.0, 0.0 ); |
154
|
2
|
|
|
|
|
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
|
2
|
|
|
|
|
9
|
my $l = |
159
|
|
|
|
|
|
|
pi2 * |
160
|
|
|
|
|
|
|
frac( 0.4734843 + $m7 / pi2 + |
161
|
|
|
|
|
|
|
( ( 5082.3 + 34.2 * $t ) * $t + $dl ) / 1296.0e3 ); |
162
|
2
|
|
|
|
|
5
|
my $r = 19.211991 + ( -0.000333 - 0.000005 * $t ) * $t + $dr * 1.0e-5; |
163
|
2
|
|
|
|
|
4
|
my $b = ( -130.61 + ( -0.54 + 0.04 * $t ) * $t + $db ) / ARCS; |
164
|
|
|
|
|
|
|
|
165
|
2
|
|
|
|
|
14
|
$l, $b, $r; |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
} |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
# Intermediate variables for calculating geocentric positions. |
170
|
|
|
|
|
|
|
sub _lbr_geo { |
171
|
2
|
|
|
2
|
|
5
|
my ( $self, $t ) = @_; |
172
|
|
|
|
|
|
|
|
173
|
2
|
|
|
|
|
6
|
my $m = pi2 * frac( 0.3967117 + 1.1902849 * $t ); |
174
|
2
|
|
|
|
|
4
|
my $sm = sin($m); |
175
|
2
|
|
|
|
|
3
|
my $dl = 2.05 + 0.19 * cos($m); |
176
|
2
|
|
|
|
|
4
|
my $dr = 1.86 * $sm; |
177
|
2
|
|
|
|
|
4
|
my $db = -0.03 * $sm; |
178
|
|
|
|
|
|
|
|
179
|
2
|
|
|
|
|
4
|
$dl, $db, $dr; |
180
|
|
|
|
|
|
|
} |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
1; |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
__END__ |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
=pod |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
=encoding UTF-8 |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
=head1 NAME |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
Astro::Montenbruck::Ephemeris::Planet::Uranus - Uranus. |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
=head1 SYNOPSIS |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
use Astro::Montenbruck::Ephemeris::Planet::Uranus; |
197
|
|
|
|
|
|
|
my $planet = Astro::Montenbruck::Ephemeris::Planet::Uranus->new(); |
198
|
|
|
|
|
|
|
my @geo = $planet->position($t); # apparent geocentric ecliptical coordinates |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
=head1 DESCRIPTION |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
Child class of L<Astro::Montenbruck::Ephemeris::Planet>, responsible for calculating |
203
|
|
|
|
|
|
|
B<Uranus> position. |
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
=head1 METHODS |
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
=head2 Astro::Montenbruck::Ephemeris::Planet::Uranus->new |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
Constructor. |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
=head2 $self->heliocentric($t) |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
See description in L<Astro::Montenbruck::Ephemeris::Planet>. |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
=head1 AUTHOR |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
Sergey Krushinsky, C<< <krushi at cpan.org> >> |
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
Copyright (C) 2009-2019 by Sergey Krushinsky |
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
225
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
=cut |