Author Topic: Saratoga AJAX/PHP plugins for Cumulus, VWS updated (*-defs.php)  (Read 1850 times)

0 Members and 1 Guest are viewing this topic.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
I've added some code to the CU-defs.php (Cumulus) and VWS-defs.php, and a new setting in Settings-weather.php ($SITE['overrideRain']) to control display of current conditions when using a METAR as the source ($SITE['conditionsMETAR']).

The overrideRain setting allows your local station rain to override the METAR rain indication (if any) with icon/text as follows:

"Moderate Drizzle" when rain rate is = 0.0 per hour and <#LastRainTipISO> is < 30 minutes ago. (Cumulus ONLY.. VWS doesn't have a tag for it)
"Light Rain" when rain rate is > 0.0 and < 2.5 mm (0.098 in) per hour
"Moderate Rain" when rain rate is >= 2.5 mm (0.098 in) and < 7.6 mm (0.30 in) per hour
"Heavy Rain" when rain rate is >= 7.6 mm (0.30 in) per hour and < 50 mm (2.0 in) per hour
"Violent Rain" when rain rate is >= 50 mm (2.0 in) per hour

If $SITE['overrideRain'] setting is ommitted from Settings-weather.php, the default will be assumed as 'true' to enable the function.

If enabled, the rain words from the METAR will be removed, and the above words used based on the current rain rate.

We finally had enough rain around here to test out the additions :)

Use the updates page (24-Mar-2012) to get the changed *-defs files (and also support for WeatherCat software that was released today).

Sorry to users of WeatherLink, WeatherSnoop and Meteohub .. their software doesn't include the tags needed to support the new function :(

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP