#!/usr/bin/perl # ******************************************************************************************* # * Wake up the Perl Interpreter, and slap it into submission * # ******************************************************************************************* use warnings; # Tell me what is bothering you... use strict; # Tell me every single thing I do wrong... use POSIX qw(strftime); # while you follow ALL the defined rules... # ******************************************************************************************* # * File counts and locations * # ******************************************************************************************* my $soundlocation = '/home/dcole/scripts/solar_data/sounds/'; # ******************************************************************************************* # * Band limit Declerations * # * Sets upper and lower limits that the program should look for in spotstream. * # ******************************************************************************************* my $low160 = '1800'; # Low end of band. my $high160 = '2000'; # High end of band. my $trigger160 = '3'; # trigger count to launch a DX announcment. my $low80 = '3500'; # Same as above. my $high80 = '4000'; my $trigger80 = '5'; my $low60 = '5330'; my $high60 = '5500'; my $trigger60 = '5'; my $low40 = '7000'; my $high40 = '7300'; my $trigger40 = '10'; my $low30 = '10000'; my $high30 = '10150'; my $trigger30 = '5'; my $low20 = '14000'; my $high20 = '14350'; my $trigger20 = '5'; my $low17 = '18065'; my $high17 = '18169'; my $trigger17 = '5'; my $low15 = '21000'; my $high15 = '21450'; my $trigger15 = '5'; my $low12 = '24889'; my $high12 = '24991'; my $trigger12 = '2'; my $low10 = '28000'; my $high10 = '29000'; my $trigger10 = '2'; my $low6 = '50000'; my $high6 = '54000'; my $trigger6 = '1'; # ******************************************************************************************* # * Band specific files and counters * # ******************************************************************************************* my $counter160MZ345 = 0; # Save combined spot count my $counter160MZ3 = 0; # for each band, and zone to my $counter160MZ4 = 0; # a variable for each band. my $counter160MZ5 = 0; # Updated every timeframe. my $file160zone345spots = 'spots/zone345spots160.txt'; # Save spot count to variable my $file160zone3spots = 'spots/zone3spots160.txt'; # for each band and zone, my $file160zone4spots = 'spots/zone5spots160.txt'; # write disk later. Updated my $file160zone5spots = 'spots/zone4spots160.txt'; # each timeframe. my $counter80MZ345 = 0; my $counter80MZ3 = 0; my $counter80MZ4 = 0; my $counter80MZ5 = 0; my $file80zone345spots = 'spots/zone345spots80.txt'; #Same as above. my $file80zone3spots = 'spots/zone3spots80.txt'; my $file80zone5spots = 'spots/zone5spots80.txt'; my $file80zone4spots = 'spots/zone4spots80.txt'; my $counter60MZ345 = 0; my $counter60MZ3 = 0; my $counter60MZ4 = 0; my $counter60MZ5 = 0; my $file60zone345spots = 'spots/zone345spots60.txt'; my $file60zone3spots = 'spots/zone3spots60.txt'; my $file60zone5spots = 'spots/zone5spots60.txt'; my $file60zone4spots = 'spots/zone4spots60.txt'; my $counter40MZ345 = 0; my $counter40MZ3 = 0; my $counter40MZ4 = 0; my $counter40MZ5 = 0; my $file40zone345spots = 'spots/zone345spots40.txt'; my $file40zone3spots = 'spots/zone3spots40.txt'; my $file40zone5spots = 'spots/zone5spots40.txt'; my $file40zone4spots = 'spots/zone4spots40.txt'; my $counter30MZ345 = 0; my $counter30MZ3 = 0; my $counter30MZ4 = 0; my $counter30MZ5 = 0; my $file30zone345spots = 'spots/zone345spots30.txt'; my $file30zone3spots = 'spots/zone3spots30.txt'; my $file30zone5spots = 'spots/zone5spots30.txt'; my $file30zone4spots = 'spots/zone4spots30.txt'; my $counter20MZ345 = 0; my $counter20MZ3 = 0; my $counter20MZ4 = 0; my $counter20MZ5 = 0; my $file20zone345spots = 'spots/zone345spots20.txt'; my $file20zone3spots = 'spots/zone3spots20.txt'; my $file20zone5spots = 'spots/zone5spots20.txt'; my $file20zone4spots = 'spots/zone4spots20.txt'; my $counter17MZ345 = 0; my $counter17MZ3 = 0; my $counter17MZ4 = 0; my $counter17MZ5 = 0; my $file17zone345spots = 'spots/zone345spots17.txt'; my $file17zone3spots = 'spots/zone3spots17.txt'; my $file17zone5spots = 'spots/zone5spots17.txt'; my $file17zone4spots = 'spots/zone4spots17.txt'; my $counter15MZ345 = 0; my $counter15MZ3 = 0; my $counter15MZ4 = 0; my $counter15MZ5 = 0; my $file15zone345spots = 'spots/zone345spots15.txt'; my $file15zone3spots = 'spots/zone3spots15.txt'; my $file15zone5spots = 'spots/zone5spots15.txt'; my $file15zone4spots = 'spots/zone4spots15.txt'; my $last15announce; my $counter12MZ345 = 0; my $counter12MZ3 = 0; my $counter12MZ4 = 0; my $counter12MZ5 = 0; my $file12zone345spots = 'spots/zone345spots12.txt'; my $file12zone3spots = 'spots/zone3spots12.txt'; my $file12zone5spots = 'spots/zone5spots12.txt'; my $file12zone4spots = 'spots/zone4spots12.txt'; my $counter10MZ345 = 0; my $counter10MZ3 = 0; my $counter10MZ4 = 0; my $counter10MZ5 = 0; my $file10zone345spots = 'spots/zone345spots10.txt'; my $file10zone3spots = 'spots/zone3spots10.txt'; my $file10zone5spots = 'spots/zone5spots10.txt'; my $file10zone4spots = 'spots/zone4spots10.txt'; my $counter6MZ345 = 0; my $counter6MZ3 = 0; my $counter6MZ4 = 0; my $counter6MZ5 = 0; my $file6zone345spots = 'spots/zone345spots6.txt'; my $file6zone3spots = 'spots/zone3spots6.txt'; my $file6zone4spots = 'spots/zone4spots6.txt'; my $file6zone5spots = 'spots/zone5spots6.txt'; # ******************************************************************************************* # * Generic file I/O Setup * # ******************************************************************************************* my $out; # Define some place to put the incoming my $in; # data stream. # ******************************************************************************************* # * Telnet setup * # * Sets all variables, and triggers used to interact with cluster * # ******************************************************************************************* my $telnet = ''; # Uset to talk to and capture data from the # telnet session. my $dxcluster = '192.168.1.4'; # The DX Cluster I want to log into. my $logintrigger = '/call: /i'; # The prompt I wait for to log in. my $mycall = 'NK7Z-2'; # The login user name. my $clustertrigger = '/./'; # The prompt the cluster uses not for login. # ******************************************************************************************* # * Generic variables * # ******************************************************************************************* my @output = ''; # Generic array for output. my $worker = ''; # Generic scaler. my $temp = ''; # Another generic scaler my $call = ''; # Used in testing for audable alert section. my $band = ''; # Used in testing for audable alert section. my $zone = ''; # Used in testing for audable alert section. my $callsign = ''; # Variable to parse from while in streamwatch. my $grid = ''; # Variable to parse from while in streamwatch. my $lastspottedby = ''; # Who did the spotting, used in printing. my $starttime = ''; # Used to conriol how long the count runs. my $endtime = ''; # Used to control how long the count runs. my $measurmentperiod = ''; # Result of ($starttime - $endtime) my $timelimit = 10; # How often to zero counters and restart in # minutes. # ******************************************************************************************* # * Preload all CPAN modules * # ******************************************************************************************* use Net::Telnet; # Load the telnet CPAN Module. $telnet = new Net::Telnet ( Timeout=>30, # Create trigger for use in telnetting. Errmode=>'return'); # If something goes nuts continue... use Time::HiRes qw( time ); # Need the time so I can calculate across a # set time span, sl load a CPAN module. # ******************************************************************************************* # * MAIN PROGRAM BODY * # ******************************************************************************************* startagain: # Error recover entry point for failures. &login; # Gets logged into the DX Cluster, and gets spots coming. &configcluster; # Turn off announcments, etc... &watchstream; # Do all the parsing, and storage of variables. &logoff; # Wave bye bye to the DX Cluster... errorhandler: # Arrive here when something like a dead stream happens. sleep ($timelimit * 2); # Wait one half the time needed to get a data set. goto startagain; # Begin again... exit; # ******************************************************************************************* # * * # * SUBROUTINES * # * * # ******************************************************************************************* # ******************************************************************************************* # * 'login' logs into the a DX cluster, leaving the program at the prompt upon exit. * # ******************************************************************************************* sub login { sleep 1; # Don't hammer things more than once # a second. $telnet->open(Host => $dxcluster, Port => 7373) # Get connected to cluster, or return goto errorhandler; # or die trying... $telnet->waitfor($logintrigger) # Wait for the trigger to login, or return goto errorhandler; # or die trying... $telnet->print($mycall) # Got trigger, now issue login call, or return goto errorhandler; # or die trying... $telnet->waitfor($clustertrigger) # Wait for the trigger indicating a login, or return goto errorhandler; # or die trying... } # ******************************************************************************************* # * 'configcluster' preconfigures the clusters output, like no announce, and add CQ Zones. * # * Assumes entry with the cluster prompt waiting. * # ******************************************************************************************* sub configcluster { sleep 1; # Wait for things to calm down. $telnet->print('set/dx/extension CQZone') # Set the cluster options, or return goto errorhandler; # or die trying... $telnet->waitfor($clustertrigger) # Wait for the cluster to accept or return goto errorhandler; # the options or die trying... } # ******************************************************************************************* # * logoff logs out of the a DX cluster, leaving the user at the prompt upon exit. * # ******************************************************************************************* sub logoff { sleep 1; # Never hammer things. $telnet->print('BYE') # Issue logoff command to cluster, or return goto errorhandler; # or die trying... } # ******************************************************************************************* # * "watchstream" captures & parses the incoming telnet data stream in realtime. * # * updating counters for each band with the number of spots per timeperiod. * # ******************************************************************************************* sub watchstream { startover: # A place to re-enter clearing everything. # reset start time to zero. $starttime = time(); # Set the time to the current time. $counter160MZ345 = 0; # We begin each time period by resetting all counters $counter160MZ3 = 0; # for all zones, and all bands to zero. $counter160MZ4 = 0; $counter160MZ5 = 0; $counter80MZ345 = 0; # Combined counter for all zones. $counter80MZ3 = 0; # Counter for a spot seen in zone 3. $counter80MZ4 = 0; # Counter for a spot seen in zone 4. $counter80MZ5 = 0; # counter for a spot seen in zine 5. $counter60MZ345 = 0; # And so on... $counter60MZ3 = 0; $counter60MZ4 = 0; $counter60MZ5 = 0; $counter40MZ345 = 0; $counter40MZ3 = 0; $counter40MZ4 = 0; $counter40MZ5 = 0; $counter30MZ345 = 0; $counter30MZ3 = 0; $counter30MZ4 = 0; $counter30MZ5 = 0; $counter20MZ345 = 0; $counter20MZ3 = 0; $counter20MZ4 = 0; $counter20MZ5 = 0; $counter17MZ345 = 0; $counter17MZ3 = 0; $counter17MZ4 = 0; $counter17MZ5 = 0; $counter15MZ345 = 0; $counter15MZ3 = 0; $counter15MZ4 = 0; $counter15MZ5 = 0; $counter12MZ345 = 0; $counter12MZ3 = 0; $counter12MZ4 = 0; $counter12MZ5 = 0; $counter10MZ345 = 0; $counter10MZ3 = 0; $counter10MZ4 = 0; $counter10MZ5 = 0; $counter6MZ345 = 0; $counter6MZ3 = 0; $counter6MZ4 = 0; $counter6MZ5 = 0; @output = (); # ******************************************************************************************* # * The "sniffstring" subroutine does all the work, it first parses the incoming spot into * # * $zone, $band, $callsign, and $lastspottedby, if there is a long string in place. * # ******************************************************************************************* sniffstring: # A place to re-enter without clearing everything. $lastspottedby = " "; $worker = ""; $grid = ""; while (1) # Now we wait for something from the cluster. { @output = $telnet->waitfor('/\n/') # Look to cluster for a linefeed, or return goto errorhandler; # or die trying... $worker = "$output[0]\n"; # Stash to $worker. if (length $worker > 70) # Full line? { # Yes... $zone = (substr($worker,67,2)); # Move $zone. $band = (substr($worker,17,5)); # Move $band. $callsign = (substr($worker,26,10)); # Move $callsign. $lastspottedby = (substr($worker,6,11)); # Move $call. $grid = (substr($worker,63,4)); # Move grid. } # Fall through. # ******************************************************************************************* # * Look for a specific callsign and then issue an audio alert. * # ******************************************************************************************* if (substr($callsign,0,4) =~ /NULL/) { `mplayer -volume 75 /home/dcole/scripts/solar_data/sounds/dxpedition.mp3 2> /dev/null`; } # ******************************************************************************************* # * Remove all spots from the US and Canada, via Regex. Uses the international call * # * tables by the IARU to define where a call is linked to. * # ******************************************************************************************* if (substr($lastspottedby,0,1) =~ /W/) # Skip all calls starting with "W" { # US. goto sniffstring; } if (substr($lastspottedby,0,1) =~ /K/) # Skip all calls starting with "K" { # US. goto sniffstring; } if (substr($lastspottedby,0,1) =~ /N/) # Skip all calls staring with "N" { # US. goto sniffstring; } if (substr($lastspottedby,0,2) =~ /A[A-L]/) # Skip all calls of the pattern XY, { # where X is a A, and Y is between A and L. goto sniffstring; # US. } if (substr($lastspottedby,0,2) =~ /V[A-G]/) # Skip all calls of the pattern XY, { # where X is a V, and Y is between A and Z. goto sniffstring; # Canada } if (substr($lastspottedby,0,3) =~ /VO/) # Take care of all call starting with "VO". { # Canada goto sniffstring; } if (substr($lastspottedby,0,2) =~ /V[X-Y]/) # Skip all calls of the pattern XY, { # where X is a V, and Y is between X and Y. goto sniffstring; } # Canada if (substr($lastspottedby,0,2) =~ /V[J-O]/) # Skip all calls of the pattern XY, { # where X is a V, and Y is between J and O. goto sniffstring; # Canada } if (substr($lastspottedby,0,2) =~ /C[F-K]/) # Skip all calls of the pattern XY, { # where X is a C, and Y is between F and K. goto sniffstring; # Canada } if (substr($lastspottedby,0,2) =~ /C[Y-Z]/) # Skip all calls of the pattern XY, { # where X is a C, and Y is between Y and Z. goto sniffstring; # Canada } $endtime = time(); # Note the current time. $measurmentperiod = (($endtime - $starttime)/60); # Calculate how long we have been in this loop. if (($zone eq " 3") || ($zone eq " 4") || ($zone eq " 5")) # Trigger incrementation of counters if zones 3, 4, or 5, { # if we have any spots in zone 3, 4, or 5. # ******************************************************************************************* # * Check each spot for band, and zone. If a match, then increment that bands counter by * # * one. Use low and high frequency limits (lowXXX, and highXXX), to define the band. * # * Counter name defined as "counterXXXMZY". Where "XXX" is the band, and Y is the Zone. * # ******************************************************************************************* # 160 Meters, zones 3, 4, and 5. if (($band >= $low160) && ($band <= $high160)) { $counter160MZ345 = $counter160MZ345 + 1; } # 160 Meters, zone 3 if (($band >= $low160) && ($band <= $high160) && ($zone == 3)) { $counter160MZ3 = $counter160MZ3 + 1; } # 160 Meters, zone 4 if (($band >= $low160) && ($band <= $high160) && ($zone == 4)) { $counter160MZ4 = $counter160MZ4 + 1; } # 160 Meters, zone 5 if (($band >= $low160) && ($band <= $high160) && ($zone == 5)) { $counter160MZ5 = $counter160MZ5 + 1; } # 80 Meters if (($band >= $low80) && ($band <= $high80)) { $counter80MZ345 = $counter80MZ345 + 1; } # 80 Meters, zone 3 if (($band >= $low80) && ($band <= $high80) && ($zone == 3)) { $counter80MZ3 = $counter80MZ3 + 1; } # 80 Meters, zone 4 if (($band >= $low80) && ($band <= $high80) && ($zone == 4)) { $counter80MZ4 = $counter80MZ4 + 1; } # 80 Meters, zone 5 if (($band >= $low80) && ($band <= $high80) && ($zone == 5)) { $counter80MZ5 = $counter80MZ5 + 1; } # 40 Meters if (($band >= $low40) && ($band <= $high40)) { $counter40MZ345 = $counter40MZ345 + 1; } # 40 Meters, zone 3 if (($band >= $low40) && ($band <= $high40) && ($zone == 3)) { $counter40MZ3 = $counter40MZ3 + 1; } # 40 Meters, zone 4 if (($band >= $low40) && ($band <= $high40) && ($zone == 4)) { $counter40MZ4 = $counter40MZ4 + 1; } # 40 Meters, zone 5 if (($band >= $low40) && ($band <= $high40) && ($zone == 5)) { $counter40MZ5 = $counter40MZ5 + 1; } # 30 Meters if (($band >= $low30) && ($band <= $high30)) { $counter30MZ345 = $counter30MZ345 + 1; } # 30 Meters, zone 3 if (($band >= $low30) && ($band <= $high30) && ($zone == 3)) { $counter30MZ3 = $counter30MZ3 + 1; } # 30 Meters, zone 4 if (($band >= $low30) && ($band <= $high30) && ($zone == 4)) { $counter30MZ4 = $counter30MZ4 + 1; } #20 Meters, zone 5 if (($band >= $low30) && ($band <= $high30) && ($zone == 5)) { $counter30MZ5 = $counter30MZ5 + 1; } # 20 Meters if (($band >= $low20) && ($band <= $high20)) { $counter20MZ345 = $counter20MZ345 + 1; } # 20 Meters, zone 3 if (($band >= $low20) && ($band <= $high20) && ($zone == 3)) { $counter20MZ3 = $counter20MZ3 + 1; } # 20 Meters, zone 4 if (($band >= $low20) && ($band <= $high20) && ($zone == 4)) { $counter20MZ4 = $counter20MZ4 + 1; } #20 Meters, zone 5 if (($band >= $low20) && ($band <= $high20) && ($zone == 5)) { $counter20MZ5 = $counter20MZ5 + 1; } # 17 Meters if (($band >= $low17) && ($band <= $high17)) { $counter17MZ345 = $counter17MZ345 + 1; } # 17 Meters, zone 3 if (($band >= $low17) && ($band <= $high17) && ($zone == 3)) { $counter17MZ3 = $counter17MZ3 + 1; } # 17 Meters, zone 4 if (($band >= $low17) && ($band <= $high17) && ($zone == 4)) { $counter17MZ4 = $counter17MZ4 + 1; } # 17 Meters, zone 5 if (($band >= $low17) && ($band <= $high17) && ($zone == 5)) { $counter17MZ5 = $counter17MZ5 + 1; } # 15 Meters if (($band >= $low15) && ($band <= $high15)) { $counter15MZ345 = $counter15MZ345 + 1; } # 15 Meters, zone 3 if (($band >= $low15) && ($band <= $high15) && ($zone == 3)) { $counter15MZ3 = $counter15MZ3 + 1; } # 15 Meters, zone 4 if (($band >= $low15) && ($band <= $high15) && ($zone == 4)) { $counter15MZ4 = $counter15MZ4 + 1; } #15 Meters, zone 5 if (($band >= $low15) && ($band <= $high15) && ($zone == 5)) { $counter15MZ5 = $counter15MZ5 + 1; } # 12 Meters if (($band >= $low12) && ($band <= $high12)) { $counter12MZ345 = $counter12MZ345 + 1; } # 12 Meters, zone 3 if (($band >= $low12) && ($band <= $high12) && ($zone == 3)) { $counter12MZ3 = $counter12MZ3 + 1; } # 12 Meters, zone 4 if (($band >= $low12) && ($band <= $high12) && ($zone == 4)) { $counter12MZ4 = $counter12MZ4 + 1; } # 12 Meters, zone 5 if (($band >= $low12) && ($band <= $high12) && ($zone == 5)) { $counter12MZ5 = $counter12MZ5 + 1; } # 10 Meters if (($band >= $low10) && ($band <= $high10)) { $counter10MZ345 = $counter10MZ345 + 1; } # 10 Meters, zone 3 if (($band >= $low10) && ($band <= $high10) && ($zone == 3)) { $counter10MZ3 = $counter10MZ3 + 1; } # 10 Meters, zone 4 if (($band >= $low10) && ($band <= $high10) && ($zone == 4)) { $counter10MZ4 = $counter10MZ4 + 1; } # 10 Meters, zone 5 if (($band >= $low10) && ($band <= $high10) && ($zone == 5)) { $counter10MZ5 = $counter10MZ5 + 1; } # 6 Meters if (($band >= $low6) && ($band <= $high6)) { $counter6MZ345 = $counter6MZ345 + 1; } # 6 Meters, zone 3 if (($band >= $low6) && ($band <= $high6) && ($zone == 3)) { $counter6MZ3 = $counter6MZ3 + 1; } # 6 Meters, zone 4 if (($band >= $low6) && ($band <= $high6) && ($zone == 4)) { $counter6MZ4 = $counter6MZ4 + 1; } # 6 Meters, zone 5 if (($band >= $low6) && ($band <= $high6) && ($zone == 5)) { $counter6MZ5 = $counter6MZ5 + 1; } # Data Write section... # ALL done... Lets see what we have... Put everything to the screen. $temp = $measurmentperiod; print "Last callsign spotted: $callsign in zone:$zone\n"; print "Spotted by: $lastspottedby\n\n"; print "Time: $temp\n"; print "160 Zone 3, 4, and 5 now have $counter160MZ345 spots \n"; print "160 Zone 3 now has $counter160MZ3 spots \n"; print "160 Zone 4 now has $counter160MZ4 spots \n"; print "160 Zone 5 now has $counter160MZ5 spots \n\n"; print "Time: $temp\n"; print "80 Zone 3, 4, and 5 now have $counter80MZ345 spots \n"; print "80 Zone 3 now has $counter80MZ3 spots \n"; print "80 Zone 4 now has $counter80MZ4 spots \n"; print "80 Zone 5 now has $counter80MZ5 spots \n\n"; print "Time: $temp\n"; print "40 Zone 3, 4, and 5 now have $counter40MZ345 spots \n"; print "40 Zone 3 now has $counter40MZ3 spots \n"; print "40 Zone 4 now has $counter40MZ4 spots \n"; print "40 Zone 5 now has $counter40MZ5 spots \n\n"; print "Time: $temp\n"; print "30 Zone 3, 4, and 5 now have $counter30MZ345 spots \n"; print "30 Zone 3 now has $counter30MZ3 spots \n"; print "30 Zone 4 now has $counter30MZ4 spots \n"; print "30 Zone 5 now has $counter30MZ5 spots \n\n"; print "Time: $temp\n"; print "20 Zone 3, 4, and 5 now have $counter20MZ345 spots \n"; print "20 Zone 3 now has $counter20MZ3 spots \n"; print "20 Zone 4 now has $counter20MZ4 spots \n"; print "20 Zone 5 now has $counter20MZ5 spots \n\n"; print "Time: $temp\n"; print "17 Zone 3, 4, and 5 now have $counter17MZ345 spots \n"; print "17 Zone 3 now has $counter17MZ3 spots \n"; print "17 Zone 4 now has $counter17MZ4 spots \n"; print "17 Zone 5 now has $counter17MZ5 spots \n\n"; print "Time: $temp\n"; print "15 Zone 3, 4, and 5 now have $counter15MZ345 spots \n"; print "15 Zone 3 now has $counter15MZ3 spots \n"; print "15 Zone 4 now has $counter15MZ4 spots \n"; print "15 Zone 5 now has $counter15MZ5 spots \n\n"; print "Time: $temp\n"; print "12 Zone 3, 4, and 5 now have $counter12MZ345 spots \n"; print "12 Zone 3 now has $counter12MZ3 spots \n"; print "12 Zone 4 now has $counter12MZ4 spots \n"; print "12 Zone 5 now has $counter12MZ5 spots \n\n"; print "Time: $temp\n"; print "10 Zone 3, 4, and 5 now have $counter10MZ345 spots \n"; print "10 Zone 3 now has $counter10MZ3 spots \n"; print "10 Zone 4 now has $counter10MZ4 spots \n"; print "10 Zone 5 now has $counter10MZ5 spots \n\n"; print "Time: $temp\n"; print "6 Zone 3, 4, and 5 now have $counter6MZ345 spots \n"; print "6 Zone 3 now has $counter6MZ3 spots \n"; print "6 Zone 4 now has $counter6MZ4 spots \n"; print "6 Zone 5 now has $counter6MZ5 spots \n\n"; # Make noise if we have exceeded '$timeperiod' by playing an MP3 file. if ($measurmentperiod >= $timelimit) { # 6 Meter if ($counter6MZ3 >= ($trigger6)) { `mplayer -volume 75 /home/dcole/scripts/solar_data/sounds/6metersisopen.mp3 2> /dev/null`; } # 10 Meters if ($counter10MZ3 >= ($trigger10)) { `mplayer -volume 75 /home/dcole/scripts/solar_data/sounds/10metersisopen.mp3 2> /dev/null`; } # 12 Meters if ($counter12MZ3 >= ($trigger12)) { `mplayer -volume 75 /home/dcole/scripts/solar_data/sounds/12metersisopen.mp3 2> /dev/null`; } # 15 Meters if ($counter15MZ3 >= ($trigger15)) { `mplayer -volume 75 /home/dcole/scripts/solar_data/sounds/15metersisopen.mp3 2> /dev/null`; } # 20 Meters if ($counter20MZ3 >= ($trigger20)) { `mplayer -volume 75 /home/dcole/scripts/solar_data/sounds/20metersisopen.mp3 2> /dev/null`; } # 30 Meters if ($counter30MZ3 >= ($trigger30)) { `mplayer -volume 75 /home/dcole/scripts/solar_data/sounds/30metersisopen.mp3 2> /dev/null`; } # 40 Meters if ($counter40MZ3 >= ($trigger40)) { `mplayer -volume 75 /home/dcole/scripts/solar_data/sounds/40metersisopen.mp3 2> /dev/null`; } # 80 Meters if ($counter80MZ3 >= ($trigger80)) { `mplayer -volume 75 /home/dcole/scripts/solar_data/sounds/80metersisopen.mp3 2> /dev/null`; } goto startover; } } } }