WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
WXP::WxTool Class Reference

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 getSAWeather (const char *wx, String &wx_str)
 
static int getWeather (const char *wx, String &wx_str)
 
static int getTextFromWeather (const char *wx, String &wx_str)
 
static const char * getWmoWeather (int wx)
 
static const char * getWmoAutoWeather (int wx)
 
static int getWmoFromWeather (const char *str)
 
static int getWmoFromSAWeather (const char *str)
 
static int getTextFromSAWeather (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

◆ decodeDir()

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

Decodes a direction string into an integer wind direction.

Parameters
dirDirection string
Returns
Integral wind direction

References WXP::Const::MISS.

Referenced by WXP::WatchFile::read().

◆ getCloudStr()

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

Output a descriptive string for cloud cover

Parameters
strInput cloud code
Returns
Descriptive string

◆ getSAWeather()

int WxTool::getSAWeather ( const char *  wx,
String wx_str 
)
static

Converts the METAR weather data to SA weather

Parameters
wxInput METAR weather string
Return values
wx_strOutput SA weather text string

References WXP::String::append(), and WXP::String::copy().

Referenced by WXP::SfcDataTool::compute(), and getTextFromSAWeather().

◆ getTextFromSAWeather()

int WxTool::getTextFromSAWeather ( const char *  str,
String out_str 
)
static

This function creates a textual string containing current weather information.

Parameters
strInput weather string
Return values
out_strOutput descriptive text

References WXP::String::copy(), getSAWeather(), and getWmoWeather().

◆ getTextFromWeather()

int WxTool::getTextFromWeather ( const char *  wx,
String wx_str 
)
static

Decodes the METAR weather data and outputs descriptive text

Parameters
wxMETAR weather data
Return values
wx_strOutput text

References WXP::String::append(), WXP::String::clear(), and WXP::String::length().

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

◆ getWeather()

int WxTool::getWeather ( const char *  wx,
String wx_str 
)
static

Converts the SA weather data to METAR weather

Parameters
wxInput SA weather string
Return values
wx_strOutput METAR weather text string

References WXP::String::copy().

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

◆ getWmoAutoWeather()

const char * WxTool::getWmoAutoWeather ( int  wx)
static

Decodes the synoptic current weather data for automated weather stationsa based on code table 4680.

Parameters
wxCode
Returns
Text weather code

◆ getWmoCeilingToCode()

int WxTool::getWmoCeilingToCode ( float  cb)
static

Converts ceiling into synoptic cloud base code

Parameters
cbCloud ceiling
Returns
Cloud base code

References WXP::Const::MISS.

Referenced by WXP::SfcDataTool::compute().

◆ getWmoCldBase()

float WxTool::getWmoCldBase ( int  cb)
static

Decodes the synoptic cloud base information and returns cloud base in feet.

Parameters
cbCloud base code
Returns
Cloud base in feet

References WXP::Const::MISS.

◆ getWmoFromSAWeather()

int WxTool::getWmoFromSAWeather ( const char *  str)
static

This function converts the weather text to a numerical code based on the WMO code table 4677.

Parameters
strInput weather string
Returns
WMO code

References getWeather(), and getWmoWeather().

◆ getWmoFromWeather()

int WxTool::getWmoFromWeather ( const char *  str)
static

This function converts the weather text to a numerical code based on the WMO code table 4677.

Parameters
strInput weather string
Returns
WMO code

References getWeather().

◆ getWmoVis()

float WxTool::getWmoVis ( int  vis)
static

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

Parameters
visThe integer visibility
Returns
The visibility in miles

References WXP::Const::MISS.

◆ getWmoWeather()

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

Decodes the synoptic weather data based on code table 4677

Parameters
wxCode
Returns
Text code

Referenced by WXP::SfcDataTool::compute(), getTextFromSAWeather(), getWmoFromSAWeather(), WXP::SfcData::outString(), and WXP::SfcCdfFile::read().

◆ setCloud()

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
numNumber of cloud levels
lyrsAn array of cloud layers
Return values
cldA 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: