#!/usr/bin/perl -w # Load necessary modules. use strict; use lib '.'; use props; use LWP::Simple; # Assign global variables. use vars qw( $query $op $showutc $showssn $showk $k $ssn $path ); # Create a new CGI object. $query = new CGI; # Get the input. $op = $query->param('op') || ''; $showutc = $query->param('showutc'); $showssn = $query->param('showssn'); $showk = $query->param('showk'); $k = $query->param('k'); $ssn = $query->param('ssn'); $path = $query->param('path'); if (!$path) {$path="s";} my $wcypath = "datas/"; my $utctime = gmtime; my ($dayname, $month, $day, $time, $year, $res) = split (/\ /, $utctime); if ($day eq ""){$day = $time; $time = $year; $year = $res;} my ($std,$min,$sek) = split (/\:/, $time); my $monthnr = 0; if ($month eq "Jan") {$monthnr=1;} if ($month eq "Feb") {$monthnr=2;} if ($month eq "Mar") {$monthnr=3;} if ($month eq "Apr") {$monthnr=4;} if ($month eq "May") {$monthnr=5;} if ($month eq "Jun") {$monthnr=6;} if ($month eq "Jul") {$monthnr=7;} if ($month eq "Aug") {$monthnr=8;} if ($month eq "Sep") {$monthnr=9;} if ($month eq "Oct") {$monthnr=10;} if ($month eq "Nov") {$monthnr=11;} if ($month eq "Dec") {$monthnr=12;} if ($day == 1 && $std == 0) { if ($monthnr==1) { $monthnr=12; $year--; } else {$monthnr--; } } my $wcym =""; if ($monthnr<10) {$wcym = "0" . $monthnr; } else {$wcym = "$monthnr";} my $monthpic = $wcym; ##### WCY-Datei prügen und ggf. neu runterladen my $lastdowndat = (stat "dk0wcydat.txt")[9]; my $timenow = time; my $difftime = ($timenow - $lastdowndat); if ($difftime > 3600 ) { getstore("http://dk0wcy.de/magnetogram/index.html", "dk0wcydat.txt"); } ############## dk0wcydat.txt auslesen und umwandeln in wcydatas.txt open (FC, "); close (FC); my $dka=0; my $dkk=0; my $dkr=10; my $dki=0; for (my $w=0; $w<@dk0wcydatas; $w++) { ### A-Wert auslesen if ($w==29) { $dka=substr($dk0wcydatas[$w],65,1); my $tt1=substr($dk0wcydatas[$w],66,1); if ( int $tt1 eq $tt1) { $dka=($dka*10)+$tt1;} } ### K-Wert auslesen if ($w==30) { $dkk=substr($dk0wcydatas[$w],65,1); } ### R-Werte bzw SSN-Wert auslesen if ($w==39) { $dkr=substr($dk0wcydatas[$w],65,1); my $tt1=substr($dk0wcydatas[$w],66,1); my $tt2=substr($dk0wcydatas[$w],67,1); if ( int $tt1 eq $tt1 ) { $dkr=($dkr*10)+$tt1;} if ( int $tt2 eq $tt2 ) { $dkr=($dkr*10)+$tt2;} } ### SFI-Wert auslesen if ($w==44) { $dki=substr($dk0wcydatas[$w],51,1); my $tt1=substr($dk0wcydatas[$w],52,1); my $tt2=substr($dk0wcydatas[$w],53,1); if ( int $tt1 eq $tt1 ) { $dki=($dki*10)+$tt1;} if ( int $tt2 eq $tt2 ) { $dki=($dki*10)+$tt2;} } } my $nday=0; if ($day<10) {$nday = "0".$day;} else {$nday=$day;} my $newdata="-,".$nday.$month.substr($year,2,2).",".(($std*60)+$min).",-,-,-,-,".$dkk.",-,".$dka.",-,-,-,-,".$dkr.",".$dki; open (FH, "> wcydatas.txt"); print FH "$newdata\n"; close(FH); ############## wcydatas.txt auswerten open (FD, "); close(FD); my $max = 0; my $lastwcy =""; for (my $x=0;$x<@wcydatas; $x++) { $max = $x; $lastwcy = "$wcydatas[$x]"; } my @datas = split (/,/, $lastwcy); my $datum = $datas[1]; my $zeit = $datas[2]; my $ki = $datas[7]; my $ai = $datas[9]; my $ri = $datas[14]; my $sfi = $datas[15]; my $mina = $zeit % 60 ; my $tmp = $zeit - $mina; my $zeit2 = $tmp/60; my ($wmin,$wstd,$showdate); if ($mina < 10 ) {$wmin = "0" . $mina;} else {$wmin = "$mina";} if ($zeit2 < 10) { $wstd = "0" . $zeit2;} else {$wstd = $zeit2;} my $wday = substr($datum,0,2); my $wmonth = ucfirst(lc(substr($datum,2,3))); my $wyear = "20" . substr($datum,5,2); $showdate = $wday .".". $wmonth ." ". $wyear; my $logger = "DK0WCY"; ################### my $std1=$std; my $back = ""; my $forward = ""; #sysopen (FG, "condx.txt", O_RDONLY); #chomp (my @condx = ); #close(FG); # #my ($cpara0,$setk) = split (/\=/, $condx[0]); #my ($cpara1,$setssn) = split (/\=/, $condx[1]); my $setssn = $ri; my $setk = $ki; if ($op eq "set") { if (!$k or !$ssn) { } else { $setk = $k; $setssn = $ssn; open (FH, "> condx.txt"); print FH "k=$k\n"; print FH "ssn=$ssn\n"; close (FH); } } # if (!$setk) {$setk = $ki;} my $orissn=$setssn; my $dossn = 0; if (!$showssn) {$dossn = $setssn;$showssn=$setssn;} else {$dossn = $showssn;} my $dok = 1; #if ((!$showk) && (!$setk)) {$dok = $ki; $showk = 3;} if (!$showk) { $dok = $setk;$showk=$setk;} else {$dok = $showk;} if ($dok==10) { $dok=0;} my $stemp1 = 0; if ($dossn<101) { for (my $z=0;$z<10;$z++) { $stemp1 += 10; if ($stemp1>$dossn && ($stemp1-$dossn)<11) { if (($stemp1-$dossn)<6) {$dossn = $stemp1;} else { if (($stemp1-$dossn)<11) {$dossn = ($stemp1-10);} } } } } if ($dossn>100 && $dossn<201) { $stemp1 += 100; for (my $z=0;$z<4;$z++) { $stemp1 += 25; if ($stemp1>$dossn && ($stemp1-$dossn)<26) { if (($stemp1-$dossn)<13) {$dossn = $stemp1;} else { if (($stemp1-$dossn)<26) {$dossn = ($stemp1-25);} } } } } if ($dossn>200 && $dossn<301) { $stemp1 += 200; for (my $z=0;$z<2;$z++) { $stemp1 += 50; if ($stemp1>$dossn && ($stemp1-$dossn)<51) { if (($stemp1-$dossn)<25) {$dossn = $stemp1;} else { if (($stemp1-$dossn)<51) {$dossn = ($stemp1-50);} } } } } if ($dossn>300) {$dossn=300;} my $stemp2 = 0; if ($orissn<101) { for (my $z=0;$z<10;$z++) { $stemp2 += 10; if ($stemp2>$orissn && ($stemp2-$orissn)<11) { if (($stemp2-$orissn)<6) {$orissn = $stemp2;} else { if (($stemp2-$orissn)<11) {$orissn = ($stemp2-10);} } } } } if ($orissn>100 && $orissn<201) { $stemp2 += 100; for (my $z=0;$z<4;$z++) { $stemp2 += 25; if ($stemp2>$orissn && ($stemp2-$orissn)<26) { if (($stemp2-$orissn)<13) {$orissn = $stemp2;} else { if (($stemp2-$orissn)<26) {$orissn = ($stemp2-25);} } } } } if ($orissn>200 && $orissn<301) { $stemp2 += 200; for (my $z=0;$z<2;$z++) { $stemp2 += 50; if ($stemp2>$orissn && ($stemp2-$orissn)<51) { if (($stemp2-$orissn)<25) {$orissn = $stemp2;} else { if (($stemp2-$orissn)<51) {$orissn = ($stemp2-50);} } } } } if ($orissn>300) {$orissn=300;} my $top = 5+ int(rand(30) + 1); my $rtime = time; my $rzeit = localtime $rtime; my ($rdayname, $rmonth, $rday, $rmtime, $ryear, $rres) = split (/\ /, $rzeit); if ($rday eq ""){$rday = $rmtime; $rmtime = $ryear; $ryear = $rres;} if (length($rday)<2) { $rday = "0" . $rday;} my ($rstd,$rmin,$rsek) = split (/\:/, $rmtime); my $rest = (((60-$rmin)*60)-$rsek+$top); if ($rest<30) {$rest=60+$top;} if ($rest>2400) {$rest=$rest-2400;} if (!$showutc) {$showutc=$std;} else {$std = $showutc; $showutc=$std1;$rest = 300;} if ($op eq "set") { $rest = 10; } my $tpath=""; if ($path eq "s") {$tpath="/shortpath/";} else {$tpath="/longpath/";} my $band1 = "http://dxpics.df0cg.de/gifs/".$monthpic."/k".$dok."/ssn".$dossn. $tpath .$std ."UT-28MHz.gif"; my $band2 = "http://dxpics.df0cg.de/gifs/".$monthpic."/k".$dok."/ssn".$dossn. $tpath .$std ."UT-21MHz.gif"; my $band3 = "http://dxpics.df0cg.de/gifs/".$monthpic."/k".$dok."/ssn".$dossn. $tpath .$std ."UT-14MHz.gif"; my $band4 = "http://dxpics.df0cg.de/gifs/".$monthpic."/k".$dok."/ssn".$dossn. $tpath .$std ."UT-07MHz.gif"; my $band5 = "http://dxpics.df0cg.de/gifs/".$monthpic."/k".$dok."/ssn".$dossn. $tpath .$std ."UT-03MHz.gif"; if ($dok==0) {$dok=10;} print <<"HTML"; Content-type: text/html\n DX-Propagation - DF0CG

15m - 21MHz

10m - 28MHz

20m - 14MHz
DX-Propagation at DF0CG/DR1A
$logger : SFI=$sfi SSN(R)=$setssn K=$setk A=$ai HTML my $alter= $wday. "." .$wmonth. " " .$wyear. ", ".$wstd.".".$wmin."UT"; print <<"HTML"; ($alter)
HTML for (my $x=0; $x<24;$x++) { my $temp=""; if ($x<10) {$temp ="0" . $x;} else {$temp ="$x";} if ($x==12) { print <<"HTML"; HTML } my $bgc = "#FFFFFF"; if ($temp eq $std) { $bgc = "FF0000"; if ($x<1) {$back = "23"; $forward = "01";} if ($x>22) {$back = "22"; $forward = "00";} if ($x>0 && $x<23) { my $tback = ($x-1); if ($tback<10) {$back = "0" . $tback;} else {$back ="$tback";} my $tfor = ($x+1); if ($tfor<10) {$forward = "0" . $tfor;} else {$forward = "$tfor";} } } if ($temp eq $std1) { if ($temp eq $std) {$bgc = "00FF00";} else { $bgc = "CCCCCC";} } print <<"HTML"; HTML } print <<"HTML";
$temp
<<< HTML if ($dok==10) {$dok=0;} for (my $w=0;$w<10;$w++) { my $bgc = "FFFFFF"; if ($w eq $dok) { $bgc = "FF0000"; } if ($w eq $setk) { if ($dok eq $setk) {$bgc = "00FF00";} else { $bgc = "CCCCCC";} } my $temp54 = $w; if ($w==0) { $temp54 ="10";} print <<"HTML"; HTML } if ($dok==0) {$dok=10;} print <<"HTML";
K-Index: $w
>>>
HTML my $tssn = 0; for (my $v=0;$v<17;$v++) { if ($v<11) {$tssn = $v*10;} if ($v>10 && $v<15) {$tssn = 100+(($v-10)*25);} if ($v>14) {$tssn = 200+(($v-14)*50);} my $bgc = "FFFFFF"; if ($tssn eq $dossn) { $bgc = "FF0000"; } if ($tssn eq $orissn) { if ($dossn eq $orissn) {$bgc = "00FF00";} else { $bgc = "CCCCCC";} } print <<"HTML"; HTML } print <<"HTML";
SSN: $tssn
HTML my $bgp1 = "00FF00"; my $bgp2 = "FF0000"; if ($path eq "s") {$bgp1="00FF00"; $bgp2="FF0000";} else { $bgp1="FF0000"; $bgp2="00FF00";} print <<"HTML";
Short-Path Long-Path

40m - 7MHz

80m - 3.5MHz

S/N Ratio: >= 0 dB 1-6 dB 7-12 dB 13-17 dB 18-22 dB 23-27 dB 28-32 dB 33-37 dB 38-42 dB 42-47 dB > 47 dB

DJ6ET\@DF0CG Version 11 - February 2019
Maps generated by HamCAP v1.5 by VE3NEA

Thanks to Aurora-Beacon DK0WCY using their datas to display these maps

Online-Besucher:   Besucher gesamt:
HTML #