From: Dirk Koopman Date: Tue, 19 Jan 2016 17:49:10 +0000 (+0000) Subject: max windchill active only in winds > 1.2m/s X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=47f7722750cbac46b82ccbad76a69ed27e1b48d2;p=dweather.git max windchill active only in winds > 1.2m/s --- diff --git a/loop.pl b/loop.pl index f19b480..d5f69a5 100755 --- a/loop.pl +++ b/loop.pl @@ -448,6 +448,9 @@ sub process ++$writeld; } + my $wkph = $wind->{w} * 3.6; + $h{WindChill} = nearest(0.1, $wind->{w} >= 1.2 ? 13.12 + 0.6215 * $temp - 11.37 * $wkph ** 0.16 + 0.3965 * $temp * $wkph ** 0.16 : $temp); + if ($ts >= $ld->{last_hour} + 1800) { $h{Pressure_Trend} = unpack("C", substr $blk,3,1); $h{Pressure_Trend_txt} = $bar_trend{$h{Pressure_Trend}}; diff --git a/templates/index.html.ep b/templates/index.html.ep index e1bf922..1cbb949 100644 --- a/templates/index.html.ep +++ b/templates/index.html.ep @@ -299,7 +299,6 @@ } } chop $s if length $s; - say $s; %><%= $s %> ], tooltip: { @@ -349,7 +348,6 @@ } } chop $s if length $s; - say $s; %><%= $s %> ], tooltip: { @@ -817,6 +815,7 @@ Wind: ° @ mph Wind Minute Avg: ° @ mph Day Max Speed: mph @ + Wind Chill: °C Rain 30mins: mm