#!/usr/local/bin/perl
my
$station
= Astro::Coord::ECI->new(
name
=>
'Parliament House, Canberra ACT, Australia'
,
)->geodetic(
deg2rad(-35.308232),
deg2rad(149.124495),
0.603,
);
my
@time
=
gmtime
(
time
());
splice
@time
, 0, 3, 0, 0, 0;
$time
[5] += 1900;
my
$start
= greg_time_gm(
@time
);
my
$end
=
$start
+ 86400;
my
$delta
= 60;
my
$timfmt
=
'%d-%b-%Y %H:%M:%S'
;
my
$dtafmt
=
"%s %6.2f %6.2f %5.0f\n"
;
local
$/ =
undef
;
my
@tle
= Astro::Coord::ECI::TLE::Set->aggregate(
Astro::Coord::ECI::TLE->parse( {
station
=>
$station
}, <>));
print
"date/time azimuth elevation range\n"
;
foreach
my
$body
(
@tle
) {
print
"\nOID "
,
$body
->get(
'id'
),
' '
,
$body
->get(
'name'
),
"\n"
;
for
(
my
$time
=
$start
;
$time
<
$end
;
$time
+=
$delta
) {
eval
{
$body
->universal(
$time
); 1;} or
do
{
warn
$@;
last
;
};
my
(
$azim
,
$elev
,
$range
) =
$body
->azel();
$elev
>= 0 or
next
;
printf
$dtafmt
, gm_strftime(
$timfmt
,
$time
), rad2deg(
$azim
),
rad2deg(
$elev
),
$range
;
}
}