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);
226 return (ai_year % 4 == 0 && ai_year % 100 != 0) || (ai_year % 400 == 0);
260 void toCalendarDate(
int *pYear,
int *pMonth ,
double *pDom)
const;
262 double toJCenturies()
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;
312 inline std::ostream& operator<<(std::ostream& s,
gTime& ai_gTime)
317 ai_gTime.toCalendarDate(&year, &month , &Dom);
319 s <<
"GMT " << year <<
" " << month <<
":"<<Dom;
323 inline std::ostream& operator<<(std::ostream& s,
gTimeSpan& ai_gTimeSpan)
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 toThetaGMST() const
Calculate Theta Angle at Greenwich Mean Time for the Julian date.
void setTime(int year, double day)
Set the time value of the time object to the julian day of year, day.
double getDblDays() const
Operation: getDblDays() This method returns the total days number stored in the gTimeSpan object...
static gTimeSpan getTimeToUTC()
Returns a gTimeSpan object setted with the Local Time Span setted in the machine. ...
int getMinutes() const
Operation: getMinutes() This method returns the integer Minutes number stored in the gTimeSpan object...
double toThetaLMST(double longitude) const
Calculate Theta Angle at Local Mean Time for the Julian date.
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...
time_t toTime() const
Returns the time_t value of the gTime Object.
static gTime getCurrentTime()
Returns a gTime object setted with the actual machine time.
This class implements time calculations.
double getGmtTm() const
Returns the time GMT value in Julian days.
const gTime & operator=(const gTime &timeSrc)
overload de = operator to assign time values to he object.
double getLocalTm() const
Returns the time Local value in Julian days.
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.