Astro::Coords - Class for handling astronomical coordinates
Output:#!/usr/bin/perl use strict; use warnings; use Time::Piece; use Astro::Coords; print qq/Planet\tRight Ascension\t\tDeclination\n/; for my $name (qw/Jupiter Saturn/) { my $planet = Astro::Coords->new(planet => $name); $planet->datetime(Time::Piece->new); my $ra = $planet->ra(format => q/deg/); my $dec = $planet->dec(format => q/deg/); print qq/$name\t$ra\t$dec\n/ }
Planet Right Ascension Declination Jupiter 300.231916167496 -21.0148733591416 Saturn 301.371438440471 -20.6884105467964One-liner:
perl -MAstro::Coords -MTime::Piece -Mstrict -e 'print qq/Planet\tRight + Ascension\t\tDeclination\n/; for my $name (qw/Jupiter Saturn/) { my +$planet = Astro::Coords->new(planet => $name); $planet->datetime(Time +::Piece->new); my $ra = $planet->ra(format => q/deg/); my $dec = $pla +net->dec(format => q/deg/); print qq/$name\t$ra\t$dec\n/}'
In reply to Re^2: calculating planet conjunction with mojo front end
by Anonymous Monk
in thread calculating planet conjunction with mojo front end
by Aldebaran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |