nidas v1.2.3
CS_Krypton.h
Go to the documentation of this file.
1// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 4; -*-
2// vim: set shiftwidth=4 softtabstop=4 expandtab:
3/*
4 ********************************************************************
5 ** NIDAS: NCAR In-situ Data Acquistion Software
6 **
7 ** 2006, 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_CS_KRYPTON_H
28#define NIDAS_DYNLD_ISFF_CS_KRYPTON_H
29
31
32#include <cmath>
33
34namespace nidas { namespace dynld { namespace isff {
35
36using namespace nidas::core;
37
43{
44public:
45
46 CS_Krypton();
47
48 CS_Krypton* clone() const;
49
53 void setKw(float val)
54 {
55 _Kw = val;
57 }
58
59 float getKw() const
60 {
61 return _Kw;
62 }
63
67 void setV0(float val)
68 {
69 _V0 = val;
70 _logV0 = ::log(_V0);
71 }
72
73 float getV0() const
74 {
75 return _V0;
76 }
77
81 void setPathLength(float val)
82 {
85 }
86
87 float getPathLength() const
88 {
89 return _pathLength;
90 }
91
95 void setBias(float val)
96 {
97 _bias = val;
98 }
99
100 float getBias() const
101 {
102 return _bias;
103 }
104
105 void reset();
106
110 double convert(dsm_time_t t, double volts);
111
112 std::string toString() const;
113
114 void fromString(const std::string&);
115
116 void fromDOMElement(const xercesc::DOMElement*);
117
118protected:
119
120 void parseFields(CalFile* cf);
121
122private:
123
124 float _Kw;
125
126 float _V0;
127
128 float _logV0;
129
131
132 float _bias;
133
135
136};
137
138}}} // namespace nidas namespace dynld namespace isff
139
140#endif
A class for reading ASCII files containing a time series of calibration data.
Definition CalFile.h:166
Definition VariableConverter.h:70
A data converter from voltage to water vapor density in gm/m^3 for a Campbell Scientfic krypton hygro...
Definition CS_Krypton.h:43
void reset()
Reset the converter to invalid or default settings, such as after an error occurs parsing a CalFile.
Definition CS_Krypton.cc:78
float getPathLength() const
Definition CS_Krypton.h:87
CS_Krypton * clone() const
Definition CS_Krypton.cc:46
std::string toString() const
Generate a string description of this VariableConverter.
Definition CS_Krypton.cc:51
float _pathLength
Definition CS_Krypton.h:130
float getBias() const
Definition CS_Krypton.h:100
void fromDOMElement(const xercesc::DOMElement *)
Initialize myself from a xercesc::DOMElement.
Definition CS_Krypton.cc:101
float getV0() const
Definition CS_Krypton.h:73
float _V0
Definition CS_Krypton.h:126
void fromString(const std::string &)
Definition CS_Krypton.cc:56
float _Kw
Definition CS_Krypton.h:124
double convert(dsm_time_t t, double volts)
Convert a voltage to water vapor density in g/m^3.
Definition CS_Krypton.cc:87
CS_Krypton()
Definition CS_Krypton.cc:39
void parseFields(CalFile *cf)
Parse the fields in the current CalFile record for the particular settings and coefficients needed by...
Definition CS_Krypton.cc:65
float _logV0
Definition CS_Krypton.h:128
float _bias
Definition CS_Krypton.h:132
void setBias(float val)
Definition CS_Krypton.h:95
void setKw(float val)
Definition CS_Krypton.h:53
float getKw() const
Definition CS_Krypton.h:59
void setPathLength(float val)
Definition CS_Krypton.h:81
float _pathLengthKw
Definition CS_Krypton.h:134
void setV0(float val)
Definition CS_Krypton.h:67
The essential core classes of nidas.
Definition A2DConverter.h:31
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
Root namespace for the NCAR In-Situ Data Acquisition Software.
Definition A2DConverter.h:31