Re: Now available: AJAX/PHP multilingual website templates
Posted: Fri 16 Sep 2011 1:14 am
Yes, there's a function in the CU-defs.php that sets both the $feelslike and $heatcolourword. The ajaxCUwx.js has a function for determining what 'heatcolourword' should be used based on the realtime.txt, and what 'feelslike' should be updated too.beteljuice wrote:So are you saying that you have a function to specifically change Cumulus 'feels like', and if so, is it optional ?The apparent temperature reported by Cumulus uses the Australian BOM calculation for it's value. Even though the current CU-defs.php assigns the Cumulus apparent temperature to the $feelslike value, it is overridden by
Code:
list($feelslike,$heatcolourword) = CU_setFeelslike ($temperature,$windch,$heati,$uomtemp);
further on in the code which overrides the $feelslike = $WX['apptemp'];
Thinking further along, for all users of your code ....
User 'feels like' Options to be ..
- Station set
'Saratoga' reasoning
Austrailian BOM reasoning
I think what you'd proposed about a Settings-weather.php setting to allow folks to pick which variety of 'feelslike' should be used in their area is a good idea. I'll do that (and see how to feed the selection to the ajax script too).
Each of the weather software packages offer some type of index reflecting how the current conditions 'feel' to mere humans, but they're all a bit different:
Weather-display sets %feelslike% tag based on temperature, wind-chill, and humidex. It also has an apparent temp tag (per AU BOM calcs).
VWS sets ^vxv027^ with the Virtual Temperature (but I can't find the computational basis for that in the VWS docs)
Weather-Link sets <!--thw--> which adds Wind to the temp/humidity calc (according to Davis app note 28).
Meteohub doesn't offer a specific variable for 'feelslike', but does have the usual suspects (heat-index, humidex).
Cumulus has tags for heat-index, humidex, and the apparent temperature (per AU BOM calc)
Whew... So for station geographical location and weather software used, there is no current 'best fit' for all.
Geographically, the USA prefers heat-index, Canada prefers humidex, and AU prefers Apparent temp .. other countries likely use heat-index (just a guess on my part).
I'll do up the mods so Cumulus users can pick heat-index, humidex or apparent temp to use when 'heat' is the issue, and wind-chill will be used for all the low-temperature events.
Best regards,
Ken