39 static const double JDAY_JAN1_00H_1900 = 2415019.5;
40 static const double JDAY_JAN1_12H_1900 = 2415020.0;
41 static const double JDAY_JAN1_12H_2000 = 2451545.0;
42 static const double JDAY_JAN1_00H_1970 = 2440587.5;
44 static const double OMEGA_E = 1.002737909350795;
46 static const int KSEC_PER_MIN = 60;
47 static const int KSEC_PER_HR = 3600;
48 static const int KSEC_PER_DAY = 86400;
49 static const int KMIN_PER_HR = 60;
50 static const int KMIN_PER_DAY = 1440;
51 static const int KHR_PER_DAY = 60;
59 gTimeSpan(
long lDays,
int nHours,
int nMins,
double nSecs);
65 const gTimeSpan& operator=(
const double& timeSpanSrc)
67 m_timeSpan=timeSpanSrc*KSEC_PER_DAY;
121 bool operator==(
gTimeSpan timeSpan)
const;
122 bool operator!=(
gTimeSpan timeSpan)
const;
123 bool operator<(
gTimeSpan timeSpan)
const;
124 bool operator>(
gTimeSpan timeSpan)
const;
125 bool operator<=(
gTimeSpan timeSpan)
const;
126 bool operator>=(
gTimeSpan timeSpan)
const;
148 gTime(
double ai_jDays = 0);
149 gTime(
int year,
double day);
150 gTime(
int nYear,
int nMonth,
int nDay,
int nHour,
int nMin,
double nSec);
151 gTime(
struct tm ai_timestruct);
170 void setTime(
int year,
double day);
184 const gTime& operator=(time_t t);
210 static gTime getCurrentTime();
226 return (ai_year % 4 == 0 && ai_year % 100 != 0) || (ai_year % 400 == 0);
238 double getGmtTm()
const;
244 double getLocalTm()
const;
257 time_t toTime()
const;
260 void toCalendarDate(
int *pYear,
int *pMonth ,
double *pDom)
const;
262 double toJCenturies()
const;
277 double toThetaGMST()
const;
286 double toThetaLMST(
double longitude)
const;
298 bool operator== (
gTime time)
const;
299 bool operator!= (
gTime time)
const;
300 bool operator< (
gTime time)
const;
301 bool operator> (
gTime time)
const;
302 bool operator<= (
gTime time)
const;
303 bool operator>= (
gTime time)
const;
317 ai_gTime.toCalendarDate(&year, &month , &Dom);
319 s <<
"GMT " << year <<
" " << month <<
":"<<Dom;
330 #endif // _GTIME_HPP_ long getDays() const
Operation: getDays() This method returns the integer days number stored in the gTimeSpan object...
int getHours() const
Operation: getHours() This method returns the integer hours number stored in the gTimeSpan object...
double getDblDays() const
Operation: getDblDays() This method returns the total days number stored in the gTimeSpan object...
int getMinutes() const
Operation: getMinutes() This method returns the integer Minutes number stored in the gTimeSpan object...
const gTime & operator=(double t)
overload the = operator to assign time values to the object in julian days.
double getDblSeconds() const
Operation: getDblSeconds() This method returns the total seconds number stored in the gTimeSpan objec...
QDataStream & operator<<(QDataStream &out, const SphericalRegionP ®ion)
Serialize the passed SphericalRegionP into a binary blob.
This class implements time calculations.
const QCPRange operator-(const QCPRange &range, double value)
int getSeconds() const
Operation: getSeconds() This method returns the integer seconds number stored in the gTimeSpan object...
static bool isLeapYear(int ai_year)
Leap Year Calculation.