Go to the documentation of this file.
   52     std::cout << 
"\nTesting CEDate:\n";
 
   72     std::vector<double> greg_20190101 = {2019, 1.0, 1.0, 0.5};
 
   73     double              jd_20190101   = 2458485.0;
 
   78     test_greaterthan(test1.
JD(), jd_20190101, __func__, __LINE__);
 
   82     test_double(test2.JD(), 
base_date_.
JD(), __func__, __LINE__);
 
   86     test_double(test3.JD(), 
base_date_.
JD(), __func__, __LINE__);
 
   89     CEDate test4(greg_20190101);
 
   90     test_double(test4.JD(), jd_20190101, __func__, __LINE__);
 
   94     test_double(test5.JD(), jd_20190101, __func__, __LINE__);
 
  141     test_vect(test1.
GregorianVect(), greg_vec, __func__, __LINE__);
 
  145     std::vector<double> greg_vec2 = greg_vec;
 
  147     greg_vec2[0] = -50000;
 
  149     greg_vec2 = greg_vec;
 
  155     greg_vec2 = greg_vec;
 
  161     greg_vec = {2000, 01, 01, 0.5};
 
  163     double test_mjd  = test_jd - DJM0;
 
  164     double test_greg = 20000101.5;
 
  209     test_greaterthan(test_JD, 2458485.0, __func__, __LINE__);
 
  210     test_lessthan(test_JD, 2468485.0, __func__, __LINE__);
 
  215     test_double(test_GetTime, 140000.0, __func__, __LINE__);
 
  216     test_double(test_GetTime_UTC, 120000.0, __func__, __LINE__);
 
  237     test_double(ut12, test_ut1, __func__, __LINE__);
 
  241     double test_tt(test_ut1 + 63.8285/DAYSEC);
 
  245     test_double(tt2, test_tt, __func__, __LINE__);
 
  249     double test_tdb(test_tt);
 
  253     test_double(tdb2, test_tdb, __func__, __LINE__);
 
  262 int main(
int argc, 
char** argv) 
 
  
virtual bool test_support_methods(void)
Test the various.
 
static double GregorianVect2Gregorian(std::vector< double > gregorian)
Helper method for converting from Gregorian vector format to the non-vector format.
 
virtual bool test_constructor(void)
Test ability to create a CEDate object.
 
virtual double GetTime_UTC() const
Method for getting the current UTC time.
 
virtual bool test_ReturnType(void)
Test ability set the return type.
 
double yp(const double &mjd)
Polar motion (x) for a given modified julian date (radians)
 
virtual bool test_SetDate_JD(void)
Test ability to set julian date.
 
double DayFraction()
Get the Gregorian calendar day fraction.
 
virtual ~test_CEDate()
Destructor.
 
virtual double GetTime(const double &utc_offset=0.0) const
Method for getting the current time.
 
double sec_per_day()
Seconds per day.
 
virtual bool runtests()
Run tests.
 
double xpolar(void) const
Polar motion (x) for a given date.
 
static void UTC2TDB(const double &mjd, double *tdb1, double *tdb2)
Convert the UTC MJD to TDB JD (useful for planet computations)
 
static double ypolar(const double &date, const CEDateType &date_type=CEDateType::JD)
Polar motion (xy for a given date.
 
double julian_date_J2000()
Julian Date corresponding to J2000.
 
static double GregorianVect2JD(std::vector< double > gregorian)
Gregorian calendar vector formatted date -> Julian date converter.
 
static void UTC2UT1(const double &mjd, double *ut11, double *ut12)
Convert the UTC MJD to UT1 JD.
 
double ypolar(void) const
Polar motion (y) for a given date.
 
static double GetMJD2JDFactor()
Gets the stored SOFA Julian date to Mod Julian date factor 'DJM0'.
 
static double GregorianVect2MJD(std::vector< double > gregorian)
Gregorian calendar vector formatted date -> Modified Julian date converter.
 
Gregorian calendar (year, month, day)
 
static double CurrentJD()
Static method for getting the current Julian date.
 
virtual bool test_Gregorian(void)
Test ability to set Gregorian date.
 
int Day()
Get the Gregorian calendar day.
 
virtual bool test_SetDate_MJD(void)
Test ability to set modified julian date.
 
virtual void SetDate(const double &date=CurrentJD(), const CEDateType &time_format=CEDateType::JD)
Set the date based on an actual date and the desired time_format.
 
virtual double MJD() const
Get the Modified Julian date represented by this object.
 
static double xpolar(const double &date, const CEDateType &date_type=CEDateType::JD)
Polar motion (x) for a given date.
 
virtual double GetSecondsSinceMidnight(const double &utc_offset=0.0)
Method for getting the number of seconds since midnight.
 
virtual std::vector< double > GregorianVect()
Get the Gregorian calendar date formatted as a vector.
 
virtual double Gregorian() const
Get the Gregorian calendar date formatted as a double.
 
double dut1(const double &mjd)
Return dut1 based on a given modified julian date (seconds)
 
void SetReturnType(CEDateType return_type)
Set the return type from the overloaded 'operator double'.
 
double dut1(void) const
Return dut1 based on the date represented by this object.
 
int main(int argc, char **argv)
Main method that actually runs the tests.
 
static void UTC2TT(const double &mjd, double *tt1, double *tt2)
Convert the UTC MJD to TT JD.
 
virtual double JD() const
Get the Julian date represented by this object.
 
test_CEDate()
Default constructor.
 
int Year()
Get the Gregorian calendar year.
 
static double dut1(const double &date, const CEDateType &date_type=CEDateType::JD)
Return dut1 based on a given modified date.
 
double xp(const double &mjd)
Polar motion (x) for a given modified julian date (radians)
 
int Month()
Get the Gregorian calendar month.