nidas v1.2.3
NCAR_TRH.h
Go to the documentation of this file.
1// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; -*-
2// vim: set shiftwidth=4 softtabstop=4 expandtab:
3/*
4 ********************************************************************
5 ** NIDAS: NCAR In-situ Data Acquistion Software
6 **
7 ** 2014, Copyright University Corporation for Atmospheric Research
8 **
9 ** This program is free software; you can redistribute it and/or modify
10 ** it under the terms of the GNU General Public License as published by
11 ** the Free Software Foundation; either version 2 of the License, or
12 ** (at your option) any later version.
13 **
14 ** This program is distributed in the hope that it will be useful,
15 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ** GNU General Public License for more details.
18 **
19 ** The LICENSE.txt file accompanying this software contains
20 ** a copy of the GNU General Public License. If it is not found,
21 ** write to the Free Software Foundation, Inc.,
22 ** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 **
24 ********************************************************************
25*/
26
27#ifndef NIDAS_DYNLD_ISFF_NCAR_TRH_H
28#define NIDAS_DYNLD_ISFF_NCAR_TRH_H
29
30#include <vector>
31
34
35namespace nidas { namespace dynld { namespace isff {
36
48{
49public:
50
51 NCAR_TRH();
52
53 ~NCAR_TRH();
54
55 void validate();
56
57 bool process(const nidas::core::Sample* samp,
58 std::list<const nidas::core::Sample*>& results);
59
60 void
61 ifanFilter(std::list<const nidas::core::Sample*>& results);
62
63 double
64 tempFromRaw(double traw);
65
66 double
67 rhFromRaw(double rhraw, double temp_cal);
68
78 void
79 setRawTempCoefficients(float* begin = 0, float* end = 0);
80
90 void
91 setRawRHCoefficients(float* begin = 0, float* end = 0);
92
93 std::vector<float>
95
96 std::vector<float>
98
99private:
100
101 void
103 nidas::core::Variable* var, float* fp);
104
107
110
121
122 float _minIfan;
123 float _maxIfan;
124
132
139
143 std::vector<float> _Ta;
144 std::vector<float> _Ha;
145
148
149 std::vector<VariableIndex> _compute_order;
150
151 void convertNext(const VariableIndex& vi);
152
153 // no copying
155
156 // no assignment
158
159};
160
161}}} // namespace nidas namespace dynld namespace isff
162
163#endif
This is the interface for handling CalFile records as they are read by a VariableConverter.
Definition VariableConverter.h:58
A class for reading ASCII files containing a time series of calibration data.
Definition CalFile.h:166
A typed Sample, with data of type DataT.
Definition Sample.h:394
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 VariableIndex associates a Variable pointer with it's index into it's SampleTag.
Definition VariableIndex.h:52
Class describing a sampled variable.
Definition Variable.h:47
Sensor class for the NCAR hygrothermometer, built at EOL.
Definition NCAR_TRH.h:48
VariableIndex _t
Indices of the processed T and RH variables, in case they need to be replaced with a direct conversio...
Definition NCAR_TRH.h:137
CalFileHandler * _raw_rh_handler
Definition NCAR_TRH.h:147
NCAR_TRH & operator=(const NCAR_TRH &x)
VariableIndex _traw
The indices of the raw T and RH variables are saved in case a calibration record specifies raw conver...
Definition NCAR_TRH.h:130
void ifanFilter(std::list< const nidas::core::Sample * > &results)
Definition NCAR_TRH.cc:380
float _minIfan
Definition NCAR_TRH.h:122
void setRawRHCoefficients(float *begin=0, float *end=0)
Set the five polynomial coefficients which enable converting the raw temperature RH variable RHraw in...
Definition NCAR_TRH.cc:195
VariableIndex _rhraw
Definition NCAR_TRH.h:131
std::vector< float > getRawRHCoefficients()
Definition NCAR_TRH.cc:211
void setRawTempCoefficients(float *begin=0, float *end=0)
Set the three polynomial coefficients which enable converting the raw temperature counts variable Tra...
Definition NCAR_TRH.cc:188
VariableIndex _rh
Definition NCAR_TRH.h:138
double rhFromRaw(double rhraw, double temp_cal)
Definition NCAR_TRH.cc:306
bool process(const nidas::core::Sample *samp, std::list< const nidas::core::Sample * > &results)
Definition NCAR_TRH.cc:347
bool handleRawRH(nidas::core::CalFile *cf)
Definition NCAR_TRH.cc:256
void convertNext(const VariableIndex &vi)
Definition NCAR_TRH.cc:74
NCAR_TRH()
Definition NCAR_TRH.cc:46
nidas::core::CalFileHandler CalFileHandler
Definition NCAR_TRH.h:109
NCAR_TRH(const NCAR_TRH &x)
float _maxIfan
Definition NCAR_TRH.h:123
CalFileHandler * _raw_t_handler
Definition NCAR_TRH.h:146
void validate()
Implementation of DSMSensor::validate for a Character Sensor.
Definition NCAR_TRH.cc:88
bool handleRawT(nidas::core::CalFile *cf)
Definition NCAR_TRH.cc:219
double tempFromRaw(double traw)
Here are the lines from the SHT PIC code.
Definition NCAR_TRH.cc:297
VariableIndex _ifan
In the validate() method the variables generated by this sensor class are scanned,...
Definition NCAR_TRH.h:120
~NCAR_TRH()
Definition NCAR_TRH.cc:67
void convertVariable(nidas::core::SampleT< float > *outs, nidas::core::Variable *var, float *fp)
Definition NCAR_TRH.cc:317
std::vector< float > getRawTempCoefficients()
Definition NCAR_TRH.cc:203
std::vector< float > _Ha
Definition NCAR_TRH.h:144
nidas::core::VariableIndex VariableIndex
Definition NCAR_TRH.h:108
std::vector< float > _Ta
Coefficients for calculating T and RH from the raw counts.
Definition NCAR_TRH.h:143
std::vector< VariableIndex > _compute_order
Definition NCAR_TRH.h:149
Root namespace for the NCAR In-Situ Data Acquisition Software.
Definition A2DConverter.h:31
static int char **FILE * fp
Definition sing.cc:942