nidas  v1.2-1520
Public Member Functions | Protected Attributes | List of all members
nidas::dynld::isff::WindOrienter Class Reference

A class for rotating winds according to different orientations of the wind sensor. More...

#include <WindOrienter.h>

Public Member Functions

 WindOrienter ()
 
void applyOrientation (float *uvwt)
 Apply orientation changes to the wind components. More...
 
void setOrientation (const std::string &orientation, const std::string &name="")
 Parse the orientation parameter and set the vectors which translate the axes and signs of the wind sensor components. More...
 
bool handleParameter (const nidas::core::Parameter *parameter, const std::string &name)
 If the given parameter is "orientation", call setOrientation() with the value. More...
 

Protected Attributes

bool _unusualOrientation
 Is the sonic oriented in a unusual way, e.g. More...
 
int _tx [3]
 Index transform vector for wind components. More...
 
int _sx [3]
 Wind component sign conversion. More...
 

Detailed Description

A class for rotating winds according to different orientations of the wind sensor.

Constructor & Destructor Documentation

WindOrienter::WindOrienter ( )

References _sx, and _tx.

Member Function Documentation

void WindOrienter::applyOrientation ( float *  uvwt)

Apply orientation changes to the wind components.

References _sx, _tx, and _unusualOrientation.

Referenced by setOrientation().

bool WindOrienter::handleParameter ( const nidas::core::Parameter parameter,
const std::string &  name 
)

If the given parameter is "orientation", call setOrientation() with the value.

Throws InvalidParameterException if the parameter is the wrong length or type or the value does not match one of the supported orientations. Return true if the parameter was handled, false otherwise. Pass name to include a sensor name in log and exception messages.

References nidas::core::Project::expandString(), nidas::core::Project::getInstance(), nidas::core::Parameter::getLength(), nidas::core::Parameter::getName(), nidas::core::Parameter::getStringValue(), nidas::core::Parameter::getType(), setOrientation(), and nidas::core::Parameter::STRING_PARAM.

void WindOrienter::setOrientation ( const std::string &  orientation,
const std::string &  name = "" 
)

Parse the orientation parameter and set the vectors which translate the axes and signs of the wind sensor components.

The parameter must be one string: 'normal' (default), 'down', 'lefthanded', 'flipped' or 'horizontal'. Throws InvalidParameterException if the string cannot be parsed. Pass name to include an identifying name in log messages about which sensor is being oriented.

References _sx, _tx, _unusualOrientation, applyOrientation(), and DLOG.

Referenced by handleParameter().

Member Data Documentation

int nidas::dynld::isff::WindOrienter::_sx[3]
protected

Wind component sign conversion.

Also used for unusual sonic orientations, as when the sonic is hanging down, and the sign of v is flipped.

Referenced by applyOrientation(), setOrientation(), and WindOrienter().

int nidas::dynld::isff::WindOrienter::_tx[3]
protected

Index transform vector for wind components.

Used for unusual sonic orientations, as when the sonic is hanging down, when the usual sonic w axis becomes the new u axis, u becomes w and v becomes -v.

Referenced by applyOrientation(), setOrientation(), and WindOrienter().

bool nidas::dynld::isff::WindOrienter::_unusualOrientation
protected

Is the sonic oriented in a unusual way, e.g.

upside-down, etc?

Referenced by applyOrientation(), and setOrientation().


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