[Phphtmllib-devel] SF.net SVN: phphtmllib:[3192] trunk/open2300/lib/modules/home/widgets/ MetarText
Status: Beta
Brought to you by:
hemna
From: <he...@us...> - 2008-11-07 19:46:53
|
Revision: 3192 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3192&view=rev Author: hemna Date: 2008-11-07 19:46:40 +0000 (Fri, 07 Nov 2008) Log Message: ----------- try and get rounded wind speeds 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 18:06:31 UTC (rev 3191) +++ trunk/open2300/lib/modules/home/widgets/MetarTextCurrentConditions.inc 2008-11-07 19:46:40 UTC (rev 3192) @@ -60,9 +60,10 @@ //now do wind $wind_dir = $this->wx->get_wind_direction(); $wind_angle = $this->wx->get_wind_angle(); - $wind_speed = WXConversion::mph_to_knots($this->wx->get_wind_speed()); + $speed = round($this->wx->get_wind_speed(),0); + $wind_speed = WXConversion::mph_to_knots($speed,"%02.0fKT "); - $metar .= sprintf("%3.0f",$wind_angle).sprintf("%02.0fKT ",$wind_speed); + $metar .= sprintf("%3.0f",$wind_angle).$wind_speed; //we don't have sky conditions. //this is the best we can do This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |