<?php include_once('livedata.php');?>

<!---conversion for home weather station brian underdown december 2015--->
<div class="updatedtime"><span><?php echo "${cumulus[0]}";?></span><br /><?php echo "${cumulus[1]}";?></div> 
<span style="color:#f26c4f;">
<?php //default chosen units 
echo "${windunits}"; ?> </span>
<div class="windicons">
<?php
// beaufort icons
echo "${cumulus[5]}</windgust> \n";if($cumulus[5]<1){echo "<img src='css/windspeed/Wind Speed Less 1.png' width='25px'></img>";}else if($cumulus[5]<2){echo "<img src='css/windspeed/windspeed2.png' width='25px'></img>";}else if($cumulus[5]<7){echo "<img src='css/windspeed/Wind Speed 3-7 Filled.png' width='25px'></img>";}else if($cumulus[5]<12){echo "<img src='css/windspeed/Wind Speed 8-12 Filled.png' width='25px'></img>";}else if($cumulus[5]<17){echo "<img src='css/windspeed/Wind Speed 13-17 Filled.png' width='25px'></img>";}else if($cumulus[5]<22){echo "<img src='css/windspeed/Wind Speed 18-22 Filled.png' width='25px'></img>";}else if($cumulus[5]<27){echo "<img src='css/windspeed/Wind Speed 23-27 Filled.png' width='25px'></img>";}else if($cumulus[5]<32){echo "<img src='css/windspeed/Wind Speed 28-32 Filled.png' width='25px'></img>";}else if($cumulus[5]<37){echo "<img src='css/windspeed/Wind Speed 33-37 Filled.png' width='25px'></img>";}else if($cumulus[5]<42){echo "<img src='css/windspeed/Wind Speed 38-42 Filled.png' width='25px'></img>";}else if($cumulus[5]<47){echo "<img src='css/windspeed/Wind Speed 43-47 Filled.png' width='25px'></img>";}else if($cumulus[5]<52){echo "<img src='css/windspeed/Wind Speed 48-52 Filled.png' width='25px'></img>";}else if($cumulus[5]<57){echo "<img src='css/windspeed/Wind Speed 53-57 Filled.png' width='25px'></img>";}else if($cumulus[5]<62){echo "<img src='css/windspeed/Wind Speed 58-62 Filled.png' width='25px'></img>";}else if($cumulus[5]<102){echo "<img src='css/windspeed/Wind Speed 98-102 Filled.png' width='25px'></img>";}else if($cumulus[5]<107){echo "<img src='css/windspeed/Wind Speed 103-107 Filled.png' width='25px'></img>";}?></div> <!-- end wind speed icons -->

<span style="position:absolute;margin-top:23px;margin-left:-95px;font-size:0.8em;color:#777;"><?php echo "Blowing at";?></span>
<h2 style="padding-bottom:5px;line-height:1em;height:50px;font-size:2.5em;font-family:'weathertext',Helvetica,Arial;color:#777;">
<?php // wind speed & units
echo "${cumulus[5]}";?>
<span style="font-size:0.3em;font-weight:100;color:#bbb;"><?php echo "${windunits}"; ?></span>  
<span style="font-size:0.9em;font-weight:100;color:#eee;"> |</span> 

<span style="color:#a0a5a9">
<?php 
//gust values & unit, high gust color
echo "";
if($cumulus[6]>40) {echo "<span style='color:#f26c4f;'>${cumulus[6]}</div>";}
else echo $cumulus[6];
?><span style="font-size:0.3em;font-weight:100;color:#bbb;"><?php echo "${windunits}"; ?></span>  
</span>  
</span></h2>

<span style="position:absolute;margin-top:-77px;margin-left:25px;font-size:0.8em;color:#777;"><?php echo "Gusting at";?></span>
<span style="position:absolute;margin-top:-25px;margin-left:20px;font-size:0.8em;color:#777;">
<?php // alarm 
echo "";
if($cumulus[6]>45){echo "Strong Gusts <i class='fa fa-exclamation-triangle' aria-hidden='true'></i></alarm>" ;} ?>
</span>

<span style="position:absolute;margin-top:-25px;margin-left:-95px;font-size:0.8em;color:#777;">
<?php
//wind phrases
echo "";
if($cumulus[5]<1){echo "&nbsp;&nbsp;Calm";}
else if($cumulus[5]<5){echo "&nbsp;Light Breeze";}
else if($cumulus[5]<11){echo "&nbsp;Light Breeze";}
else if($cumulus[5]<19){echo "&nbsp;Gentle Breeze";}
else if($cumulus[5]<28){echo "Moderate Breeze";}
else if($cumulus[5]<38){echo "&nbsp;Fresh Breeze";}
else if($cumulus[5]<49){echo "&nbsp;Strong Breeze";}
else if($cumulus[5]<61){echo "&nbsp;Near Gale";}
else if($cumulus[5]<74){echo "&nbsp;Gale Force";}
else if($cumulus[5]<88){echo "&nbsp;Strong Gale";}
else if($cumulus[5]<102){echo "&nbsp;&nbsp;Storm";}
else if($cumulus[5]<117){echo "&nbsp;Violent Storm";}
else if($cumulus[5]<300){echo "&nbsp;&nbsp;Hurricane";}?>
</span>

<div class="windspeedtrend">
<?php echo "<supmb>max </supmb>${cumulus[30]}<supmb> ${windunits} wind</supmb>";?></div>
<div class="gustspeedtrend">
<?php echo "<supmb>max </supmb>${cumulus[32]}<supmb>  ${windunits} gust</supmb>";?></div>

