[Phphtmllib-devel] SF.net SVN: phphtmllib:[3190] trunk/open2300/lib/modules/home/widgets/ MetarText
Status: Beta
Brought to you by:
hemna
From: <he...@us...> - 2008-11-07 17:00:32
|
Revision: 3190 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3190&view=rev Author: hemna Date: 2008-11-07 17:00:30 +0000 (Fri, 07 Nov 2008) Log Message: ----------- some form of sky conditions Modified Paths: -------------- trunk/open2300/lib/modules/home/widgets/MetarTextCurrentConditions.inc Modified: trunk/open2300/lib/modules/home/widgets/MetarTextCurrentConditions.inc =================================================================== --- trunk/open2300/lib/modules/home/widgets/MetarTextCurrentConditions.inc 2008-11-07 16:44:03 UTC (rev 3189) +++ trunk/open2300/lib/modules/home/widgets/MetarTextCurrentConditions.inc 2008-11-07 17:00:30 UTC (rev 3190) @@ -65,7 +65,24 @@ $metar .= sprintf("%3.0f",$wind_angle).sprintf("%02.0fKT ",$wind_speed); //we don't have sky conditions. - $metar .= "XXX "; + //this is the best we can do + $fcast = $this->wx->get_forecast(); + switch ($fcast) { + case "Sunny": + $metar .= "CLR "; + break; + case "Cloudy": + $metar .= "OVC "; + break; + + case "Rainy": + $metar .= "-RA "; + break; + + default: + $metar .= "XXX "; + break; + } //temperature and dew point $metar .= WXConversion::fahrenheit_to_celsius($outside_temp, "%02.0f").'/'. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |