[Phphtmllib-devel] SF.net SVN: phphtmllib:[3465] trunk/open2300/lib/modules/api/ AviationWeather.in
Status: Beta
Brought to you by:
hemna
From: <he...@us...> - 2010-06-16 21:24:40
|
Revision: 3465 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3465&view=rev Author: hemna Date: 2010-06-16 21:24:33 +0000 (Wed, 16 Jun 2010) Log Message: ----------- xw Modified Paths: -------------- trunk/open2300/lib/modules/api/AviationWeather.inc Modified: trunk/open2300/lib/modules/api/AviationWeather.inc =================================================================== --- trunk/open2300/lib/modules/api/AviationWeather.inc 2010-06-16 21:15:53 UTC (rev 3464) +++ trunk/open2300/lib/modules/api/AviationWeather.inc 2010-06-16 21:24:33 UTC (rev 3465) @@ -78,23 +78,19 @@ $info[] = array("number" => $runway["runway_number"], "length" => $runway["length"], "width" => $width); - $xw = $this->get_crosswind($runway["runway_number"], $runway["WIND"], $runway[""]); + $xw = $this->get_crosswind($runway["runway_number"], $runway["Wind"]); + $runway["crosswind"] = $xw; } return $info; } - protected function get_crosswind($runway) { - $number = substr($runway,0,2); - $wind = $runway["WIND"]; + protected function get_crosswind($number, $wind) { + $number = substr($runway,0,2)."0"; + $direction = $wind["angle"]; + $speed = $wind["speed"]; - $direction = $runway[""]; - - if (strcasecmp($wind, "calm") == 0) { - $wind = 0; - } - - + return $speed * sine($direction - $number); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |