Home » Web Services » Services_Weather » Bug #3419
METAR units conversion hard coded
Details
| Request #3419 | METAR units conversion hard coded |
|---|---|
| Submitted | 2005-02-09 17:55 UTC |
| From | nico at dr-gang dot com |
| Status | Bogus |
| Package | Services_Weather |
| PHP Version | 4.3.10 |
| OS | Linux |
| 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?