Skip to content
Permalink
Browse files

Bringing back Gusts...

Adds Feature #46

Moves instanteous wind speed to the left side
Adds 10 minute gust to the right side
  • Loading branch information...
lightmaster committed Jun 8, 2019
1 parent 0e75f2c commit 2fc7e27b293da1808061b63aa1b6db6bb100d950
Showing with 6 additions and 6 deletions.
  1. +3 −3 livedata.php
  2. +3 −3 windspeeddirection.php
@@ -71,9 +71,9 @@
$weather["wind_speed_avg"] = $meteobridgeapi[5]; //Console's Average Wind Speed
$weather["wind_direction"] = number_format($meteobridgeapi[7],0);
$weather["wind_direction_avg"] = number_format($meteobridgeapi[46],0);
$weather["wind_speed"] = number_format($meteobridgeapi[5]); // Also the Console's Average Wind Speed
$weather["wind_gust_10min"] = $meteobridgeapi[40]; // Wind Speed Gust - Max speed of last 10 minutes
$weather["wind_gust_speed"] = $meteobridgeapi[6]; // Instanteous Speed
$weather["wind_speed"] = number_format($meteobridgeapi[6]); // Instant Wind Speed
$weather["wind_gust_10min"] = $meteobridgeapi[40]; // Wind Speed Gust - Max speed of last 10 minutes
$weather["wind_gust_speed"] = $meteobridgeapi[40]; //
$weather["wind_speed_bft"] = $meteobridgeapi[12];
$weather["wind_speed_max"] = $meteobridgeapi[30];
$weather["wind_gust_speed_max"]= $meteobridgeapi[32];
@@ -11,15 +11,15 @@
<div class="updatedtime"><span><?php if(file_exists($livedata)&&time()- filemtime($livedata)>300)echo $offline. '<offline> Offline </offline>';else echo $online." ".$weather["time"];?></div> <br />
<div class="windspeedvalues"><div class="windspeedvalue">
<?php
//weather34-windspeed avg
//weather34-windspeed instantaneous
if ($weather["wind_speed"]<10){echo "&nbsp;".number_format($weather["wind_speed"],1);}else echo number_format($weather["wind_speed"],1);?>
<div class="windunitidspeed"><?php echo $lang['Average'];?></div><div class="windunitspeed"><?php echo $weather["wind_units"]?></div></div>
<div class="windunitidspeed"><?php echo $lang['Currently'];?></div><div class="windunitspeed"><?php echo $weather["wind_units"]?></div></div>
<div class="windgustvalue">
<?php
//weather34-windgust
if ($weather["wind_gust_speed"]*$toKnots>=26.9978){echo "<windred>",number_format($weather["wind_gust_speed"],1),"</span>";}else if ($weather["wind_gust_speed"]*$toKnots>=21.5983){echo "<windorange>",number_format($weather["wind_gust_speed"],1),"</span>";}else if ($weather["wind_gust_speed"]*$toKnots>=16.1987){echo "<windgreen>",number_format($weather["wind_gust_speed"],1),"</span>";}else if ($weather["wind_gust_speed"]<10){echo "&nbsp;",number_format($weather["wind_gust_speed"],1);}else echo number_format($weather["wind_gust_speed"],1);?>
<div class="windunitgust"><?php echo $weather["wind_units"]?></div>
<div class="windunitidgust"><?php echo $lang['Currently']; ?></div></span></div></div>
<div class="windunitidgust"><?php echo $lang['Gust']; ?></div></span></div></div>
<div class="windspeedtrend1">
<?php echo "<valuetext>Max "."<max><value><maxred>".number_format($weather["wind_gust_speed_max"],1)."</maxred></max></span>"."<supmb> ".$weather["wind_units"]."</supmb><br> ".$lang['Gust']." (".$weather["winddmaxtime"].")</valuetext>";?></div>
<div class="windconverter"><?php

0 comments on commit 2fc7e27

Please sign in to comment.
You can’t perform that action at this time.