36 #define DATRW_THIESDL1LINE_CC_VERSION \ 37 "DATRW_THIESDL1LINE_CC V1.1" 41 #include <datrwxx/thiesdl1line.h> 50 const libtime::TRelativeTime
coneday(1);
62 std::cerr <<
" DL1 data line: " << this->
Mdataline;
79 #define DL1_dlassert( C, M, L ) \ 80 if (!(C)) { throw( ExceptionInconsistentLine( M , __FILE__, \ 93 const char cmismatch[]=
"character mismatch";
103 int year, month, day, hour, minute;
104 std::istringstream iss;
106 iss.str(
Mline.substr(13,2));
109 iss.str(
Mline.substr(16,2));
112 iss.str(
Mline.substr(19,2));
115 iss.str(
Mline.substr(22,2));
118 iss.str(
Mline.substr(25,2));
120 if (year < 100) { year += 1900; }
121 if (year < 1970) { year += 100; }
122 libtime::TAbsoluteTime intime(year,month,day,hour,minute);
127 && (intime.month()==month)
128 && (intime.day()==day)
129 && (intime.hour()==hour)
130 && (intime.minute()==minute)),
131 "invalid date value",
Mline);
136 "invalid time value (expected: 24:00UT)",
Mline);
139 && (thedayonly.month()==month)
140 && (thedayonly.day()==day)),
141 "invalid date value",
Mline);
145 double ftime=double(hour)+int(0.5+1000.*
double(minute)/60.)/1000.;
148 iss.str(
Mline.substr(0,6));
150 double diff=ftime-rftime;
151 if (diff<0) { diff=-diff; }
161 "inconsistent floating point time values",
Mline);
164 iss.str(
Mline.substr(7,6));
unsigned int Mcounts
value of sample in counts
std::string Mline
literal data line as received from DL1
static const double gain
gain value in mm/count
std::string line() const
return data line
#define DL1_dlassert(C, M, L)
libtime::TAbsoluteTime Mtime
date and time of this sample
Root namespace of library.
const libtime::TRelativeTime coneday(1)
double Mvalue
value of sample in mm precipitation
const libtime::TRelativeTime chalfminute(0, 0, 0, 30)
virtual void report() const
Screen report.
DataLine(const std::string &line)
swallow data line
virtual void report() const
Screen report.