1. Add show/dxstats command
authorminima <minima>
Sun, 9 Sep 2001 15:48:33 +0000 (15:48 +0000)
committerminima <minima>
Sun, 9 Sep 2001 15:48:33 +0000 (15:48 +0000)
2. Add show/hfstats command
3. Add show/vhfstats command
4. Add show/hftable command
5. Add show/vhftable command

Changes
cmd/Commands_en.hlp
perl/Julian.pm
perl/Messages
perl/Spot.pm

diff --git a/Changes b/Changes
index 13ef5838ed96ad88790aac928f2b433b4bf8f2af..79858fa31471e41ad89e17a29c779c258669205b 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,11 @@
+09Sep01=======================================================================
+1. Add show/dxstats command
+2. Add show/hfstats command
+3. Add show/vhfstats command
+4. Add show/hftable command
+5. Add show/vhftable command (BE WARNED, the first time you run one of these
+commands it will take some considerable time to complete, thereafter it will
+be a lot faster).
 08Sep01=======================================================================
 1. Update the sgml docs on filtering a bit.
 06Sep01=======================================================================
index 554c85c3d75811477f75c2448cec2d029c3a7cfc..6f04e71d321a3e8578f894ccb5cc5c6f50cb0c15 100644 (file)
@@ -1362,6 +1362,9 @@ See also TYPE - to see the contents of a file.
 Show the contents of all the filters that are set. This command displays
 all the filters set - for all the various categories.
 
+=== 0^SHOW/HFSTATS^Show the HF DX Spot statistics
+Show the HF DX Spot statistics for your country for the last 31 days
+
 === 8^SHOW/HOPS <call> [ann|spots|wcy|wwv]^Show the hop counts for a node
 This command shows the hop counts set up for a node. You can specify
 which category you want to see. If you leave the category out then 
@@ -1563,6 +1566,9 @@ time and UTC as the computer has it right now. If you give some prefixes
 then it will show UTC and UTC + the local offset (not including DST) at
 the prefixes or callsigns that you specify.
 
+=== 0^SHOW/VHFSTATS^Show the VHF DX Spot statistics
+Show the VHF/UHF DX Spot statistics for your country for the last 31 days
+
 === 0^SHOW/WCY^Show last 10 WCY broadcasts
 === 0^SHOW/WCY <n>^Show last <n> WCY broadcasts
 Display the most recent WCY information that has been received by the system
index a86c11e2dc8e128510f0b50fda7698516b17bb01..0bd1f168f0c84c150357e3f15f1f5f6595b961d2 100644 (file)
@@ -11,12 +11,15 @@ use strict;
 package Julian;
 
 
-use vars qw($VERSION $BRANCH);
+use vars qw($VERSION $BRANCH @days @ldays @month);
 $VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
 $BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ ) || 0;
 $main::build += $VERSION;
 $main::branch += $BRANCH;
 
+@days = (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
+@ldays = (31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
+@month = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
 
 sub alloc($$$)
 {
@@ -52,8 +55,6 @@ package Julian::Day;
 use vars qw(@ISA);
 @ISA = qw(Julian);
 
-my @days = (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
-
 # is it a leap year?
 sub _isleap
 {
@@ -99,6 +100,22 @@ sub add($$)
        return $self;
 } 
 
+sub as_string
+{
+       my $self = shift;
+       my $days = $self->[1];
+       my $mon = 0;
+       for (_isleap($self->[0]) ? @Julian::ldays : @Julian::days) {
+               if ($_ < $days) {
+                       $days -= $_;
+                       $mon++;
+               } else {
+                       last;
+               }
+       }
+       return "$days-$Julian::month[$mon]-$self->[0]";
+}
+
 package Julian::Month;
 
 use vars qw(@ISA);
@@ -140,5 +157,11 @@ sub add($$)
        return $self;
 } 
 
+sub as_string
+{
+       my $self = shift;
+       return "$Julian::month[$self->[1]]-$self->[0]";
+}
+
 
 1;
index 82f0abbdc96ef9814fa2780ae42aa24f8a3ca619..d91335174b0d896b87fa0b34259fcac940282172 100644 (file)
@@ -223,6 +223,11 @@ package DXM;
                                sqra => 'Cluster QRA Locator$_[0], DON\'T FORGET TO CHANGE YOUR DXVars.pm',
                                sorry => 'Sorry',
                                spf1 => 'spoof: creating new user $_[0]',
+                               stathf => 'HF DX Spot Stats, last 31 days',
+                               stathft => 'HF DX Spot Stats, last 31 days for DXCC $_[0]',
+                               statvhf => 'VHF+ DX Spot Stats, last 31 days',
+                               statvhft => 'VHF+ DX Spot Stats, last 31 days for DXCC $_[0]',
+                               statdx => 'Total DX Spots last 31 days',
                                sun => 'Location                              Rise   Set      Azim   Elev',
                                suser1 => 'usage: callsign user_field_name value',
                                suser2 => 'User $_[0] not found',
index 28a8dd7201a9690abb654aba76cec1cb75c2b0b6..11ffdfa41344254622620ecd9492e0e2941cff8b 100644 (file)
@@ -97,7 +97,8 @@ sub init
 {
        mkdir "$dirprefix", 0777 if !-e "$dirprefix";
        $fp = DXLog::new($dirprefix, "dat", 'd');
-       $statp = DXLog::new($dirprefix, "bys", 'd');
+       $statp = DXLog::new($dirprefix, "cys", 'd');
+       system("rm -f $main::data/$dirprefix/2001/*.bys");
 }
 
 sub prefix
@@ -349,13 +350,15 @@ sub genstats($)
                                [9, Bands::get_freq('6m')],
                                [10, Bands::get_freq('4m')],
                                [11, Bands::get_freq('2m')],
-                               [12, Bands::get_freq('70cm')],
-                               [13, Bands::get_freq('13cm')],
-                               [14, Bands::get_freq('9cm')],
-                               [15, Bands::get_freq('6cm')],
-                               [16, Bands::get_freq('3cm')],
-                               [17, Bands::get_freq('12mm')],
-                               [18, Bands::get_freq('6cm')],
+                               [12, Bands::get_freq('220')],
+                               [13, Bands::get_freq('70cm')],
+                               [14, Bands::get_freq('23cm')],
+                               [15, Bands::get_freq('13cm')],
+                               [16, Bands::get_freq('9cm')],
+                               [17, Bands::get_freq('6cm')],
+                               [18, Bands::get_freq('3cm')],
+                               [19, Bands::get_freq('12mm')],
+                               [20, Bands::get_freq('6cm')],
                           );
        my %list;
        my @tot;