nidas v1.2.3
ParoSci_202BG_Calibration.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 ** 2008, 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#ifndef NIDAS_DYNLD_PAROSCI_202BG_CALIBRATION_h
27#define NIDAS_DYNLD_PAROSCI_202BG_CALIBRATION_h
28
29#include <nidas/core/Sample.h>
30#include <nidas/core/CalFile.h>
32
33using namespace nidas::core;
34
35namespace nidas { namespace dynld {
36
41
42public:
43
45
50
51 void setU0(float val) { _U0 = val; }
52
53 void setYs(float v0, float v1, float v2, float v3)
54 {
55 _Y[0] = v0; _Y[1] = v1; _Y[2] = v2; _Y[3] = v3;
56 }
57
58 void setCs(float v0, float v1, float v2)
59 {
60 _C[0] = v0; _C[1] = v1; _C[2] = v2;
61 }
62
63 void setDs(float v0, float v1)
64 {
65 _D[0] = v0; _D[1] = v1;
66 }
67
68 void setTs(float v0, float v1, float v2, float v3, float v4)
69 {
70 _T[0] = v0; _T[1] = v1; _T[2] = v2; _T[3] = v3; _T[4] = v4;
71 }
72
73 void setCommonModeCoefs(float v0, float v1, float v2, float v3)
74 {
75 _a[0] = v0; _a[1] = v1; _b = v2; _P0 = v3;
76 }
77
78 float getU0() const { return _U0; }
79
80 double computeTemperature(double usec);
81
82 double computePressure(double tper, double pper);
83
84 double correctPressure(double pgauge, double pstatic);
85
86private:
87
88
89 float _U0;
90
91 float _Y[4];
92
93 float _C[3];
94
95 float _D[2];
96
97 float _T[5];
98
99 float _a[2];
100
101 float _b;
102
103 float _P0;
104
105};
106
107}} // namespace nidas namespace dynld
108
109#endif
A class for reading ASCII files containing a time series of calibration data.
Definition CalFile.h:166
Support for reading a calibration file for a ParoScientific 202BG sensor.
Definition ParoSci_202BG_Calibration.h:40
double computePressure(double tper, double pper)
Definition ParoSci_202BG_Calibration.cc:90
float _Y[4]
Definition ParoSci_202BG_Calibration.h:91
void setTs(float v0, float v1, float v2, float v3, float v4)
Definition ParoSci_202BG_Calibration.h:68
float _P0
Definition ParoSci_202BG_Calibration.h:103
void setU0(float val)
Definition ParoSci_202BG_Calibration.h:51
float _D[2]
Definition ParoSci_202BG_Calibration.h:95
float _C[3]
Definition ParoSci_202BG_Calibration.h:93
float _a[2]
Definition ParoSci_202BG_Calibration.h:99
void setDs(float v0, float v1)
Definition ParoSci_202BG_Calibration.h:63
void readCalFile(nidas::core::CalFile *cf, dsm_time_t tt)
Definition ParoSci_202BG_Calibration.cc:51
void setCommonModeCoefs(float v0, float v1, float v2, float v3)
Definition ParoSci_202BG_Calibration.h:73
float _U0
Definition ParoSci_202BG_Calibration.h:89
void setCs(float v0, float v1, float v2)
Definition ParoSci_202BG_Calibration.h:58
float _T[5]
Definition ParoSci_202BG_Calibration.h:97
float _b
Definition ParoSci_202BG_Calibration.h:101
float getU0() const
Definition ParoSci_202BG_Calibration.h:78
double computeTemperature(double usec)
Definition ParoSci_202BG_Calibration.cc:84
double correctPressure(double pgauge, double pstatic)
Definition ParoSci_202BG_Calibration.cc:100
ParoSci_202BG_Calibration()
Definition ParoSci_202BG_Calibration.cc:38
void setYs(float v0, float v1, float v2, float v3)
Definition ParoSci_202BG_Calibration.h:53
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