From 47f7722750cbac46b82ccbad76a69ed27e1b48d2 Mon Sep 17 00:00:00 2001 From: Dirk Koopman Date: Tue, 19 Jan 2016 17:49:10 +0000 Subject: [PATCH] max windchill active only in winds > 1.2m/s --- loop.pl | 3 +++ templates/index.html.ep | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) 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 -- 2.34.1