nidas
v1.2-1520
|
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... | |
A class for rotating winds according to different orientations of the wind sensor.
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().
|
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().
|
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().
|
protected |
Is the sonic oriented in a unusual way, e.g.
upside-down, etc?
Referenced by applyOrientation(), and setOrientation().