Hi Ian,

The calculation for Feels value is not displaying correctly for my 
location. It is like 30+ degrees too high. I know there are number of ways 
this can be done and there are numerous thoughts on what is best but for me 
I use the python program written by jfcarr  located here 
https://gist.github.com/jfcarr/e68593c92c878257550d It seems to match my 
local weather stations and takes into account wind speed. So I converted it 
from python to php and added it to livedata.php. Note it works on 
Fahrenheit temps so a conversion to C temps would be needed on the output 
and the input would need  a C to F conversion as well. Here is the code.
  
>
> if ($weather['temp'] <= 50 and $weather["wind_speed"] >= 3){
>         $vFeelsLike = 35.74 + (0.6215*$weather['temp']) - 
> 35.75*($weather["wind_speed"]**0.16) + 
> ((0.4275*$weather['temp'])*($weather["wind_speed"]**0.16));}
>     else{
>         $vFeelsLike = $weather['temp'];}
>     if ($vFeelsLike == $weather['temp'] and $weather['temp'] >= 80){
>         $vFeelsLike = 0.5 * ($weather['temp'] + 61.0 + 
> (($weather['temp']-68.0)*1.2) + ($weather['humidity']*0.094));}
>         if ($vFeelsLike >= 80){
>             $vFeelsLike = -42.379 + 2.04901523*$weather['temp'] + 
> 10.14333127*$weather['humidity'] - 
> .22475541*$weather['temp']*$weather['humidity'] - 
> .00683783*$weather['temp']*$weather['temp'] - 
> .05481717*$weather['humidity']*$weather['humidity'] + 
> .00122874*$weather['temp']*$weather['temp']*$weather['humidity'] + 
> .00085282*$weather['temp']*$weather['humidity']*$weather['humidity'] - 
> .00000199*$weather['temp']*$weather['temp']*$weather['humidity']*$weather['humidity'];}
>             if ($weather['humidity'] < 13 and $weather['temp'] >= 80 and 
> $weather['temp'] <= 112){
>                 $vFeelsLike = $vFeelsLike - 
> ((13-$weather['humidity'])/4)*sqrt((17-abs($weather['temp']-95.))/17);}
>                 if ($weather['humidity'] > 85 and $weather['temp'] >= 80 
> and $weather['temp'] <= 87){
>                     $vFeelsLike = $vFeelsLike + 
> (($weather['humidity']-85)/10) * ((87-$weather['temp'])/5);}
>     $weather['realfeel'] =  round($vFeelsLike,1);
>
> Thanks
Jerry 

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/fc2ccbe6-b3d9-4316-bec0-6fec0016025a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to