Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Metar Decoding / Wind check for Wind Chill #1072

Merged
merged 5 commits into from
Mar 15, 2021
Merged

Fix Metar Decoding / Wind check for Wind Chill #1072

merged 5 commits into from
Mar 15, 2021

Conversation

FatihKoz
Copy link
Contributor

@FatihKoz FatihKoz commented Mar 9, 2021

PR aims to fix the bug #1071 by checking both the wind speed and it's value for starting Wind Chill calculation.

PR aims to fix the bug #1071 by checking both the wind speed and it's value for starting Wind Chill calculation.
@nabeelio nabeelio added the bug label Mar 9, 2021
@nabeelio nabeelio added this to the 7.0.0 milestone Mar 9, 2021
@nabeelio nabeelio linked an issue Mar 9, 2021 that may be closed by this pull request
@nabeelio
Copy link
Owner

Do you have a METAR for this? I can add a test in

@FatihKoz
Copy link
Contributor Author

We have, you can use the one from the bug report ...

EKYT 091020Z /////KT CAVOK 02/M03 Q1019

@nabeelio
Copy link
Owner

D;oh, sorry, didn't see that

@nabeelio
Copy link
Owner

Grr, the push isn't working right

Just add this to MetarTest.php, after line 152

    /**
     * https://github.com/nabeelio/phpvms/issues/1071
     */
    public function testMetarWindSpeedChill()
    {
        $metar = 'EKYT 091020Z /////KT CAVOK 02/M03 Q1019';
        $metar = Metar::parse($metar);

        $this->assertEquals('VFR', $metar['category']);
        $this->assertNull($metar['wind_speed']);
        $this->assertEquals(6.21, $metar['visibility']['mi']);
    }

@FatihKoz
Copy link
Contributor Author

MetarTest update done.

@nabeelio nabeelio merged commit e45bd66 into nabeelio:dev Mar 15, 2021
@FatihKoz FatihKoz deleted the patch-2 branch March 15, 2021 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metar Decoding Error / Wind Chill Calculation
2 participants