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

This structure defines wind values (dir,spd) More...

#include "../include/Wind.h"

Public Member Functions

 Wind (float d, float s)
 
 Wind ()
 
int init ()
 
int set (float d, float s)
 
int set (Vect &v)
 
int setDir (float val)
 
float getDir ()
 
int setSpd (float val)
 
float getSpd ()
 
int setVect (float u, float v)
 
int toVect (Vect &vect)
 
Vect toVect ()
 
int print ()
 

Static Public Member Functions

static Vect toVect (float dir, float spd)
 
static Wind interp (Wind &w1, Wind &w2, float p1, float p2, float pr)
 

Public Attributes

float dir
 
float spd
 

Detailed Description

This structure defines wind values (dir,spd)

Author
Dan Vietor

Constructor & Destructor Documentation

◆ Wind() [1/2]

Wind::Wind ( float  d,
float  s 
)

Constructor. Sets the values

Parameters
dDirection
sSpeed

References set().

◆ Wind() [2/2]

Wind::Wind ( )

Constructor

References init().

Member Function Documentation

◆ getDir()

float WXP::Wind::getDir ( )
inline

Gets the driection

◆ getSpd()

float WXP::Wind::getSpd ( )
inline

Gets the speed

Referenced by WXP::VectPlot::draw().

◆ init()

int Wind::init ( )

Initializes the values

References WXP::Const::MISS.

Referenced by setVect(), and Wind().

◆ interp()

Wind Wind::interp ( Wind w1,
Wind w2,
float  p1,
float  p2,
float  pr 
)
static

Wind interpolated between two pressure levels

Parameters
w1Wind at bottom of the layer
w2Wind at top of the layer
p1Pressure in mb at bottom of the layer
p2Pressure in mb at top of the layer
prPressure in mb at level of interest
Returns
Interpolcated wind

References WXP::Const::MISS, set(), and toVect().

◆ print()

int Wind::print ( )

Prints the values

◆ set() [1/2]

int Wind::set ( float  d,
float  s 
)

◆ set() [2/2]

int Wind::set ( Vect v)

Sets the values from vector. Converts to dir and spd

Parameters
vVector

References setVect().

◆ setDir()

int WXP::Wind::setDir ( float  val)
inline

Sets the direction

Parameters
valDirection

◆ setSpd()

int WXP::Wind::setSpd ( float  val)
inline

Sets the speed

Parameters
valSpeed

Referenced by WXP::VectPlot::draw().

◆ setVect()

int Wind::setVect ( float  u,
float  v 
)

Sets the wind based on vector values

Parameters
uU wind component
vV wind component

References init(), WXP::Const::MISS, WXP::Calc::windDir(), and WXP::Calc::windSpd().

Referenced by WXP::VectPlot::draw(), and set().

◆ toVect() [1/3]

Vect Wind::toVect ( )

Converts wind to vector

Returns
Vector output

References toVect().

Referenced by toVect().

◆ toVect() [2/3]

Vect Wind::toVect ( float  dir,
float  spd 
)
static

Converts to vector

Parameters
dirDirection
spdSpeed
Returns
Vector

References WXP::Const::MISS, WXP::Calc::windU(), and WXP::Calc::windV().

◆ toVect() [3/3]

int Wind::toVect ( Vect vect)

Converts wind to vector

Return values
vectVector output

References WXP::Const::MISS, WXP::Calc::windU(), and WXP::Calc::windV().

Referenced by interp().


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