PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Web Services » Services_Weather » Bug #3419

METAR units conversion hard coded

Details

Request #3419METAR units conversion hard coded
Submitted2005-02-09 17:55 UTC
Fromnico at dr-gang dot com
StatusBogus
PackageServices_Weather
PHP Version4.3.10
OSLinux
Roadmaps(Not assigned)

Comments

[2005-02-09 17:55 UTC] nico at dr-gang dot com

Description:
------------
Services_Weather 1.3.1
Metar.php
line 438 says: "Parse wind data, first the speed, convert from kt to chosen unit"
Unfortunately, this is not true, the destination unit is hard coded as "mph".
Same problem with other convertX() methods.

Reproduce code:
---------------
#Suggestion:
#replace
$pointer["wind"] = $this->convertSpeed($result[2], strtolower($result[5]), "mph");

#with
$pointer["wind"] = $this->convertSpeed($result[2], strtolower($result[5]), $this->$_customUnitsFormat["wind"]);

[2005-02-09 18:47 UTC] nico at dr-gang dot com

Isn't it strange, however, to have to convert the data twice?