nidas  v1.2-1520
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 
34 namespace nidas { namespace dynld { namespace isff {
35 
36 using namespace nidas::core;
37 
43 {
44 public:
45 
46  CS_Krypton();
47 
48  CS_Krypton* clone() const;
49 
53  void setKw(float val)
54  {
55  _Kw = val;
56  _pathLengthKw = _pathLength * _Kw;
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  {
83  _pathLength = val;
84  _pathLengthKw = _pathLength * _Kw;
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  throw(nidas::util::InvalidParameterException);
116 
117  void fromDOMElement(const xercesc::DOMElement*)
118  throw(nidas::util::InvalidParameterException);
119 
120 protected:
121 
122  void parseFields(CalFile* cf);
123 
124 private:
125 
126  float _Kw;
127 
128  float _V0;
129 
130  float _logV0;
131 
132  float _pathLength;
133 
134  float _bias;
135 
136  float _pathLengthKw;
137 
138 };
139 
140 }}} // namespace nidas namespace dynld namespace isff
141 
142 #endif
A class for reading ASCII files containing a time series of calibration data.
Definition: CalFile.h:164
void setBias(float val)
Definition: CS_Krypton.h:95
float getKw() const
Definition: CS_Krypton.h:59
void setKw(float val)
Definition: CS_Krypton.h:53
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:61
void setPathLength(float val)
Definition: CS_Krypton.h:81
float getV0() const
Definition: CS_Krypton.h:73
float getBias() const
Definition: CS_Krypton.h:100
float getPathLength() const
Definition: CS_Krypton.h:87
void setV0(float val)
Definition: CS_Krypton.h:67
A data converter from voltage to water vapor density in gm/m^3 for a Campbell Scientfic krypton hygro...
Definition: CS_Krypton.h:42
Definition: VariableConverter.h:69
Definition: InvalidParameterException.h:35