27#ifndef NIDAS_DNYLD_ISFF_WIND3D_H
28#define NIDAS_DNYLD_ISFF_WIND3D_H
32#include <nidas/Config.h>
38#include <gsl/gsl_linalg.h>
43namespace dynld {
namespace isff {
63 std::list<const nidas::core::Sample*>& results);
65 void setBias(
int i,
double val);
126 for (
int i = 0; i < 4; i++)
137 for (
int i = 0; i < 4; i++)
343 double _atMatrix[3][3];
345#define COMPUTE_ABC2UVW_INVERSE
346#ifdef COMPUTE_ABC2UVW_INVERSE
347 double _atInverse[3][3];
Adaptive forecaster for despiking of time-series data.
Definition AdaptiveDespiker.h:42
float getDiscLevel() const
If a value is more than discrLevel * sigma away from the mean, then it is considered a spike,...
Definition AdaptiveDespiker.h:77
float getDiscLevelMultiplier() const
Definition AdaptiveDespiker.h:70
float getOutlierProbability() const
Definition AdaptiveDespiker.h:59
A class for reading ASCII files containing a time series of calibration data.
Definition CalFile.h:166
Interface to a data sample.
Definition Sample.h:190
Support for a sensor that is sending packets on a TCP socket, a UDP socket, a Bluetooth RF Comm socke...
Definition SerialSensor.h:65
A class for performing the common processes on wind data from a 3D sonic anemometer.
Definition Wind3D.h:50
void despike(nidas::core::dsm_time_t tt, float *uvwt, int n, bool *spikeOrMissing)
Definition Wind3D.cc:97
void setDiscLevelMultiplier(double val)
Definition Wind3D.h:135
unsigned int _noutVals
Definition Wind3D.h:319
void applyOrientation(nidas::core::dsm_time_t tt, float *uvwt)
Apply orientation changes to the wind components.
Definition Wind3D.cc:205
nidas::core::dsm_sample_id_t _sampleId
Id of output sample.
Definition Wind3D.h:293
void setVazimuth(double val)
Wind vectors in geographic coordinates are expressed by U, the component of the wind blowing toward t...
Definition Wind3D.h:87
double _bias[3]
Definition Wind3D.h:260
nidas::core::dsm_time_t _ttlast[4]
Definition Wind3D.h:258
double getTcOffset() const
Definition Wind3D.h:156
Wind3D()
Definition Wind3D.cc:51
void setTcOffset(double val)
Definition Wind3D.h:151
double getLeanDegrees() const
Definition Wind3D.h:92
void setBias(int i, double val)
Definition Wind3D.cc:124
double getLeanAzimuthDegrees() const
Definition Wind3D.h:101
void setDoTiltCorrection(bool val)
Should 3D tilt corrections be applied?
Definition Wind3D.h:182
bool _horizontalRotation
Should horizontal rotation of U,V be performed?
Definition Wind3D.h:283
int _spdIndex
If user requests wind speed, variable name "spd", its index in the output sample.
Definition Wind3D.h:311
int _ldiagIndex
If user requests "ldiag", its index in the output sample.
Definition Wind3D.h:305
double getVazimuth() const
Definition Wind3D.h:72
nidas::core::CalFile * _oaCalFile
CalFile containing wind offsets and rotation angles.
Definition Wind3D.h:330
double getDiscLevel() const
Definition Wind3D.h:146
void setLeanDegrees(double val)
Definition Wind3D.h:96
void setLeanAzimuthDegrees(double val)
Definition Wind3D.h:105
double _shadowFactor
Transducer shadow (aka flow distortion) correction factor.
Definition Wind3D.h:363
nidas::dynld::isff::WindRotator WindRotator
Definition Wind3D.h:253
bool getDespike() const
Definition Wind3D.h:115
int _diagIndex
If user requests "diag" or "status", its index in the output sample.
Definition Wind3D.h:299
nidas::dynld::isff::WindOrienter WindOrienter
Definition Wind3D.h:252
double getBias(int i) const
Definition Wind3D.h:67
double getTcSlope() const
Definition Wind3D.h:166
void setTcSlope(double val)
Definition Wind3D.h:161
void validate()
Validate the configuration of this sensor.
Definition Wind3D.cc:225
bool _metek
Definition Wind3D.h:266
double _tcOffset
Definition Wind3D.h:276
double _tcSlope
Definition Wind3D.h:278
double getOutlierProbability() const
Definition Wind3D.h:130
nidas::core::AdaptiveDespiker _despiker[4]
Definition Wind3D.h:268
int _dirIndex
If user requests wind direction, variable name "dir", its index in the output sample.
Definition Wind3D.h:317
bool _despike
Definition Wind3D.h:264
void setDoHorizontalRotation(bool val)
Should 2D horizontal rotations of U,V be applied?
Definition Wind3D.h:174
void offsetsTiltAndRotate(nidas::core::dsm_time_t tt, float *uvwt)
Do standard bias removal, tilt correction and horizontal rotation of 3d sonic anemometer data.
Definition Wind3D.cc:211
Wind3D & operator=(const Wind3D &x)
static const int DATA_GAP_USEC
Definition Wind3D.h:256
virtual void checkSampleTags()
Check the SampleTags that are defined for this sensor.
Definition Wind3D.cc:356
bool _tiltCorrection
Should 3D tilt correction be applied?
Definition Wind3D.h:288
double getDiscLevelMultiplier() const
Definition Wind3D.h:141
void setDespike(bool val)
Definition Wind3D.h:110
~Wind3D()
Definition Wind3D.cc:86
void setOutlierProbability(double val)
Definition Wind3D.h:124
bool _allBiasesNaN
Definition Wind3D.h:262
virtual void parseParameters()
Parse the list of nidas::core::Parameter that are associated with this sensor.
Definition Wind3D.cc:234
bool process(const nidas::core::Sample *samp, std::list< const nidas::core::Sample * > &results)
Basic process method for sonic anemometer wind plus temperature: u,v,w,tc parsed from an ASCII sample...
Definition Wind3D.cc:540
unsigned int _numParsed
Number of variables that are parsed from input, i.e.
Definition Wind3D.h:325
WindTilter _tilter
Definition Wind3D.h:272
void setMetek(int ismetek)
Definition Wind3D.h:120
WindRotator _rotator
Definition Wind3D.h:270
void readOffsetsAnglesCalFile(nidas::core::dsm_time_t tt)
Update the settings from the offsets and angles calibration file, if any.
Definition Wind3D.cc:136
void validateSscanfs()
Warn user if number of scanf fields does not match number expected from variables in sample.
Definition Wind3D.cc:397
WindOrienter _orienter
Definition Wind3D.h:274
nidas::dynld::isff::WindTilter WindTilter
Definition Wind3D.h:254
A class for rotating winds according to different orientations of the wind sensor.
Definition WindOrienter.h:45
Rotate a (U,V) 2D wind vector by an angle.
Definition WindRotator.h:39
void setAngleDegrees(double val)
Definition WindRotator.cc:19
double getAngleDegrees() const
Definition WindRotator.cc:14
WindTilter is used to apply a 3d rotation matrix to a wind vector.
Definition WindTilter.h:119
double getLeanAzimuthDegrees() const
Definition WindTilter.h:135
void setLeanDegrees(double val)
Definition WindTilter.h:129
void setLeanAzimuthDegrees(double val)
Definition WindTilter.h:140
double getLeanDegrees() const
Definition WindTilter.h:124
Sample * getSample(sampleType type, unsigned int len)
A convienence method for getting a sample of an enumerated type from a pool.
Definition Sample.cc:70
long long dsm_time_t
Posix time in microseconds, the number of non-leap microseconds since 1970 Jan 1 00:00 UTC.
Definition Sample.h:62
unsigned int dsm_sample_id_t
Definition Sample.h:64
Root namespace for the NCAR In-Situ Data Acquisition Software.
Definition A2DConverter.h:31