[Phphtmllib-devel] SF.net SVN: phphtmllib:[3524] trunk/open2300/lib/modules/api/ AviationWeather.in
Status: Beta
Brought to you by:
hemna
From: <he...@us...> - 2010-06-28 23:25:30
|
Revision: 3524 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3524&view=rev Author: hemna Date: 2010-06-28 23:25:24 +0000 (Mon, 28 Jun 2010) Log Message: ----------- new d_alt 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-28 23:22:38 UTC (rev 3523) +++ trunk/open2300/lib/modules/api/AviationWeather.inc 2010-06-28 23:25:24 UTC (rev 3524) @@ -705,34 +705,6 @@ } - /** - * - * @param unknown_type $altitude -- airport altitude - * @param unknown_type $Pmb -- pressure in millibars - * * @param unknown_type $PinHg -- pressure in inches of Mercury - * @param unknown_type $temp -- degress Celcius - * @param unknown_type $dewpoint -- degress Celcius - * @return unknown_type - * - * @link http://www.4wx.com/wxcalc/formulas/densityAltitude.php - */ - protected function density_altitude($altitude, $Pmb, $PinHg, $tempC, $dewC) { - $this->e_calc($altitude, $Pmb, $PinHg, $tempC, $dewC); - - //get vapor pressure ($Vp) - $Vp = $this->vapor_pressure($dewC); - - //get virtual Temp $Tv (in Kelvin) - $TvK = ($tempC / (1-($Vp / $Pmb) * (1-0.622))); - - //convert temp to Rankine - $TvR = (9/5) * ($TvK + 764.84); - - //get density altitude - $Ad = 145366 * ( 1 - pow( ((17.326*$PinHG) / $TvR), 0.235) ); - - return $Ad; - } private function vapor_pressure($dewC) { @@ -814,7 +786,7 @@ } - private function e_calc($altitude, $Pmb, $PinHg, $tempC, $dewC) { + private function density_altitude($altitude, $Pmb, $PinHg, $tempC, $dewC) { $in_per_mb = (1/33.86389); $mb_per_in = 33.86389; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |