Astro-Montenbruck
view release on metacpan or search on metacpan
script/planpos.pl view on Meta::CPAN
my ($lat, $lon) = parse_geocoords(@place);
$theme->print_data('Place', format_geo($lat, $lon));
# Local Sidereal Time
my $lst = jd2lst($utc->jd, $lon);
$theme->print_data('Sidereal Time', hms_str($lst));
# Ecliptic obliquity
my $obliq = obliquity($t);
$theme->print_data(
'Ecliptic Obliquity',
dms_or_dec_str(
$obliq,
places => 2,
sign => 1,
decimal => $format eq 'D'
)
);
print "\n";
print_header($coords, $format, $theme);
find_positions(
$t,
\@PLANETS,
sub { print_position(@_, $obliq, $lst, $lat, $format, $coords, $theme) },
with_motion => 1
);
print "\n";
__END__
=pod
=encoding UTF-8
=head1 NAME
planpos - calculate planetary positions for given time and place.
=head1 SYNOPSIS
planpos [options]
=head1 OPTIONS
=over 4
=item B<--help>
Prints a brief help message and exits.
=item B<--man>
Prints the manual page and exits.
=item B<--time>
Date and time, either a I<calendar entry> in format C<YYYY-MM-DD HH:MM Z>, or
C<YYYY-MM-DD HH:MM Z>, or a floating-point I<Julian Day>:
--time="2019-06-08 12:00 +0300"
--time="2019-06-08 09:00 UTC"
--time=2458642.875
Calendar entries should be enclosed in quotation marks. Optional B<"Z"> stands for
time zone, short name or offset from UTC. C<"+00300"> in the example above means
I<"3 hours east of Greenwich">.
=item B<--place>
The observer's location. Contains 2 elements, space separated.
=over
=item *
latitude in C<DD(N|S)MM> format, B<N> for North, B<S> for South.
=item *
longitude in C<DDD(W|E)MM> format, B<W> for West, B<E> for East.
=back
E.g.: C<--place=51N28 0W0> for I<Greenwich, UK> (the default).
B<Decimal numbers> are also supported. In that case
=over
=item *
The latitude always goes first
=item *
Negative numbers represent I<South> latitude and I<East> longitudes.
=back
C<--place=55.75 -37.58> for I<Moscow, Russian Federation>.
C<--place=40.73 73.935> for I<New-York, NY, USA>.
=item B<--coordinates>: type and format of coordinates to display:
=over
=item *
B<1> - Ecliptical, angular units (default)
=item *
B<2> - Ecliptical, zodiac
=item *
( run in 0.357 second using v1.01-cache-2.11-cpan-5b529ec07f3 )