Fixes for reported pressure in METAR parsing (#965)
* Update Metar.php The reported pressure was always being assigned as hPa thus resulting display and conversion errors when the reported pressure was inHg. Also the VFR/IFR (VMC/IMC) determination was using minimum 5 nmi and 3000 ft cloud base, it must be 5 km and 3000 ft. With this state, this PR should fix issue #948 and partly fixes issue #963 * MetarTest Fix for inHg/hPa
This commit is contained in:
@@ -77,7 +77,7 @@ class MetarTest extends TestCase
|
||||
$this->assertEquals(24.8, $parsed['dew_point']['f']);
|
||||
|
||||
$this->assertEquals(33, $parsed['humidity']);
|
||||
$this->assertEquals(29.58, $parsed['barometer']['hPa']);
|
||||
$this->assertEquals(29.58, $parsed['barometer']['inHg']);
|
||||
|
||||
$this->assertEquals('AO2 PK WND 27045/2128 PRESRR SLP018 T01221044', $parsed['remarks']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user