5 # 1999/12/9 Steve Franke K9AN
9 my ($self, $satname) = @_;
12 my ($lat, $lon, $alt, $jtime); # lats and longs in radians
13 my ($sec, $min, $hr, $day, $mon, $yr) = (gmtime($main::systime))[0,1,2,3,4,5];
14 #printf("%2.2d %2.2d %2.2d %2.2d %2.2d\n",$min,$hr,$day,$mon,$yr);
18 $lat=$main::mylatitude;
19 $lon=$main::mylongitude;
22 $jtime=Sun::Julian_Day($yr,$mon,$day)+$hr/24+$min/60/24;
23 ($yr,$mon,$day,$hr,$min)=Sun::Calendar_date_and_time_from_JD($jtime);
24 #printf("%2.2d %2.2d %2.2d %2.2d %2.2d\n",$min,$hr,$day,$mon,$yr);
25 push @out,sprintf("Tracking table for $satname");
26 push @out,sprintf("dd/mm UTC Lat Lon Alt(km) Az El Dist(km)");
27 my ($slat,$slon,$salt,$az,$el,$distance)=
28 Sun::get_satellite_pos(
29 $jtime,$lat*$d2r,$lon*$d2r,$alt,$satname);
30 push @out,sprintf( # print the current satellite position
31 "Now %2.2d:%2.2d %6.1f %6.1f %6.1f %6.1f %6.1f %6.1f",
32 $hr,$min,$slat*$r2d,$slon*$r2d,$salt,
33 $az*$r2d,$el*$r2d,$distance);
36 my $step = 2; # tracking table resolution in minutes
37 $jtime=$jtime+$step/24/60;
38 while ( $numsteps < 6*60/$step ) # for now, look 6 hours ahead for tracking table
40 my ($yr,$mon,$day,$hr,$min)=Sun::Calendar_date_and_time_from_JD($jtime);
41 my ($slat,$slon,$salt,$az,$el,$distance)=
42 Sun::get_satellite_pos(
43 $jtime,$lat*$d2r,$lon*$d2r,$alt,$satname);
46 "%2.2d/%2.2d %2.2d:%2.2d %6.1f %6.1f %6.1f %6.1f %6.1f %6.1f",
47 $day,$mon,$hr,$min,$slat*$r2d,$slon*$r2d,$salt,
48 $az*$r2d,$el*$r2d,$distance);
51 $jtime=$jtime+$step/60/24;