Stellarium
23.4
|
This class implements time calculations. More...
#include <gTime.hpp>
Public Member Functions | |
gTime (double ai_jDays=0) | |
gTime (int year, double day) | |
gTime (int nYear, int nMonth, int nDay, int nHour, int nMin, double nSec) | |
gTime (struct tm ai_timestruct) | |
gTime (const gTime &timeSrc) | |
void | setTime (int year, double day) |
Set the time value of the time object to the julian day of year, day. More... | |
const gTime & | operator= (const gTime &timeSrc) |
overload de = operator to assign time values to he object. More... | |
const gTime & | operator= (time_t t) |
overload de = operator to assign time values to he object in time_t (operating system) format. More... | |
const gTime & | operator= (double t) |
overload the = operator to assign time values to the object in julian days. More... | |
double | getGmtTm () const |
Returns the time GMT value in Julian days. More... | |
double | getLocalTm () const |
Returns the time Local value in Julian days. More... | |
time_t | toTime () const |
Returns the time_t value of the gTime Object. More... | |
void | toCalendarDate (int *pYear, int *pMonth, double *pDom) const |
double | toJCenturies () const |
double | toThetaGMST () const |
Calculate Theta Angle at Greenwich Mean Time for the Julian date. More... | |
double | toThetaLMST (double longitude) const |
Calculate Theta Angle at Local Mean Time for the Julian date. More... | |
gTimeSpan | operator- (gTime time) const |
gTime | operator- (gTimeSpan timeSpan) const |
gTime | operator+ (gTimeSpan timeSpan) const |
const gTime & | operator+= (gTimeSpan timeSpan) |
const gTime & | operator-= (gTimeSpan timeSpan) |
bool | operator== (gTime time) const |
bool | operator!= (gTime time) const |
bool | operator< (gTime time) const |
bool | operator> (gTime time) const |
bool | operator<= (gTime time) const |
bool | operator>= (gTime time) const |
Static Public Member Functions | |
static gTime | getCurrentTime () |
Returns a gTime object set with the actual machine time. More... | |
static gTimeSpan | getTimeToUTC () |
Returns a gTimeSpan object set with the Local Time Span set in the machine. More... | |
static bool | isLeapYear (int ai_year) |
Leap Year Calculation. More... | |
This class implements time calculations.
Time is stored in julian days
|
static |
double gTime::getGmtTm | ( | ) | const |
Returns the time GMT value in Julian days.
double gTime::getLocalTm | ( | ) | const |
Returns the time Local value in Julian days.
|
static |
|
inlinestatic |
Leap Year Calculation.
This Operation uses the standard algorithm to calculate Leap Years. Reference: http://en.wikipedia.org/wiki/Leap_year
ai_year | Year number |
overload de = operator to assign time values to he object.
timeSrc | Time to be assigned |
|
inline |
overload the = operator to assign time values to the object in julian days.
[in] | t | Time (JD) to be assigned |
const gTime& gTime::operator= | ( | time_t | t | ) |
overload de = operator to assign time values to he object in time_t (operating system) format.
[in] | t | Time to be assigned |
void gTime::setTime | ( | int | year, |
double | day | ||
) |
Set the time value of the time object to the julian day of year, day.
References:
Astronomical Formulae for Calculators.
Jean Meeus
Chapter 3: Julian Day and Calendar Date. PG's 23, 24, 25
[in] | year | date year |
[in] | day | date day and day fraction. Notice: 1 Jan is day=0 (not 1) |
double gTime::toThetaGMST | ( | ) | const |
Calculate Theta Angle at Greenwich Mean Time for the Julian date.
The return value is the angle, in radians, measuring eastward from the Vernal Equinox to the prime meridian.
References:
Explanatory Supplement to the Astronomical Almanac, page 50. http://books.google.com/books?id=uJ4JhGJANb4C&lpg=PA52&hl=es&pg=PA50#v=onepage&q&f=false "Orbital Coordinate Systems, Part II." Dr. T.Kelzo Satellite Times, 2, no. 2 (November/December 1995): 78-79. https://celestrak.org/columns/v02n02/
double gTime::toThetaLMST | ( | double | longitude | ) | const |
Calculate Theta Angle at Local Mean Time for the Julian date.
[in] | longitude | Geographical longitude for the local meridian. Positive longitude = east longitude Negative longitude = west longitude |