added Steve Franke's versions of the muf stuff
authordjk <djk>
Sun, 31 Oct 1999 17:35:47 +0000 (17:35 +0000)
committerdjk <djk>
Sun, 31 Oct 1999 17:35:47 +0000 (17:35 +0000)
Changes
cmd/show/muf.pl
perl/Minimuf.pm

diff --git a/Changes b/Changes
index 1138ef06749d1bd491a9a398516d50d1e4a7fd2e..6b84bee72c0b4bb6dcaa3aa68398fcd337ac9c58 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,8 @@
+31Oct99=======================================================================
+1. updated Minimuf.pm and show/muf.pl to the fixed versions sent to me by
+Steve Franke K9AN. 
+2. Made set/badnodes work, added show/badnodes. This is an interim fix until
+input spot filtering works.
 24Oct99=======================================================================
 1. fixed announces so that nodes only get one of them (not two).
 2. Altered the select timeouts to prevent apparent excessive CPU usage on
index c216b6ddf0888b016ca64f60f9b37b2e919ecb25..65cc21b5883a9f58e70ca7338699384046773795 100644 (file)
@@ -4,6 +4,8 @@
 #
 # Copyright (c) 1999 Dirk Koopman G1TLH
 #
+# as fixed by Steve Franke K9AN
+#
 # $Id$
 #
 
@@ -37,8 +39,8 @@ $lon2 = $a->{long};
 # convert stuff into radians
 $lat1 *= $d2r;
 $lat2 *= $d2r;
-$lon1 *= $d2r;
-$lon2 *= $d2r;
+$lon1 *= -$d2r;
+$lon2 *= -$d2r;
 $b1 *= $d2r;
 $b2 *= $d2r;
 $d = ($d / $R);
@@ -49,6 +51,10 @@ my $flux = Geomag::sfi;
 my $ssn = Minimuf::spots($flux);
 
 my $theta;                                             # path angle (rad) 
+$theta=$lon1-$lon2;
+$theta=$theta+2.*$pi if( $theta <= -$pi);
+$theta=$theta-2.*$pi if( $theta >= $pi);
+
 my ($lats, $lons);                             # subsolar coordinates (rad) 
 my $dB1 = 20;                                  # transmitter output power (dBW) 
 
@@ -93,8 +99,8 @@ $delay = ((2 * $hop * sin($dhop) * ($R + $hF)) / cos($beta1) / $VOFL) * 1e6;
 push @out, sprintf("RxSens: $rsens dBM SFI:%4.0lf   R:%4.0lf   Month: $month   Day: $day", $flux, $ssn);
 push @out, sprintf("Power :  %3.0f dBW    Distance:%6.0f km    Delay:%5.1f ms", $dB1, $d * $R, $delay);
 push @out, sprintf("Location                       Lat / Long           Azim");
-push @out, sprintf("%-30.30s %-18s    %3.0f", $main::myqth, DXBearing::lltos($lat1*$r2d, $lon1*$r2d), $b1 * $r2d);
-push @out, sprintf("%-30.30s %-18s    %3.0f", $a->name, DXBearing::lltos($lat2*$r2d, $lon2*$r2d), $b2 * $r2d);
+push @out, sprintf("%-30.30s %-18s    %3.0f", $main::myqth, DXBearing::lltos($lat1*$r2d, -$lon1*$r2d), $b1 * $r2d);
+push @out, sprintf("%-30.30s %-18s    %3.0f", $a->name, DXBearing::lltos($lat2*$r2d, -$lon2*$r2d), $b2 * $r2d);
 my $head = "UT LT  MUF Zen";
 for ($i = 0; $i < $nfreq; $i++) {
        $head .= sprintf "%5.1f", $freq[$i];
@@ -138,7 +144,7 @@ for ($hour = $hr1; $hour < $hr2+$hr1; $hour++) {
                # the day and decreases at night, as determined
                # at the midpoint of the path.
                $height = $hF;
-               $psi = Minimuf::zenith($d / 2, $lat1, $lon1, $b2, $b1, $lats, $lons);
+               $psi = Minimuf::zenith($d / 2, $lat1, $lon1, $b1, $theta, $lats, $lons);
                if ($psi < 0) {
                        $height -= 70.;
                } else {
@@ -147,7 +153,7 @@ for ($hour = $hr1; $hour < $hr2+$hr1; $hour++) {
                $dhop = $d / ($h * 2.);
                $beta[$h] = atan((cos($dhop) - $R / ($R + $height)) / sin($dhop));
                $path[$h] = 2 * $h * sin($dhop) * ($R + $height) / cos($beta[$h]);
-               Minimuf::ion($h, $d, $fcF, $ssn, $lat1, $lon1, $b2, $b1, $lats, $lons, \@daynight, \@mufE, \@mufF, \@absorp);
+               Minimuf::ion($h, $d, $fcF, $ssn, $lat1, $lon1, $b1, $theta, $lats, $lons, \@daynight, \@mufE, \@mufF, \@absorp);
        }
        
        # Display one line for this hour.
index e911663c5ca3daa86917d7767ad64bc630d24601..d9b9e06fefa252ba5cf46c7971f9cf565ff65bd1 100644 (file)
@@ -4,6 +4,8 @@
 #
 # Translated and modified for my own purposes by Dirk Koopman G1TLH
 #
+# as fixed by Steve Franke K9AN
+#
 # Copyright (c) 1999 Dirk Koopman G1TLH
 #
 # The original copyright:-
@@ -253,7 +255,7 @@ sub ion
                # Calculate the E-layer critical frequency and MUF.
                 
                $fcE = 0;
-               $psi = zenith($dist, $lat1, $lon1, $b2, $b1, $lats, $lons);
+               $psi = zenith($dist, $lat1, $lon1, $b1, $b2, $lats, $lons);
                $ftemp = cos($psi);
                $fcE = .9 * pow((180. + 1.44 * $ssn) * $ftemp, .25) if ($ftemp > 0);
                $fcE = .005 * $ssn if ($fcE < .005 * $ssn);