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:
B.Fatih KOZ
2020-12-21 18:53:50 +03:00
committed by GitHub
parent e4972eaae3
commit a5513b6fbb
2 changed files with 7 additions and 4 deletions

View File

@@ -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']);
}