Index PHPmyEasyWeather PHPmyEasyWeather Homepage

getMetarHumidity

getMetarHumidity -- return humidity out of METAR Code

Description

int getMetarHumidity (string $METAR);

getMetarHumidity returns the humidity measured in % out of a METAR code if temperature and dewpoint is available. If $METAR doesn´t contain temperature information or METAR code syntax is wrong getMetarHumidity will return false.

Humidity only will be returned if both, temperature and dewpoint indicated in $METAR is more than 0 degrees centigrade. If not getMetarHumidity will return false.

Note: Humidity is not contained in a METAR code and there is no accurate formula to convert dewpoint and temperature into the relative air humidity. An exact conversion is only possible on empirical way. Therefore the returned value of the humidity is determined using an approximation technique called the Magnus - equation (by Heinrich Gustav Magnus 1802 - 1870) and will not indicate an exact value.


Previous Up Next