ob as $ob) {
if(((int) $ob->wd > 348.75) || ((int) $ob->wd <= 11.25)) {
if(((int) $ob->ws >= 0) && ((int) $ob->ws <= 5)) {$N[0]=$N[0]+1;}
if(((int) $ob->ws > 5) && ((int) $ob->ws <= 10)) {$N[1]=$N[1]+1;}
if(((int) $ob->ws > 10) && ((int) $ob->ws <= 15)) {$N[2]=$N[2]+1;}
if(((int) $ob->ws > 15) && ((int) $ob->ws <= 20)) {$N[3]=$N[3]+1;}
if(((int) $ob->ws > 20) && ((int) $ob->ws <= 25)) {$N[4]=$N[4]+1;}
if(((int) $ob->ws > 25) && ((int) $ob->ws <= 30)) {$N[5]=$N[5]+1;}
if(((int) $ob->ws > 30)) {$N[6]=$N[6]+1;}
}
else if(((int) $ob->wd > 11.25) && ((int) $ob->wd <= 33.75)) {
if(((int) $ob->ws >= 0) && ((int) $ob->ws <= 5)) {$NNE[0]=$NNE[0]+1;}
if(((int) $ob->ws > 5) && ((int) $ob->ws <= 10)) {$NNE[1]=$NNE[1]+1;}
if(((int) $ob->ws > 10) && ((int) $ob->ws <= 15)) {$NNE[2]=$NNE[2]+1;}
if(((int) $ob->ws > 15) && ((int) $ob->ws <= 20)) {$NNE[3]=$NNE[3]+1;}
if(((int) $ob->ws > 20) && ((int) $ob->ws <= 25)) {$NNE[4]=$NNE[4]+1;}
if(((int) $ob->ws > 25) && ((int) $ob->ws <= 30)) {$NNE[5]=$NNE[5]+1;}
if(((int) $ob->ws > 30)) {$NNE[6]=$NNE[6]+1;}
}
else if(((int) $ob->wd > 33.75) && ((int) $ob->wd <= 56.25)) {
if(((int) $ob->ws >= 0) && ((int) $ob->ws <= 5)) {$NE[0]=$NE[0]+1;}
if(((int) $ob->ws > 5) && ((int) $ob->ws <= 10)) {$NE[1]=$NE[1]+1;}
if(((int) $ob->ws > 10) && ((int) $ob->ws <= 15)) {$NE[2]=$NE[2]+1;}
if(((int) $ob->ws > 15) && ((int) $ob->ws <= 20)) {$NE[3]=$NE[3]+1;}
if(((int) $ob->ws > 20) && ((int) $ob->ws <= 25)) {$NE[4]=$NE[4]+1;}
if(((int) $ob->ws > 25) && ((int) $ob->ws <= 30)) {$NE[5]=$NE[5]+1;}
if(((int) $ob->ws > 30)) {$NE[6]=$NE[6]+1;}
}
else if(((int) $ob->wd > 56.25) && ((int) $ob->wd <= 78.75)) {
if(((int) $ob->ws >= 0) && ((int) $ob->ws <= 5)) {$ENE[0]=$ENE[0]+1;}
if(((int) $ob->ws > 5) && ((int) $ob->ws <= 10)) {$ENE[1]=$ENE[1]+1;}
if(((int) $ob->ws > 10) && ((int) $ob->ws <= 15)) {$ENE[2]=$ENE[2]+1;}
if(((int) $ob->ws > 15) && ((int) $ob->ws <= 20)) {$ENE[3]=$ENE[3]+1;}
if(((int) $ob->ws > 20) && ((int) $ob->ws <= 25)) {$ENE[4]=$ENE[4]+1;}
if(((int) $ob->ws > 25) && ((int) $ob->ws <= 30)) {$ENE[5]=$ENE[5]+1;}
if(((int) $ob->ws > 30)) {$ENE[6]=$ENE[6]+1;}
}
else if(((int) $ob->wd > 78.75) && ((int) $ob->wd <= 101.25)) {
if(((int) $ob->ws >= 0) && ((int) $ob->ws <= 5)) {$E[0]=$E[0]+1;}
if(((int) $ob->ws > 5) && ((int) $ob->ws <= 10)) {$E[1]=$E[1]+1;}
if(((int) $ob->ws > 10) && ((int) $ob->ws <= 15)) {$E[2]=$E[2]+1;}
if(((int) $ob->ws > 15) && ((int) $ob->ws <= 20)) {$E[3]=$E[3]+1;}
if(((int) $ob->ws > 20) && ((int) $ob->ws <= 25)) {$E[4]=$E[4]+1;}
if(((int) $ob->ws > 25) && ((int) $ob->ws <= 30)) {$E[5]=$E[5]+1;}
if(((int) $ob->ws > 30)) {$E[6]=$E[6]+1;}
}
else if(((int) $ob->wd > 101.25) && ((int) $ob->wd <= 123.75)) {
if(((int) $ob->ws >= 0) && ((int) $ob->ws <= 5)) {$ESE[0]=$ESE[0]+1;}
if(((int) $ob->ws > 5) && ((int) $ob->ws <= 10)) {$ESE[1]=$ESE[1]+1;}
if(((int) $ob->ws > 10) && ((int) $ob->ws <= 15)) {$ESE[2]=$ESE[2]+1;}
if(((int) $ob->ws > 15) && ((int) $ob->ws <= 20)) {$ESE[3]=$ESE[3]+1;}
if(((int) $ob->ws > 20) && ((int) $ob->ws <= 25)) {$ESE[4]=$ESE[4]+1;}
if(((int) $ob->ws > 25) && ((int) $ob->ws <= 30)) {$ESE[5]=$ESE[5]+1;}
if(((int) $ob->ws > 30)) {$ESE[6]=$ESE[6]+1;}
}
else if(((int) $ob->wd > 123.75) && ((int) $ob->wd <= 146.25)) {
if(((int) $ob->ws >= 0) && ((int) $ob->ws <= 5)) {$SE[0]=$SE[0]+1;}
if(((int) $ob->ws > 5) && ((int) $ob->ws <= 10)) {$SE[1]=$SE[1]+1;}
if(((int) $ob->ws > 10) && ((int) $ob->ws <= 15)) {$SE[2]=$SE[2]+1;}
if(((int) $ob->ws > 15) && ((int) $ob->ws <= 20)) {$SE[3]=$SE[3]+1;}
if(((int) $ob->ws > 20) && ((int) $ob->ws <= 25)) {$SE[4]=$SE[4]+1;}
if(((int) $ob->ws > 25) && ((int) $ob->ws <= 30)) {$SE[5]=$SE[5]+1;}
if(((int) $ob->ws > 30)) {$SE[6]=$SE[6]+1;}
}
else if(((int) $ob->wd > 146.25) && ((int) $ob->wd <= 168.75)) {
if(((int) $ob->ws >= 0) && ((int) $ob->ws <= 5)) {$SSE[0]=$SSE[0]+1;}
if(((int) $ob->ws > 5) && ((int) $ob->ws <= 10)) {$SSE[1]=$SSE[1]+1;}
if(((int) $ob->ws > 10) && ((int) $ob->ws <= 15)) {$SSE[2]=$SSE[2]+1;}
if(((int) $ob->ws > 15) && ((int) $ob->ws <= 20)) {$SSE[3]=$SSE[3]+1;}
if(((int) $ob->ws > 20) && ((int) $ob->ws <= 25)) {$SSE[4]=$SSE[4]+1;}
if(((int) $ob->ws > 25) && ((int) $ob->ws <= 30)) {$SSE[5]=$SSE[5]+1;}
if(((int) $ob->ws > 30)) {$SSE[6]=$SSE[6]+1;}
}
else if(((int) $ob->wd > 168.75) && ((int) $ob->wd <= 191.25)) {
if(((int) $ob->ws >= 0) && ((int) $ob->ws <= 5)) {$S[0]=$S[0]+1;}
if(((int) $ob->ws > 5) && ((int) $ob->ws <= 10)) {$S[1]=$S[1]+1;}
if(((int) $ob->ws > 10) && ((int) $ob->ws <= 15)) {$S[2]=$S[2]+1;}
if(((int) $ob->ws > 15) && ((int) $ob->ws <= 20)) {$S[3]=$S[3]+1;}
if(((int) $ob->ws > 20) && ((int) $ob->ws <= 25)) {$S[4]=$S[4]+1;}
if(((int) $ob->ws > 25) && ((int) $ob->ws <= 30)) {$S[5]=$S[5]+1;}
if(((int) $ob->ws > 30)) {$S[6]=$S[6]+1;}
}
else if(((int) $ob->wd > 191.25) && ((int) $ob->wd <= 213.75)) {
if(((int) $ob->ws >= 0) && ((int) $ob->ws <= 5)) {$SSW[0]=$SSW[0]+1;}
if(((int) $ob->ws > 5) && ((int) $ob->ws <= 10)) {$SSW[1]=$SSW[1]+1;}
if(((int) $ob->ws > 10) && ((int) $ob->ws <= 15)) {$SSW[2]=$SSW[2]+1;}
if(((int) $ob->ws > 15) && ((int) $ob->ws <= 20)) {$SSW[3]=$SSW[3]+1;}
if(((int) $ob->ws > 20) && ((int) $ob->ws <= 25)) {$SSW[4]=$SSW[4]+1;}
if(((int) $ob->ws > 25) && ((int) $ob->ws <= 30)) {$SSW[5]=$SSW[5]+1;}
if(((int) $ob->ws > 30)) {$SSW[6]=$SSW[6]+1;}
}
else if(((int) $ob->wd > 213.75) && ((int) $ob->wd <= 236.25)) {
if(((int) $ob->ws >= 0) && ((int) $ob->ws <= 5)) {$SW[0]=$SW[0]+1;}
if(((int) $ob->ws > 5) && ((int) $ob->ws <= 10)) {$SW[1]=$SW[1]+1;}
if(((int) $ob->ws > 10) && ((int) $ob->ws <= 15)) {$SW[2]=$SW[2]+1;}
if(((int) $ob->ws > 15) && ((int) $ob->ws <= 20)) {$SW[3]=$SW[3]+1;}
if(((int) $ob->ws > 20) && ((int) $ob->ws <= 25)) {$SW[4]=$SW[4]+1;}
if(((int) $ob->ws > 25) && ((int) $ob->ws <= 30)) {$SW[5]=$SW[5]+1;}
if(((int) $ob->ws > 30)) {$SW[6]=$SW[6]+1;}
}
else if(((int) $ob->wd > 236.25) && ((int) $ob->wd <= 258.75)) {
if(((int) $ob->ws >= 0) && ((int) $ob->ws <= 5)) {$WSW[0]=$WSW[0]+1;}
if(((int) $ob->ws > 5) && ((int) $ob->ws <= 10)) {$WSW[1]=$WSW[1]+1;}
if(((int) $ob->ws > 10) && ((int) $ob->ws <= 15)) {$WSW[2]=$WSW[2]+1;}
if(((int) $ob->ws > 15) && ((int) $ob->ws <= 20)) {$WSW[3]=$WSW[3]+1;}
if(((int) $ob->ws > 20) && ((int) $ob->ws <= 25)) {$WSW[4]=$WSW[4]+1;}
if(((int) $ob->ws > 25) && ((int) $ob->ws <= 30)) {$WSW[5]=$WSW[5]+1;}
if(((int) $ob->ws > 30)) {$WSW[6]=$WSW[6]+1;}
}
else if(((int) $ob->wd > 258.75) && ((int) $ob->wd <= 281.25)) {
if(((int) $ob->ws >= 0) && ((int) $ob->ws <= 5)) {$W[0]=$W[0]+1;}
if(((int) $ob->ws > 5) && ((int) $ob->ws <= 10)) {$W[1]=$W[1]+1;}
if(((int) $ob->ws > 10) && ((int) $ob->ws <= 15)) {$W[2]=$W[2]+1;}
if(((int) $ob->ws > 15) && ((int) $ob->ws <= 20)) {$W[3]=$W[3]+1;}
if(((int) $ob->ws > 20) && ((int) $ob->ws <= 25)) {$W[4]=$W[4]+1;}
if(((int) $ob->ws > 25) && ((int) $ob->ws <= 30)) {$W[5]=$W[5]+1;}
if(((int) $ob->ws > 30)) {$W[6]=$W[6]+1;}
}
else if(((int) $ob->wd > 281.25) && ((int) $ob->wd <= 303.75)) {
if(((int) $ob->ws >= 0) && ((int) $ob->ws <= 5)) {$WNW[0]=$WNW[0]+1;}
if(((int) $ob->ws > 5) && ((int) $ob->ws <= 10)) {$WNW[1]=$WNW[1]+1;}
if(((int) $ob->ws > 10) && ((int) $ob->ws <= 15)) {$WNW[2]=$WNW[2]+1;}
if(((int) $ob->ws > 15) && ((int) $ob->ws <= 20)) {$WNW[3]=$WNW[3]+1;}
if(((int) $ob->ws > 20) && ((int) $ob->ws <= 25)) {$WNW[4]=$WNW[4]+1;}
if(((int) $ob->ws > 25) && ((int) $ob->ws <= 30)) {$WNW[5]=$WNW[5]+1;}
if(((int) $ob->ws > 30)) {$WNW[6]=$WNW[6]+1;}
}
else if(((int) $ob->wd > 303.75) && ((int) $ob->wd <= 326.25)) {
if(((int) $ob->ws >= 0) && ((int) $ob->ws <= 5)) {$NW[0]=$NW[0]+1;}
if(((int) $ob->ws > 5) && ((int) $ob->ws <= 10)) {$NW[1]=$NW[1]+1;}
if(((int) $ob->ws > 10) && ((int) $ob->ws <= 15)) {$NW[2]=$NW[2]+1;}
if(((int) $ob->ws > 15) && ((int) $ob->ws <= 20)) {$NW[3]=$NW[3]+1;}
if(((int) $ob->ws > 20) && ((int) $ob->ws <= 25)) {$NW[4]=$NW[4]+1;}
if(((int) $ob->ws > 25) && ((int) $ob->ws <= 30)) {$NW[5]=$NW[5]+1;}
if(((int) $ob->ws > 30)) {$NW[6]=$NW[6]+1;}
}
else if(((int) $ob->wd > 326.25) && ((int) $ob->wd <= 348.75)) {
if(((int) $ob->ws >= 0) && ((int) $ob->ws <= 5)) {$NNW[0]=$NNW[0]+1;}
if(((int) $ob->ws > 5) && ((int) $ob->ws <= 10)) {$NNW[1]=$NNW[1]+1;}
if(((int) $ob->ws > 10) && ((int) $ob->ws <= 15)) {$NNW[2]=$NNW[2]+1;}
if(((int) $ob->ws > 15) && ((int) $ob->ws <= 20)) {$NNW[3]=$NNW[3]+1;}
if(((int) $ob->ws > 20) && ((int) $ob->ws <= 25)) {$NNW[4]=$NNW[4]+1;}
if(((int) $ob->ws > 25) && ((int) $ob->ws <= 30)) {$NNW[5]=$NNW[5]+1;}
if(((int) $ob->ws > 30)) {$NNW[6]=$NNW[6]+1;}
}
}
$count=array_sum($N)+array_sum($NNE)+array_sum($NE)+array_sum($ENE)+array_sum($E)+array_sum($ESE)+array_sum($SE)+array_sum($SSE)+array_sum($S)+array_sum($SSW)+array_sum($SW)+array_sum($WSW)+array_sum($W)+array_sum($WNW)+array_sum($NW)+array_sum($NNW);
$fh = fopen($myFiletemp, 'a') or die("can't open file");
$stringData = '
Table of Frequencies (percent) |
Direction |
> 30 mph |
25-30 mph |
20-25 mph |
15-20 mph |
10-15 mph |
5-10 mph |
< 5 mph |
Total |
N |
' . round((($N[6]/$count)*100),2) . ' |
' . round((($N[5]/$count)*100),2) . ' |
' . round((($N[4]/$count)*100),2) . ' |
' . round((($N[3]/$count)*100),2) . ' |
' . round((($N[2]/$count)*100),2) . ' |
' . round((($N[1]/$count)*100),2) . ' |
' . round((($N[0]/$count)*100),2) . ' |
0 |
NNE |
' . round((($NNE[6]/$count)*100),2) . ' |
' . round((($NNE[5]/$count)*100),2) . ' |
' . round((($NNE[4]/$count)*100),2) . ' |
' . round((($NNE[3]/$count)*100),2) . ' |
' . round((($NNE[2]/$count)*100),2) . ' |
' . round((($NNE[1]/$count)*100),2) . ' |
' . round((($NNE[0]/$count)*100),2) . ' |
0 |
NE |
' . round((($NE[6]/$count)*100),2) . ' |
' . round((($NE[5]/$count)*100),2) . ' |
' . round((($NE[4]/$count)*100),2) . ' |
' . round((($NE[3]/$count)*100),2) . ' |
' . round((($NE[2]/$count)*100),2) . ' |
' . round((($NE[1]/$count)*100),2) . ' |
' . round((($NE[0]/$count)*100),2) . ' |
0 |
ENE |
' . round((($ENE[6]/$count)*100),2) . ' |
' . round((($ENE[5]/$count)*100),2) . ' |
' . round((($ENE[4]/$count)*100),2) . ' |
' . round((($ENE[3]/$count)*100),2) . ' |
' . round((($ENE[2]/$count)*100),2) . ' |
' . round((($ENE[1]/$count)*100),2) . ' |
' . round((($ENE[0]/$count)*100),2) . ' |
0 |
E |
' . round((($E[6]/$count)*100),2) . ' |
' . round((($E[5]/$count)*100),2) . ' |
' . round((($E[4]/$count)*100),2) . ' |
' . round((($E[3]/$count)*100),2) . ' |
' . round((($E[2]/$count)*100),2) . ' |
' . round((($E[1]/$count)*100),2) . ' |
' . round((($E[0]/$count)*100),2) . ' |
0 |
ESE |
' . round((($ESE[6]/$count)*100),2) . ' |
' . round((($ESE[5]/$count)*100),2) . ' |
' . round((($ESE[4]/$count)*100),2) . ' |
' . round((($ESE[3]/$count)*100),2) . ' |
' . round((($ESE[2]/$count)*100),2) . ' |
' . round((($ESE[1]/$count)*100),2) . ' |
' . round((($ESE[0]/$count)*100),2) . ' |
0 |
SE |
' . round((($SE[6]/$count)*100),2) . ' |
' . round((($SE[5]/$count)*100),2) . ' |
' . round((($SE[4]/$count)*100),2) . ' |
' . round((($SE[3]/$count)*100),2) . ' |
' . round((($SE[2]/$count)*100),2) . ' |
' . round((($SE[1]/$count)*100),2) . ' |
' . round((($SE[0]/$count)*100),2) . ' |
0 |
SSE |
' . round((($SSE[6]/$count)*100),2) . ' |
' . round((($SSE[5]/$count)*100),2) . ' |
' . round((($SSE[4]/$count)*100),2) . ' |
' . round((($SSE[3]/$count)*100),2) . ' |
' . round((($SSE[2]/$count)*100),2) . ' |
' . round((($SSE[1]/$count)*100),2) . ' |
' . round((($SSE[0]/$count)*100),2) . ' |
0 |
S |
' . round((($S[6]/$count)*100),2) . ' |
' . round((($S[5]/$count)*100),2) . ' |
' . round((($S[4]/$count)*100),2) . ' |
' . round((($S[3]/$count)*100),2) . ' |
' . round((($S[2]/$count)*100),2) . ' |
' . round((($S[1]/$count)*100),2) . ' |
' . round((($S[0]/$count)*100),2) . ' |
0 |
SSW |
' . round((($SSW[6]/$count)*100),2) . ' |
' . round((($SSW[5]/$count)*100),2) . ' |
' . round((($SSW[4]/$count)*100),2) . ' |
' . round((($SSW[3]/$count)*100),2) . ' |
' . round((($SSW[2]/$count)*100),2) . ' |
' . round((($SSW[1]/$count)*100),2) . ' |
' . round((($SSW[0]/$count)*100),2) . ' |
0 |
SW |
' . round((($SW[6]/$count)*100),2) . ' |
' . round((($SW[5]/$count)*100),2) . ' |
' . round((($SW[4]/$count)*100),2) . ' |
' . round((($SW[3]/$count)*100),2) . ' |
' . round((($SW[2]/$count)*100),2) . ' |
' . round((($SW[1]/$count)*100),2) . ' |
' . round((($SW[0]/$count)*100),2) . ' |
0 |
WSW |
' . round((($WSW[6]/$count)*100),2) . ' |
' . round((($WSW[5]/$count)*100),2) . ' |
' . round((($WSW[4]/$count)*100),2) . ' |
' . round((($WSW[3]/$count)*100),2) . ' |
' . round((($WSW[2]/$count)*100),2) . ' |
' . round((($WSW[1]/$count)*100),2) . ' |
' . round((($WSW[0]/$count)*100),2) . ' |
0 |
W |
' . round((($W[6]/$count)*100),2) . ' |
' . round((($W[5]/$count)*100),2) . ' |
' . round((($W[4]/$count)*100),2) . ' |
' . round((($W[3]/$count)*100),2) . ' |
' . round((($W[2]/$count)*100),2) . ' |
' . round((($W[1]/$count)*100),2) . ' |
' . round((($W[0]/$count)*100),2) . ' |
0 |
WNW |
' . round((($WNW[6]/$count)*100),2) . ' |
' . round((($WNW[5]/$count)*100),2) . ' |
' . round((($WNW[4]/$count)*100),2) . ' |
' . round((($WNW[3]/$count)*100),2) . ' |
' . round((($WNW[2]/$count)*100),2) . ' |
' . round((($WNW[1]/$count)*100),2) . ' |
' . round((($WNW[0]/$count)*100),2) . ' |
0 |
NW |
' . round((($NW[6]/$count)*100),2) . ' |
' . round((($NW[5]/$count)*100),2) . ' |
' . round((($NW[4]/$count)*100),2) . ' |
' . round((($NW[3]/$count)*100),2) . ' |
' . round((($NW[2]/$count)*100),2) . ' |
' . round((($NW[1]/$count)*100),2) . ' |
' . round((($NW[0]/$count)*100),2) . ' |
0 |
NNW |
' . round((($NNW[6]/$count)*100),2) . ' |
' . round((($NNW[5]/$count)*100),2) . ' |
' . round((($NNW[4]/$count)*100),2) . ' |
' . round((($NNW[3]/$count)*100),2) . ' |
' . round((($NNW[2]/$count)*100),2) . ' |
' . round((($NNW[1]/$count)*100),2) . ' |
' . round((($NNW[0]/$count)*100),2) . ' |
0 |
Total |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
';
fwrite($fh, $stringData);
fclose($fh);
rename($myFiletemp, $myFile);
?>