1. Various detail changes to remove some more warning with -w on
[spider.git] / cmd / show / wwv.pl
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..07a0259a34af5939b10a3d223f1fd763a4e31bba 100644 (file)
@@ -0,0 +1,36 @@
+#
+# print out the wwv stats
+#
+# Copyright (c) 1998 - Dirk Koopman G1TLH
+#
+# $Id$
+#
+my $self = shift;
+
+my $cmdline = shift;
+my @f = split /\s+/, $cmdline;
+my $f;
+my @out;
+my ($from, $to); 
+
+$from = 0;
+while ($f = shift @f) {                 # next field
+       #  print "f: $f list: ", join(',', @list), "\n";
+       if (!$from && !$to) {
+               ($from, $to) = $f =~ /^(\d+)-(\d+)$/o;         # is it a from -> to count?
+               next if $from && $to > $from;
+       }
+       if (!$to) {
+               ($to) = $f =~ /^(\d+)$/o;              # is it a to count?
+               next if $to;
+       }
+}
+
+$to = 10 if !$to;
+
+push @out, "Date        Hour   SFI   A   K Forecast                               Logger";
+my @in = Geomag::search($from, $to, $main::systime);
+for (@in) {
+       push @out, Geomag::print_item($_);
+}
+return (1, @out);