Thanks for pointing this out! You’re right, OWM Weather isn’t showing the same wind speed labels as OpenWeather since they are not part of their data. Honestly, I’m not sure where my current scale came from.
In the next version of OWM Weather, I am switching to the Beaufort Wind Scale, which should help getting our wind speed labels more in line with OpenWeather.
Appreciate your patience while we sort this out.
function owmw_getWindspeedText($speed)
{
// Beaufort Wind Scale
$windDescriptions = [
73 => __('Hurricane', 'owm-weather'),
64 => __('Violent Storm', 'owm-weather'),
55 => __('Whole Gale/Storm', 'owm-weather'),
47 => __('Strong Gale', 'owm-weather'),
39 => __('Gale', 'owm-weather'),
32 => __('Near Gale', 'owm-weather'),
25 => __('Strong Breeze', 'owm-weather'),
19 => __('Fresh Breeze', 'owm-weather'),
13 => __('Moderate Breeze', 'owm-weather'),
8 => __('Gentle Breeze', 'owm-weather'),
4 => __('Light Breeze', 'owm-weather'),
1 => __('Light Air', 'owm-weather'),
0 => __('Calm', 'owm-weather')
];
foreach ($windDescriptions as $windSpeed => $description) {
if ($speed >= $windSpeed) {
return $description;
}
}
}
Hi @uwejacobs
Thank you.
I looking foreward to get your new update of your great plugin.
I just committed OWM Weather 5.6.15.
@uwejacobs
I was too fast writing it was good.
Now the wind has change and the plugin still show the wrong text of wind speed.
Please see the difference: https://finnsommer.eu/owm-weather/
(Moderate breeze bs. Light breeze)
-
This reply was modified 3 years ago by
FinnSommer.
The wind speed wasn’t converted to mi/h before applying the Beaufort Wind Scale. This should be corrected with 5.6.16.
@uwejacobs
Thank you.
It works correct now with the 5.6.16 update.
-
This reply was modified 3 years ago by
FinnSommer.