line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Astro::Montenbruck::Ephemeris::Planet::Venus; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
436
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
25
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
4
|
use base qw/Astro::Montenbruck::Ephemeris::Planet/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
72
|
|
7
|
1
|
|
|
1
|
|
6
|
use Math::Trig qw/:pi/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
90
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
5
|
use Astro::Montenbruck::Ephemeris::Pert qw /pert/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
10
|
1
|
|
|
1
|
|
6
|
use Astro::Montenbruck::MathUtils qw /frac ARCS/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
41
|
|
11
|
1
|
|
|
1
|
|
6
|
use Astro::Montenbruck::Ephemeris::Planet qw/$VE/; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
919
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $VERSION = 0.01; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub new { |
16
|
2
|
|
|
2
|
1
|
5
|
my $class = shift; |
17
|
2
|
|
|
|
|
11
|
$class->SUPER::new( id => $VE ); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# Venus heliocentric position |
21
|
|
|
|
|
|
|
sub heliocentric { |
22
|
2
|
|
|
2
|
1
|
5
|
my ( $self, $t ) = @_; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# mean anomalies of planets in [rad] |
25
|
2
|
|
|
|
|
7
|
my $m1 = pi2 * frac( 0.4861431 + 415.2018375 * $t ); |
26
|
2
|
|
|
|
|
6
|
my $m2 = pi2 * frac( 0.1400197 + 162.5494552 * $t ); |
27
|
2
|
|
|
|
|
6
|
my $m3 = pi2 * frac( 0.9944153 + 99.9982208 * $t ); |
28
|
2
|
|
|
|
|
5
|
my $m4 = pi2 * frac( 0.0556297 + 53.1674631 * $t ); |
29
|
2
|
|
|
|
|
5
|
my $m5 = pi2 * frac( 0.0567028 + 8.4305083 * $t ); |
30
|
2
|
|
|
|
|
4
|
my $m6 = pi2 * frac( 0.8830539 + 3.3947206 * $t ); |
31
|
|
|
|
|
|
|
|
32
|
2
|
|
|
|
|
4
|
my ( $dl, $dr, $db ) = ( 0, 0, 0 ); # Corrections in longitude ["] |
33
|
2
|
|
|
84
|
|
9
|
my $pert_cb = sub { $dl += $_[0]; $dr += $_[1]; $db += $_[2] }; |
|
84
|
|
|
|
|
96
|
|
|
84
|
|
|
|
|
94
|
|
|
84
|
|
|
|
|
115
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# Perturbations by Mercury |
36
|
2
|
|
|
|
|
7
|
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
|
2
|
|
|
|
|
7
|
$term->( 1, -1, 0, 0.00, 0.00, 0.06, -0.09, 0.01, 0.00 ); |
48
|
2
|
|
|
|
|
6
|
$term->( 2, -1, 0, 0.25, -0.09, -0.09, -0.27, 0.00, 0.00 ); |
49
|
2
|
|
|
|
|
6
|
$term->( 4, -2, 0, -0.07, -0.08, -0.14, 0.14, -0.01, -0.01 ); |
50
|
2
|
|
|
|
|
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
|
2
|
|
|
|
|
4
|
$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
|
2
|
|
|
|
|
7
|
$term->( 1, 0, 0, 2.37, 2793.23, -4899.07, 0.11, 9995.27, 7027.22 ); |
65
|
2
|
|
|
|
|
6
|
$term->( 1, 0, 1, 0.10, -19.65, 34.40, 0.22, 64.95, -86.10 ); |
66
|
2
|
|
|
|
|
6
|
$term->( 1, 0, 2, 0.06, 0.04, -0.07, 0.11, -0.55, -0.07 ); |
67
|
2
|
|
|
|
|
6
|
$term->( 2, 0, 0, -170.42, 73.13, -16.59, 0.00, 67.71, 47.56 ); |
68
|
2
|
|
|
|
|
5
|
$term->( 2, 0, 1, 0.93, 2.91, 0.23, 0.00, -0.03, -0.92 ); |
69
|
2
|
|
|
|
|
5
|
$term->( 3, 0, 0, -2.31, 0.90, -0.08, 0.00, 0.04, 2.09 ); |
70
|
2
|
|
|
|
|
5
|
$term->( 1, -1, 0, -2.38, -4.27, 3.27, -1.82, 0.00, 0.00 ); |
71
|
2
|
|
|
|
|
7
|
$term->( 1, -2, 0, 0.09, 0.00, -0.08, 0.05, -0.02, -0.25 ); |
72
|
2
|
|
|
|
|
6
|
$term->( 2, -2, 0, -9.57, -5.93, 8.57, -13.83, -0.01, -0.01 ); |
73
|
2
|
|
|
|
|
6
|
$term->( 2, -3, 0, -2.47, -2.40, 0.83, -0.95, 0.16, 0.24 ); |
74
|
2
|
|
|
|
|
6
|
$term->( 3, -2, 0, -0.09, -0.05, 0.08, -0.13, -0.28, 0.12 ); |
75
|
2
|
|
|
|
|
6
|
$term->( 3, -3, 0, 7.12, 0.32, -0.62, 13.76, -0.07, 0.01 ); |
76
|
2
|
|
|
|
|
6
|
$term->( 3, -4, 0, -0.65, -0.17, 0.18, -0.73, 0.10, 0.05 ); |
77
|
2
|
|
|
|
|
8
|
$term->( 3, -5, 0, -1.08, -0.95, -0.17, 0.22, -0.03, -0.03 ); |
78
|
2
|
|
|
|
|
13
|
$term->( 4, -3, 0, 0.06, 0.00, -0.01, 0.08, 0.14, -0.18 ); |
79
|
2
|
|
|
|
|
5
|
$term->( 4, -4, 0, 0.93, -0.46, 1.06, 2.13, -0.01, 0.01 ); |
80
|
2
|
|
|
|
|
5
|
$term->( 4, -5, 0, -1.53, 0.38, -0.64, -2.54, 0.27, 0.00 ); |
81
|
2
|
|
|
|
|
6
|
$term->( 4, -6, 0, -0.17, -0.05, 0.03, -0.11, 0.02, 0.00 ); |
82
|
2
|
|
|
|
|
6
|
$term->( 5, -5, 0, 0.18, -0.28, 0.71, 0.47, -0.02, 0.04 ); |
83
|
2
|
|
|
|
|
6
|
$term->( 5, -6, 0, 0.15, -0.14, 0.30, 0.31, -0.04, 0.03 ); |
84
|
2
|
|
|
|
|
6
|
$term->( 5, -7, 0, -0.08, 0.02, -0.03, -0.11, 0.01, 0.00 ); |
85
|
2
|
|
|
|
|
5
|
$term->( 5, -8, 0, -0.23, 0.00, 0.01, -0.04, 0.00, 0.00 ); |
86
|
2
|
|
|
|
|
6
|
$term->( 6, -6, 0, 0.01, -0.14, 0.39, 0.04, 0.00, -0.01 ); |
87
|
2
|
|
|
|
|
7
|
$term->( 6, -7, 0, 0.02, -0.05, 0.12, 0.04, -0.01, 0.01 ); |
88
|
2
|
|
|
|
|
6
|
$term->( 6, -8, 0, 0.10, -0.10, 0.19, 0.19, -0.02, 0.02 ); |
89
|
2
|
|
|
|
|
7
|
$term->( 7, -7, 0, -0.03, -0.06, 0.18, -0.08, 0.00, 0.00 ); |
90
|
2
|
|
|
|
|
6
|
$term->( 8, -8, 0, -0.03, -0.02, 0.06, -0.08, 0.00, 0.00 ); |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
# Perturbations by Mars |
93
|
2
|
|
|
|
|
5
|
$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
|
2
|
|
|
|
|
9
|
$term->( 1, -3, 0, -0.65, 1.02, -0.04, -0.02, -0.02, 0.00 ); |
105
|
2
|
|
|
|
|
7
|
$term->( 2, -2, 0, -0.05, 0.04, -0.09, -0.10, 0.00, 0.00 ); |
106
|
2
|
|
|
|
|
6
|
$term->( 2, -3, 0, -0.50, 0.45, -0.79, -0.89, 0.01, 0.03 ); |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
# Perturbations by Venus |
109
|
2
|
|
|
|
|
5
|
$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
|
2
|
|
|
|
|
9
|
$term->( 0, -1, 0, -0.05, 1.56, 0.16, 0.04, -0.08, -0.04 ); |
121
|
2
|
|
|
|
|
7
|
$term->( 1, -1, 0, -2.62, 1.40, -2.35, -4.40, 0.02, 0.03 ); |
122
|
2
|
|
|
|
|
7
|
$term->( 1, -2, 0, -0.47, -0.08, 0.12, -0.76, 0.04, -0.18 ); |
123
|
2
|
|
|
|
|
7
|
$term->( 2, -2, 0, -0.73, -0.51, 1.27, -1.82, -0.01, 0.01 ); |
124
|
2
|
|
|
|
|
6
|
$term->( 2, -3, 0, -0.14, -0.10, 0.25, -0.34, 0.00, 0.00 ); |
125
|
2
|
|
|
|
|
6
|
$term->( 3, -3, 0, -0.01, 0.04, -0.11, -0.02, 0.00, 0.00 ); |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
# Perturbations by Saturn |
128
|
2
|
|
|
|
|
5
|
$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
|
2
|
|
|
|
|
8
|
$term->( 0, -1, 0, 0.00, 0.21, 0.00, 0.00, 0.00, -0.01 ); |
140
|
2
|
|
|
|
|
7
|
$term->( 1, -1, 0, -0.11, -0.14, 0.24, -0.20, 0.01, 0.00 ); |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
# Ecliptic coordinates ([rad],[AU]) |
143
|
2
|
|
|
|
|
6
|
$dl += |
144
|
|
|
|
|
|
|
+2.74 * sin( pi2 * ( 0.0764 + 0.4174 * $t ) ) + |
145
|
|
|
|
|
|
|
0.27 * sin( pi2 * ( 0.9201 + 0.3307 * $t ) ); |
146
|
2
|
|
|
|
|
4
|
$dl += +1.9 + 1.8 * $t; |
147
|
|
|
|
|
|
|
|
148
|
2
|
|
|
|
|
9
|
my $l = |
149
|
|
|
|
|
|
|
pi2 * |
150
|
|
|
|
|
|
|
frac( 0.3654783 + $m2 / pi2 + |
151
|
|
|
|
|
|
|
( ( 5071.2 + 1.1 * $t ) * $t + $dl ) / 1296.0e3 ); |
152
|
2
|
|
|
|
|
4
|
my $r = 0.7233482 - 0.0000002 * $t + $dr * 1.0e-6; |
153
|
2
|
|
|
|
|
4
|
my $b = ( -67.70 + ( 0.04 + 0.01 * $t ) * $t + $db ) / ARCS; |
154
|
|
|
|
|
|
|
|
155
|
2
|
|
|
|
|
13
|
$l, $b, $r; |
156
|
|
|
|
|
|
|
} |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
# Intermediate variables for calculating geocentric positions. |
159
|
|
|
|
|
|
|
sub _lbr_geo { |
160
|
2
|
|
|
2
|
|
4
|
my ( $self, $t ) = @_; |
161
|
|
|
|
|
|
|
|
162
|
2
|
|
|
|
|
7
|
my $m = pi2 * frac( 0.1400197 + 162.5494552 * $t ); |
163
|
2
|
|
|
|
|
4
|
my $dl = 280.00 + 3.79 * cos($m); |
164
|
2
|
|
|
|
|
4
|
my $dr = 1.37 * sin($m); |
165
|
2
|
|
|
|
|
5
|
my $db = 9.54 * cos($m) - 13.57 * sin($m); |
166
|
|
|
|
|
|
|
|
167
|
2
|
|
|
|
|
4
|
$dl, $db, $dr; |
168
|
|
|
|
|
|
|
} |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
1; |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
__END__ |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
=pod |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=encoding UTF-8 |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
=head1 NAME |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
Astro::Montenbruck::Ephemeris::Planet::Venus - Venus. |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=head1 SYNOPSIS |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
use Astro::Montenbruck::Ephemeris::Planet::Venus; |
185
|
|
|
|
|
|
|
my $planet = Astro::Montenbruck::Ephemeris::Planet::Venus->new(); |
186
|
|
|
|
|
|
|
my @geo = $planet->position($t); # apparent geocentric ecliptical coordinates |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
=head1 DESCRIPTION |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
Child class of L<Astro::Montenbruck::Ephemeris::Planet>, responsible for calculating |
191
|
|
|
|
|
|
|
B<Venus> position. |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
=head1 METHODS |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
=head2 Astro::Montenbruck::Ephemeris::Planet::Venus->new |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
Constructor. |
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
=head2 $self->heliocentric($t) |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
See description in L<Astro::Montenbruck::Ephemeris::Planet>. |
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
=head1 AUTHOR |
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
Sergey Krushinsky, C<< <krushi at cpan.org> >> |
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
Copyright (C) 2009-2019 by Sergey Krushinsky |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
212
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
=cut |