Read the statement by Michael Teeuw here.
default Weather, current with wethergov issues
-
-
I figured out the Feels like being 32F, it’s getting a null in the heat index from weather.gov. I’ve added code to check for null and use the currentWeather.temperature instead. I’ll send diffs later (where do I send them?) when I’ve finished with the windSpeed.
if(currentWeatherData.heatIndex.value) { currentWeather.feelsLikeTemp = this.convertTemp(currentWeatherData.heatIndex.value); } else { // If null, set it to the current temperature currentWeather.feelsLikeTemp = currentWeather.temperature; }
Sorry it took so long for me to figure out this env. I’m using the browser to debug now. I’ve not done this much. :-)
-
Okay, I see the issue with windSpeed. The URL returns windSpeed in km_h-1 (k/h), the convertSpeed(metSec) function appears to be m/s. I’m not sure how to fix this for general use. I’ll try to fix it for my use first.
-
@linuxha google search on conversion says divide the km/h by 3.6 to get m/s
-
@sdetweil , thanks, I did find those but I’m also trying to figure out a way so when I change the code it doesn’t break the existing. I’m just giving it thought now.
To convert kph to mph: *0.621371. I 'm used to MPH and m/s or kph wouldn’t register with me. I can handle temperatures and distance in metric but not wind speeds.
-
Ah feels like also needs to consider “windChill” & “heatIndex”. I’m betting they’re mutually exclusive.
-
I think the weather.gov API using /points/ has been deprecated. It switched to gridpoints/{wfo}/{x}/{y}. I am not skilled enough to know what to switch in the config file to make it work.