[Phphtmllib-devel] SF.net SVN: phphtmllib:[3508] trunk/open2300/lib/modules/api/ AviationWeather.in
Status: Beta
Brought to you by:
hemna
|
From: <he...@us...> - 2010-06-17 22:37:26
|
Revision: 3508
http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3508&view=rev
Author: hemna
Date: 2010-06-17 22:37:20 +0000 (Thu, 17 Jun 2010)
Log Message:
-----------
moved temp
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-17 22:34:29 UTC (rev 3507)
+++ trunk/open2300/lib/modules/api/AviationWeather.inc 2010-06-17 22:37:20 UTC (rev 3508)
@@ -192,11 +192,11 @@
$now = time();
$wxInfo['Now'] = date('D M j, H:i T',$now);
$timeDiff = floor(($now - $local) / 60);
- if ($timeDiff < 91) $wxInfo['Age'] = "$timeDiff min ago";
+ if ($timeDiff < 91) $wxInfo['Age'] = "$timeDiff min";
else {
$min = $timeDiff % 60;
if ($min < 10) $min = '0' . $min;
- $wxInfo['Age'] = floor($timeDiff / 60) . ":$min hr ago";
+ $wxInfo['Age'] = floor($timeDiff / 60) . ":$min hr";
}
}
@@ -465,10 +465,10 @@
else {
if (preg_match('/^([A-Z]{2,3})([0-9]{3})/',$part,$pieces)) { // codes for CB and TCU are ignored
$wxInfo['Clouds'] = $cloudCode[$pieces[1]];
- if ($pieces[1] == 'VV') {
+// if ($pieces[1] == 'VV') {
$altitude = (integer) 100 * $pieces[2]; // units are feet
$wxInfo['Clouds'] .= " to $altitude ft";
- }
+// }
$metarPtr++;
}
else {
@@ -485,7 +485,7 @@
$hiF += -0.00000199 * pow($tempF, 2) * pow($rh, 2);
$hiF = round($hiF);
$hiC = round(($hiF - 32) / 1.8);
- $wxInfo['HeatIndex'] = "$hiF°F ($hiC°C)";
+ $wxInfo['HeatIndex'] = "$hiC°C ($hiF°F)";
}
}
@@ -499,7 +499,7 @@
$chillF = 35.74 + 0.6215 * $tempF - 35.75 * pow($windspeed, 0.16) + 0.4275 * $tempF * pow($windspeed, 0.16);
$chillF = round($chillF);
$chillC = round(($chillF - 32) / 1.8);
- $wxInfo['WindChill'] = "$chillF°F ($chillC°C)";
+ $wxInfo['WindChill'] = "$chillC°C ($chillF°F)";
}
}
}
@@ -516,14 +516,14 @@
if (preg_match('/^(M?[0-9]{2})\/(M?[0-9]{2}|[X]{2})?$/',$part,$pieces)) {
$tempC = (integer) strtr($pieces[1], 'M', '-');
$tempF = round(1.8 * $tempC + 32);
- $wxInfo['Temperature'] = "$tempF°F ($tempC°C)";
+ $wxInfo['Temperature'] = "$tempC°C ($tempF°F)";
$wxInfo['TempC'] = $tempC;
$wxInfo['TempF'] = $tempF;
$this->get_wind_chill($tempF, $wxInfo);
if (strlen($pieces[2]) != 0 && $pieces[2] != 'XX') {
$dewC = (integer) strtr($pieces[2], 'M', '-');
$dewF = round(1.8 * $dewC + 32);
- $wxInfo['Dewpoint'] = "$dewF°F ($dewC°C)";
+ $wxInfo['Dewpoint'] = "$dewC°C ($dewF°F)";
$wxInfo['DewpointC'] = $dewC;
$wxInfo['DewpointF'] = $dewF;
$rh = round(100 * pow((112 - (0.1 * $tempC) + $dewC) / (112 + (0.9 * $tempC)), 8));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|