This class includes some general weather tools. More...
#include "../include/WxTool.h"
Static Public Member Functions | |
| static int | setCloud (int num, CloudLayer lyrs[], CloudLayer &cld) |
| static float | getWmoVis (int vis) |
| static float | getWmoCldBase (int cb) |
| static int | getMetarWeather (const char *wx, String &wx_str) |
| static int | getMetarWeatherText (const char *wx, String &wx_str) |
| static const char * | getWmoWeather (int wx) |
| static const char * | getWmoAutoWeather (int wx) |
| static int | getWeatherWmo (const char *str) |
| static int | getWeatherText (const char *str, String &out_str) |
| static int | getWmoCeilingToCode (float cb) |
| static float | decodeDir (const char *dir) |
| static const char * | getCloudStr (const char *str) |
This class includes some general weather tools.
| float WxTool::decodeDir | ( | const char * | dir | ) | [static] |
Decodes a direction string into an integer wind direction.
| dir | Direction string |
References WXP::Const::MISS.
| const char * WxTool::getCloudStr | ( | const char * | str | ) | [static] |
Output a descriptive string for cloud cover
| str | Input cloud code |
| int WxTool::getMetarWeather | ( | const char * | wx, | |
| String & | wx_str | |||
| ) | [static] |
Decodes the METAR weather data
| wx | Input METAR weather string |
| wx_str | Output weather text string |
References WXP::String::append(), and WXP::String::copy().
Referenced by WXP::SfcDataTool::compute(), getWeatherText(), getWeatherWmo(), and WXP::SfcData::outString().
| int WxTool::getMetarWeatherText | ( | const char * | wx, | |
| String & | wx_str | |||
| ) | [static] |
Decodes the METAR weather data and outputs descriptive text
| wx | METAR weather data |
| wx_str | Output text |
References WXP::String::append(), WXP::String::clear(), and WXP::String::length().
Referenced by WXP::SfcData::print(), and WXP::SfcData::weatherText().
| int WxTool::getWeatherText | ( | const char * | str, | |
| String & | out_str | |||
| ) | [static] |
This function creates a textual string containing current weather information.
| str | Input weather string |
| out_str | Output descriptive text |
References WXP::String::copy(), getMetarWeather(), and getWmoWeather().
| int WxTool::getWeatherWmo | ( | const char * | str | ) | [static] |
This function converts the weather text to a numerical code based on the WMO code table 4677.
| str | Input weather string |
References getMetarWeather(), and getWmoWeather().
| const char * WxTool::getWmoAutoWeather | ( | int | wx | ) | [static] |
Decodes the synoptic current weather data for automated weather stationsa based on code table 4680.
| wx | Code |
| int WxTool::getWmoCeilingToCode | ( | float | cb | ) | [static] |
Converts ceiling into synoptic cloud base code
| cb | Cloud ceiling |
References WXP::Const::MISS.
Referenced by WXP::SfcDataTool::compute().
| float WxTool::getWmoCldBase | ( | int | cb | ) | [static] |
Decodes the synoptic cloud base information and returns cloud base in feet.
| cb | Cloud base code |
References WXP::Const::MISS.
| float WxTool::getWmoVis | ( | int | vis | ) | [static] |
Decodes the synoptic visibility data from WMO code table and returns visibility in miles.
| vis | The integer visibility |
References WXP::Const::MISS.
| const char * WxTool::getWmoWeather | ( | int | wx | ) | [static] |
Decodes the synoptic weather data based on code table 4677
| wx | Code |
Referenced by WXP::SfcDataTool::compute(), getWeatherText(), getWeatherWmo(), WXP::SfcData::outString(), and WXP::SfcCdfFile::read().
| int WxTool::setCloud | ( | int | num, | |
| CloudLayer | lyrs[], | |||
| CloudLayer & | cld | |||
| ) | [static] |
Sets a overall cloud coverage and height parameter from multiple levels. Thin clouds are not included. The cloud height or ceiling is the level of the lowest broken or overcast level. If there are no broken or overcast levels, the lowest scattered level is used.
| num | Number of cloud levels | |
| lyrs | An array of cloud layers |
| cld | A single representative cloud layer |
References WXP::Const::MISS.
Referenced by WXP::SfcDataTool::compute(), and WXP::SfcData::outString().
1.6.1