12 #include "TObjArray.h"
13 #include "TObjString.h"
17 #define INT_4U unsigned int
19 #define UTC_UNIX_SPAN 315964800
20 #define TAI_GPS_LEAPS_SPAN 19
22 #define GPS_LEAPS_TABLE_SIZE 19
72 Time(
TString date) {tzset();setenv(
"TZ",
":UTC", 1);SetDateString(date);}
96 Time& operator*=(
double& d);
97 Time& operator/=(
double& d);
124 void SetDouble(
double dt);
130 void SetDate(
int ss,
int mm,
int hh,
int DD,
int MM,
int YY,
int nsec = 0);
133 void SetDateString(
TString date);
134 void SetString(
char* date,
int nsec = 0);
137 SetDateString(GetDateString().Replace(0,4,str,4)(0,19));}
140 SetDateString(GetDateString().Replace(5,2,str,2)(0,19));}
143 SetDateString(GetDateString().Replace(8,2,str,2)(0,19));}
146 SetDateString(GetDateString().Replace(11,2,str,2)(0,19));}
149 SetDateString(GetDateString().Replace(14,2,str,2)(0,19));}
152 SetDateString(GetDateString().Replace(17,2,str,2)(0,19));}
157 TString date = GetDateString();
159 return 1+(GetSec()-
Time(begin_of_year).
GetSec())/86400.;}
161 TString date = GetDateString();
165 TString date = GetDateString();
167 return month.Atoi();}
169 TString date = GetDateString();
173 TString date = GetDateString();
177 TString date = GetDateString();
179 return minute.Atoi();}
181 TString date = GetDateString();
183 return second.Atoi();}
189 << gps_leaps_table[
i].
gps <<
" "
190 << gps_leaps_table[
i].
gps_utc << endl;}
197 double GetJulianDate();
198 double GetModJulianDate();
201 int UnixToGpsLeaps(
int unix_time);
231 void Error(
char* msg) {cout <<
"CWB::Time:Error " << msg << endl;
exit(1);}
wavearray< double > t(hp.size())
int GpsToGpsLeaps(int gpsSec)
void SetMonth(unsigned int month)
double min(double x, double y)
void SetDay(unsigned int day)
Time operator-(Time &t1, Time &t2)
int GpsToTaiLeaps(int gps)
void SetYear(unsigned int year)
Time operator+(Time &t1, Time &t2)
static Time Time_MAX(0x7FFFFFFF, 999999999)
int UnixToTaiLeaps(int unix_time)
INT_4U SetNSec(INT_4U nsec)
cout<< "Selected Pixels : "<< nPix<< endl;wc.cluster(1, 1);SSeries< double > ss
istream & operator>>(istream &in, Time &time)
#define GPS_LEAPS_TABLE_SIZE
ostream & operator<<(ostream &out, Time &time)
void SetSecond(unsigned int sec)
Time operator*(double &d, Time &t)
static const gps_leap gps_leaps_table[GPS_LEAPS_TABLE_SIZE]
Time operator/(Time &t, double &d)
#define TAI_GPS_LEAPS_SPAN
void SetHour(unsigned int hour)
void SetMinute(unsigned int min)