use WCY::r if recent enough and available
[spider.git] / cmd / show / muf.pl
index 0c96764f9a3ec5a52c472ea1c28f94868c5ccf67..31bebfeec62b5c71b3d8765ca5fbaa0f81de0026 100644 (file)
@@ -68,7 +68,12 @@ if ($lp) {
 my ($hr1, $day, $month) = (gmtime($main::systime))[2,3,4];
 $month++;
 my $flux = Geomag::sfi;
-my $ssn = Minimuf::spots($flux);
+my $ssn;
+if ($main::systime - $WCY::date < 86400) {
+       $ssn = $WCY::r
+} else {
+       $ssn = Minimuf::spots($flux);
+}
 
 my $theta;                                             # path angle (rad) 
 $theta=$lon1-$lon2;
@@ -116,7 +121,7 @@ $phiF = atan($ftemp / sqrt(1 - $ftemp * $ftemp));
 $delay = ((2 * $hop * sin($dhop) * ($R + $hF)) / cos($beta1) / $VOFL) * 1e6;
 
 # print summary of data so far
-push @out, sprintf("RxSens: $rsens dBM SFI:%4.0lf   R:%4.0lf   Month: $month   Day: $day", $flux, $ssn);
+push @out, sprintf("RxSens: $rsens dBM SFI:%4.0f   R:%4.0f   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);