cmfcmf/OpenWeatherMap-PHP-API

Windspeed in Imperial should be mph instead of mps

haydeniv opened this issue · 1 comments

Per: https://openweathermap.org/current

wind
wind.speed Wind speed. Unit Default: meter/sec, Metric: meter/sec, Imperial: miles/hour.

Cmfcmf/OpenWeatherMap/Forecast.php

This code:

        // This is kind of a hack, because the units are missing in the xml document.
        if ($units == 'metric') {
            $windSpeedUnit = 'm/s';
        } else {
            $windSpeedUnit = 'mps';
        }

Should be this:

        // This is kind of a hack, because the units are missing in the xml document.
        if ($units == 'metric') {
            $windSpeedUnit = 'm/s';
        } else {
            $windSpeedUnit = 'mph';
        }

Hi @haydeniv,
thanks for letting me know! I fixed the issue in #115. I'll merge it once CI completes and then release a new version.