From 85f715f5353a78bac85f1802c22d6e7b9352ca81 Mon Sep 17 00:00:00 2001 From: minima Date: Sun, 9 Sep 2001 15:48:33 +0000 Subject: [PATCH] 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 --- Changes | 8 ++++++++ cmd/Commands_en.hlp | 6 ++++++ perl/Julian.pm | 29 ++++++++++++++++++++++++++--- perl/Messages | 5 +++++ perl/Spot.pm | 19 +++++++++++-------- 5 files changed, 56 insertions(+), 11 deletions(-) diff --git a/Changes b/Changes index 13ef5838..79858fa3 100644 --- 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======================================================================= diff --git a/cmd/Commands_en.hlp b/cmd/Commands_en.hlp index 554c85c3..6f04e71d 100644 --- a/cmd/Commands_en.hlp +++ b/cmd/Commands_en.hlp @@ -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 [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 ^Show last WCY broadcasts Display the most recent WCY information that has been received by the system diff --git a/perl/Julian.pm b/perl/Julian.pm index a86c11e2..0bd1f168 100644 --- a/perl/Julian.pm +++ b/perl/Julian.pm @@ -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; diff --git a/perl/Messages b/perl/Messages index 82f0abbd..d9133517 100644 --- a/perl/Messages +++ b/perl/Messages @@ -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', diff --git a/perl/Spot.pm b/perl/Spot.pm index 28a8dd72..11ffdfa4 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -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; -- 2.34.1