line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Astro::Montenbruck::Ephemeris::Planet::Neptune; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
448
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
4
|
use base qw/Astro::Montenbruck::Ephemeris::Planet/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
59
|
|
7
|
1
|
|
|
1
|
|
6
|
use Math::Trig qw/:pi/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
129
|
|
8
|
1
|
|
|
1
|
|
7
|
use Astro::Montenbruck::Ephemeris::Pert qw/pert/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
9
|
1
|
|
|
1
|
|
5
|
use Astro::Montenbruck::MathUtils qw /frac ARCS/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
10
|
1
|
|
|
1
|
|
6
|
use Astro::Montenbruck::Ephemeris::Planet qw/$NE/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
720
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = 0.01; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
2
|
|
|
2
|
1
|
5
|
my $class = shift; |
16
|
2
|
|
|
|
|
10
|
$class->SUPER::new( id => $NE ); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub heliocentric { |
20
|
2
|
|
|
2
|
1
|
6
|
my ( $self, $t ) = @_; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# Mean anomalies of planets in [rad] |
23
|
2
|
|
|
|
|
6
|
my $m5 = pi2 * frac( 0.0563867 + 8.4298907 * $t ); |
24
|
2
|
|
|
|
|
7
|
my $m6 = pi2 * frac( 0.8825086 + 3.3957748 * $t ); |
25
|
2
|
|
|
|
|
5
|
my $m7 = pi2 * frac( 0.3965358 + 1.1902851 * $t ); |
26
|
2
|
|
|
|
|
7
|
my $m8 = pi2 * frac( 0.7214906 + 0.6068526 * $t ); |
27
|
|
|
|
|
|
|
|
28
|
2
|
|
|
|
|
4
|
my ( $dl, $dr, $db ) = ( 0, 0, 0 ); # Corrections in longitude ["], |
29
|
2
|
|
|
70
|
|
9
|
my $pert_cb = sub { $dl += $_[0]; $dr += $_[1]; $db += $_[2] }; |
|
70
|
|
|
|
|
87
|
|
|
70
|
|
|
|
|
78
|
|
|
70
|
|
|
|
|
94
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# Perturbations by Neptune |
32
|
2
|
|
|
|
|
7
|
my $term = pert( |
33
|
|
|
|
|
|
|
T => $t, |
34
|
|
|
|
|
|
|
M => $m6, |
35
|
|
|
|
|
|
|
m => $m5, |
36
|
|
|
|
|
|
|
I_min => 0, |
37
|
|
|
|
|
|
|
I_max => 2, |
38
|
|
|
|
|
|
|
i_min => -2, |
39
|
|
|
|
|
|
|
i_max => 0, |
40
|
|
|
|
|
|
|
callback => $pert_cb |
41
|
|
|
|
|
|
|
); |
42
|
|
|
|
|
|
|
|
43
|
2
|
|
|
|
|
9
|
$term->( 0, -1, 0, 0.1, 0.1, -3.0, 1.8, -0.3, -0.3 ); |
44
|
2
|
|
|
|
|
8
|
$term->( 1, 0, 0, 0.0, 0.0, -15.9, 9.0, 0.0, 0.0 ); |
45
|
2
|
|
|
|
|
7
|
$term->( 1, -1, 0, -17.6, -29.3, 416.1, -250.0, 0.0, 0.0 ); |
46
|
2
|
|
|
|
|
7
|
$term->( 1, -2, 0, -0.4, -0.7, 10.4, -6.2, 0.0, 0.0 ); |
47
|
2
|
|
|
|
|
6
|
$term->( 2, -1, 0, -0.2, -0.4, 2.4, -1.4, 0.4, -0.3 ); |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
# Perturbations by Saturn |
50
|
2
|
|
|
|
|
7
|
$term = pert( |
51
|
|
|
|
|
|
|
T => $t, |
52
|
|
|
|
|
|
|
M => $m8, |
53
|
|
|
|
|
|
|
m => $m6, |
54
|
|
|
|
|
|
|
I_min => 0, |
55
|
|
|
|
|
|
|
I_max => 2, |
56
|
|
|
|
|
|
|
i_min => -2, |
57
|
|
|
|
|
|
|
i_max => 0, |
58
|
|
|
|
|
|
|
callback => $pert_cb |
59
|
|
|
|
|
|
|
); |
60
|
|
|
|
|
|
|
|
61
|
2
|
|
|
|
|
9
|
$term->( 0, -1, 0, -0.1, 0.0, 0.2, -1.8, -0.1, -0.5 ); |
62
|
2
|
|
|
|
|
6
|
$term->( 1, 0, 0, 0.0, 0.0, -8.3, -10.4, 0.0, 0.0 ); |
63
|
2
|
|
|
|
|
5
|
$term->( 1, -1, 0, 13.6, -12.7, 187.5, 201.1, 0.0, 0.0 ); |
64
|
2
|
|
|
|
|
6
|
$term->( 1, -2, 0, 0.4, -0.4, 4.5, 4.5, 0.0, 0.0 ); |
65
|
2
|
|
|
|
|
7
|
$term->( 2, -1, 0, 0.4, -0.1, 1.7, -3.2, 0.2, 0.2 ); |
66
|
2
|
|
|
|
|
6
|
$term->( 2, -2, 0, -0.1, 0.0, -0.2, 2.7, 0.0, 0.0 ); |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
# Perturbations by Uranus |
69
|
2
|
|
|
|
|
5
|
$term = pert( |
70
|
|
|
|
|
|
|
T => $t, |
71
|
|
|
|
|
|
|
M => $m8, |
72
|
|
|
|
|
|
|
m => $m7, |
73
|
|
|
|
|
|
|
I_min => 1, |
74
|
|
|
|
|
|
|
I_max => 6, |
75
|
|
|
|
|
|
|
i_min => -6, |
76
|
|
|
|
|
|
|
i_max => 0, |
77
|
|
|
|
|
|
|
callback => $pert_cb |
78
|
|
|
|
|
|
|
); |
79
|
2
|
|
|
|
|
7
|
$term->( 1, 0, 0, 32.3, 3549.5, -25880.2, 235.8, -6360.5, 374.0 ); |
80
|
2
|
|
|
|
|
7
|
$term->( 1, 0, 1, 31.2, 34.4, -251.4, 227.4, 34.9, 29.3 ); |
81
|
2
|
|
|
|
|
5
|
$term->( 1, 0, 2, -1.4, 3.9, -28.6, -10.1, 0.0, -0.9 ); |
82
|
2
|
|
|
|
|
6
|
$term->( 2, 0, 0, 6.1, 68.0, -111.4, 2.0, -54.7, 3.7 ); |
83
|
2
|
|
|
|
|
6
|
$term->( 2, 0, 1, 0.8, -0.2, -2.1, 2.0, -0.2, 0.8 ); |
84
|
2
|
|
|
|
|
6
|
$term->( 3, 0, 0, 0.1, 1.0, -0.7, 0.0, -0.8, 0.1 ); |
85
|
2
|
|
|
|
|
4
|
$term->( 0, -1, 0, -0.1, -0.3, -3.6, 0.0, 0.0, 0.0 ); |
86
|
2
|
|
|
|
|
5
|
$term->( 1, 0, 0, 0.0, 0.0, 5.5, -6.9, 0.1, 0.0 ); |
87
|
2
|
|
|
|
|
6
|
$term->( 1, -1, 0, -2.2, -1.6, -116.3, 163.6, 0.0, -0.1 ); |
88
|
2
|
|
|
|
|
7
|
$term->( 1, -2, 0, 0.2, 0.1, -1.2, 0.4, 0.0, -0.1 ); |
89
|
2
|
|
|
|
|
7
|
$term->( 2, -1, 0, 4.2, -1.1, -4.4, -34.6, -0.2, 0.1 ); |
90
|
2
|
|
|
|
|
7
|
$term->( 2, -2, 0, 8.6, -2.9, -33.4, -97.0, 0.2, 0.1 ); |
91
|
2
|
|
|
|
|
6
|
$term->( 3, -1, 0, 0.1, -0.2, 2.1, -1.2, 0.0, 0.1 ); |
92
|
2
|
|
|
|
|
6
|
$term->( 3, -2, 0, -4.6, 9.3, 38.2, 19.8, 0.1, 0.1 ); |
93
|
2
|
|
|
|
|
5
|
$term->( 3, -3, 0, -0.5, 1.7, 23.5, 7.0, 0.0, 0.0 ); |
94
|
2
|
|
|
|
|
4
|
$term->( 4, -2, 0, 0.2, 0.8, 3.3, -1.5, -0.2, -0.1 ); |
95
|
2
|
|
|
|
|
4
|
$term->( 4, -3, 0, 0.9, 1.7, 17.9, -9.1, -0.1, 0.0 ); |
96
|
2
|
|
|
|
|
14
|
$term->( 4, -4, 0, -0.4, -0.4, -6.2, 4.8, 0.0, 0.0 ); |
97
|
2
|
|
|
|
|
6
|
$term->( 5, -3, 0, -1.6, -0.5, -2.2, 7.0, 0.0, 0.0 ); |
98
|
2
|
|
|
|
|
7
|
$term->( 5, -4, 0, -0.4, -0.1, -0.7, 5.5, 0.0, 0.0 ); |
99
|
2
|
|
|
|
|
6
|
$term->( 5, -5, 0, 0.2, 0.0, 0.0, -3.5, 0.0, 0.0 ); |
100
|
2
|
|
|
|
|
6
|
$term->( 6, -4, 0, -0.3, 0.2, 2.1, 2.7, 0.0, 0.0 ); |
101
|
2
|
|
|
|
|
6
|
$term->( 6, -5, 0, 0.1, -0.1, -1.4, -1.4, 0.0, 0.0 ); |
102
|
2
|
|
|
|
|
6
|
$term->( 6, -6, 0, -0.1, 0.1, 1.4, 0.7, 0.0, 0.0 ); |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
# Ecliptic coordinates ([rad],[AU]) |
105
|
2
|
|
|
|
|
8
|
my $l = |
106
|
|
|
|
|
|
|
pi2 * |
107
|
|
|
|
|
|
|
frac( 0.1254046 + $m8 / pi2 + |
108
|
|
|
|
|
|
|
( ( 4982.8 - 21.3 * $t ) * $t + $dl ) / 1296.0e3 ); |
109
|
2
|
|
|
|
|
6
|
my $r = 30.072984 + ( 0.001234 + 0.000003 * $t ) * $t + $dr * 1.0e-5; |
110
|
2
|
|
|
|
|
6
|
my $b = ( 54.77 + ( 0.26 + 0.06 * $t ) * $t + $db ) / ARCS; |
111
|
|
|
|
|
|
|
|
112
|
2
|
|
|
|
|
15
|
$l, $b, $r; |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
# Intermediate variables for calculating geocentric positions. |
117
|
|
|
|
|
|
|
sub _lbr_geo { |
118
|
2
|
|
|
2
|
|
4
|
my ( $self, $t ) = @_; |
119
|
|
|
|
|
|
|
|
120
|
2
|
|
|
|
|
5
|
my $m = pi2 * frac( 0.7214906 + 0.6068526 * $t ); |
121
|
2
|
|
|
|
|
4
|
my $dl = 1.04 + 0.02 * cos($m); |
122
|
2
|
|
|
|
|
4
|
my $dr = 0.27 * sin($m); |
123
|
2
|
|
|
|
|
3
|
my $db = 0.03 * sin($m); |
124
|
|
|
|
|
|
|
|
125
|
2
|
|
|
|
|
6
|
$dl, $db, $dr; |
126
|
|
|
|
|
|
|
} |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
1; |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
__END__ |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=pod |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=encoding UTF-8 |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=head1 NAME |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
Astro::Montenbruck::Ephemeris::Planet::Neptune - Neptune. |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=head1 SYNOPSIS |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
use Astro::Montenbruck::Ephemeris::Planet::Neptune; |
143
|
|
|
|
|
|
|
my $planet = Astro::Montenbruck::Ephemeris::Planet::Neptune->new(); |
144
|
|
|
|
|
|
|
my @geo = $planet->position($t); # apparent geocentric ecliptical coordinates |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=head1 DESCRIPTION |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
Child class of L<Astro::Montenbruck::Ephemeris::Planet>, responsible for calculating |
149
|
|
|
|
|
|
|
B<Neptune> position. |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=head1 METHODS |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=head2 Astro::Montenbruck::Ephemeris::Planet::Neptune->new |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
Constructor. |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=head2 $self->heliocentric($t) |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
See description in L<Astro::Montenbruck::Ephemeris::Planet>. |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=head1 AUTHOR |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
Sergey Krushinsky, C<< <krushi at cpan.org> >> |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
Copyright (C) 2009-2019 by Sergey Krushinsky |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
170
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
=cut |