cvs: pear /Services_Weather/Weather Metar.php
| From: | Alexander Wirtz | Date: | Mon, 06 Oct 2003 10:53:00 +0000 |
| Subject: | cvs: pear /Services_Weather/Weather Metar.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-13414@lists.php.net to get a copy of this message | ||
eru Mon Oct 6 06:53:00 2003 EDT
Modified files:
/pear/Services_Weather/Weather Metar.php
Log:
*Improved searchtime in searchAirport(), cartesian coordinates are now calculated at DB-build-time
Index: pear/Services_Weather/Weather/Metar.php
diff -u pear/Services_Weather/Weather/Metar.php:1.11 pear/Services_Weather/Weather/Metar.php:1.12
--- pear/Services_Weather/Weather/Metar.php:1.11 Sun Oct 5 19:44:15 2003
+++ pear/Services_Weather/Weather/Metar.php Mon Oct 6 06:52:59 2003
@@ -16,7 +16,7 @@
// | Authors: Alexander Wirtz <alex@pc4p.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Metar.php,v 1.11 2003/10/05 23:44:15 eru Exp $
+// $Id: Metar.php,v 1.12 2003/10/06 10:52:59 eru Exp $
require_once "Services/Weather/Common.php";
@@ -717,7 +717,7 @@
}
// Get all airports
- $select = "SELECT icao, latitude, longitude FROM metarAirports";
+ $select = "SELECT icao, x, y, z FROM metarAirports";
$result = $this->_db->query($select);
if (DB::isError($result)) {
return $result;
@@ -732,7 +732,7 @@
$search = array("dist" => array(), "icao" => array());
while (($row = $result->fetchRow(DB_FETCHMODE_ASSOC)) != null) {
$icao = $row["icao"];
- $air = $this->polar2cartesian($row["latitude"],
$row["longitude"]);
+ $air = array($row["x"], $row["y"], $row["z"]);
$dist = 0;
$d = 0;