| Index | PHPmyEasyWeather | PHPmyEasyWeather Homepage |
getWeatherGrafic -- return the name of an actual weather grafic out of the weatherpics directory.
string getWeatherGrafic(string $METAR_TAF, string $ICAO);
getWeatherGrafic returns the name of a weather grafic for the current situation ($METAR) and the location indicated by $ICAO. getWeatherGrafic considers cloud coverage, weather situation like haze, dust, rain, snow... (superordinated) and thunderstorm (superordinates all other weather indications). It also considers the localtime and therefore the returned grafic name includes day and night and also sunrise and sunset periods (during 2 hours around the exact time of rising and going down).
getWeatherGrafic never returns false, at least there will be returned: "fragezeichen.jpg" what is the german word for question mark. The whole range of returned filenames (including fragezeichen.jpg) is contained in the weatherpics directory in the PHPmyEasyWeather package.
Note: You might ask why to consign the ICAO code to this function, it should be already included in the METAR or TAF code. The answer is: yes and no. Remember: The first function which has to parse each METAR or TAF code is the getMetarParts or getTafParts function, and therefore it may be METAR or TAF code doesn´t contain the ICAO airport code. The only functions to use without getMetarParts / getTafParts are the display - functions.
| Previous | Up | Index |