WXP::WxTool Class Reference

This class includes some general weather tools. More...

#include "../include/WxTool.h"

List of all members.

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)

Detailed Description

This class includes some general weather tools.

Author:
Dan Vietor

Member Function Documentation

float WxTool::decodeDir ( const char *  dir  )  [static]

Decodes a direction string into an integer wind direction.

Parameters:
dir Direction string
Returns:
Integral wind direction

References WXP::Const::MISS.

const char * WxTool::getCloudStr ( const char *  str  )  [static]

Output a descriptive string for cloud cover

Parameters:
str Input cloud code
Returns:
Descriptive string
int WxTool::getMetarWeather ( const char *  wx,
String wx_str 
) [static]

Decodes the METAR weather data

Parameters:
wx Input METAR weather string
Return values:
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

Parameters:
wx METAR weather data
Return values:
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.

Parameters:
str Input weather string
Return values:
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.

Parameters:
str Input weather string
Returns:
WMO code

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.

Parameters:
wx Code
Returns:
Text weather code
int WxTool::getWmoCeilingToCode ( float  cb  )  [static]

Converts ceiling into synoptic cloud base code

Parameters:
cb Cloud ceiling
Returns:
Cloud base code

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.

Parameters:
cb Cloud base code
Returns:
Cloud base in feet

References WXP::Const::MISS.

float WxTool::getWmoVis ( int  vis  )  [static]

Decodes the synoptic visibility data from WMO code table and returns visibility in miles.

Parameters:
vis The integer visibility
Returns:
The visibility in miles

References WXP::Const::MISS.

const char * WxTool::getWmoWeather ( int  wx  )  [static]

Decodes the synoptic weather data based on code table 4677

Parameters:
wx Code
Returns:
Text 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.

Parameters:
num Number of cloud levels
lyrs An array of cloud layers
Return values:
cld A single representative cloud layer

References WXP::Const::MISS.

Referenced by WXP::SfcDataTool::compute(), and WXP::SfcData::outString().


The documentation for this class was generated from the following files:

Generated on 8 Jan 2010 for WXP C++ Library by  doxygen 1.6.1