CppEphem
|
CECorrections class handles downloading and retrieving corrections from the IERS bulletins. Current corrections obtainable:
The way this is done is by downloading the corrections data on the fly from: http://maia.usno.navy.mil/ser7/finals2000A.all The downloaded file will be stored locally to prevent the need to re-download it every time it is needed in the future.
IMPORTANT NOTE: These correction values should only be accessed through the CppEphem namespace, and not by directly querying this class. This prevents creating multiple CECorrections objects that could be resource intensive.
Definition at line 28 of file CECorrections.h.
Public Member Functions | |
CECorrections () | |
Constructor for coordinate corrections object. More... | |
CECorrections (const CECorrections &other) | |
Copy constructor. More... | |
double | deps (const double &mjd) const |
Return the offset in obliquity correction parameter (radians) More... | |
double | dpsi (const double &mjd) const |
Return the offset in longitude correction parameter (radians) More... | |
double | dut1 (const double &mjd) const |
Return the DUT1 correction parameter (represents UT1 - UTC in seconds) More... | |
std::string | NutationFile (void) const |
Returns the name of the nutation corrections file. More... | |
CECorrections & | operator= (const CECorrections &other) |
Overloaded assignment operator. More... | |
void | SetInterp (bool set_interp) |
Defines that the correction values should be interpolated. More... | |
void | SetNutationFile (const std::string &filename) |
Sets the name of the nutation corrections file. More... | |
void | SetTtUt1HistFile (const std::string &filename) |
Sets the name of the historic values TT-UT1 corrections file. More... | |
void | SetTtUt1PredFile (const std::string &filename) |
Sets the name of the predicted values TT-UT1 corrections file. More... | |
double | ttut1 (const double &mjd) const |
Return the TT-UT1 correction at a given date (in seconds) More... | |
std::string | TtUt1HistFile (void) const |
Returns the name of the historic TT-UT1 corrections file. More... | |
std::string | TtUt1PredFile (void) const |
Returns the name of the precited TT-UT1 corrections file. More... | |
double | xpolar (const double &mjd) const |
Return the x-polar motion correction parameter (radians) More... | |
double | ypolar (const double &mjd) const |
Return the y-polar motion correction parameter (radians) More... | |
virtual | ~CECorrections () |
Private Member Functions | |
void | copy_members (const CECorrections &other) |
Copy data members from another object. More... | |
bool | DownloadTable (const std::string &filename, const std::string &url) const |
Downloads the IERS earth orientation correction parameters. More... | |
void | free_members (void) |
Free data member objects. More... | |
void | init_members (void) |
Initialize data members. More... | |
double | InterpValue (const double &x, const double &x0, const double &x1, const double &y0, const double &y1) const |
Return the interpolated value at a given x value between two known values. More... | |
std::ifstream | LoadFile (const std::string &filename, const std::string &url) const |
Initialize data members. More... | |
bool | LoadNutation (void) const |
Loads the IERS earth orientation correction parameters. More... | |
bool | LoadTtUt1 (void) const |
Loads the TT-UT1 correction values. More... | |
void | UpdateNutationCache (const double &mjd) const |
Recompute cached values of nutation valeus if necessary. More... | |
void | UpdateTtUt1Cache (const double &mjd) const |
Recompute cached values of nutation valeus if necessary. More... | |
Private Attributes | |
double | cache_nut_deps_ |
double | cache_nut_dpsi_ |
double | cache_nut_dut1_ |
double | cache_nut_mjd_ |
double | cache_nut_xp_ |
double | cache_nut_yp_ |
double | cache_ttut1_delt_ |
double | cache_ttut1_mjd_ |
bool | interp_ |
std::vector< double > | nutation_deps_ |
std::vector< double > | nutation_dpsi_ |
std::vector< double > | nutation_dut1_ |
std::string | nutation_file_ |
File for nutation corrections. More... | |
std::vector< int > | nutation_mjd_ |
std::vector< double > | nutation_xp_ |
std::vector< double > | nutation_yp_ |
std::vector< double > | ttut1_delt_ |
std::string | ttut1_file_hist_ |
File for historic TT-UT1 corrections. More... | |
std::string | ttut1_file_pred_ |
File for predicted TT-UT1 corrections. More... | |
std::vector< double > | ttut1_mjd_ |
#include <CECorrections.h>
CECorrections::CECorrections | ( | ) |
Constructor for coordinate corrections object.
Definition at line 58 of file CECorrections.cpp.
CECorrections::CECorrections | ( | const CECorrections & | other | ) |
Copy constructor.
Definition at line 67 of file CECorrections.cpp.
|
inlinevirtual |
Definition at line 50 of file CECorrections.h.
|
private |
Copy data members from another object.
[in] | other | CECorrections object to be copied |
Definition at line 260 of file CECorrections.cpp.
double CECorrections::deps | ( | const double & | mjd | ) | const |
Return the offset in obliquity correction parameter (radians)
[in] | mjd | Modified Julian date |
Definition at line 127 of file CECorrections.cpp.
|
private |
Downloads the IERS earth orientation correction parameters.
Definition at line 360 of file CECorrections.cpp.
double CECorrections::dpsi | ( | const double & | mjd | ) | const |
Return the offset in longitude correction parameter (radians)
[in] | mjd | Modified Julian date |
Definition at line 143 of file CECorrections.cpp.
double CECorrections::dut1 | ( | const double & | mjd | ) | const |
Return the DUT1 correction parameter (represents UT1 - UTC in seconds)
[in] | mjd | Modified Julian date |
Definition at line 79 of file CECorrections.cpp.
|
private |
Free data member objects.
Definition at line 239 of file CECorrections.cpp.
|
private |
Initialize data members.
Definition at line 289 of file CECorrections.cpp.
|
private |
Return the interpolated value at a given x value between two known values.
[in] | x | Desired position for interpolation |
[in] | x0 | Lower position where value is known |
[in] | x1 | Upper position where value is known |
[in] | y0 | Known value at position x0 |
[in] | y1 | Known value at position x1 |
Definition at line 707 of file CECorrections.cpp.
|
private |
Initialize data members.
Definition at line 324 of file CECorrections.cpp.
|
private |
Loads the IERS earth orientation correction parameters.
Definition at line 404 of file CECorrections.cpp.
|
private |
Loads the TT-UT1 correction values.
Definition at line 494 of file CECorrections.cpp.
|
inline |
Returns the name of the nutation corrections file.
Definition at line 107 of file CECorrections.h.
CECorrections & CECorrections::operator= | ( | const CECorrections & | other | ) |
Overloaded assignment operator.
[in] | other | CECorrections object to be copied |
Definition at line 175 of file CECorrections.cpp.
void CECorrections::SetInterp | ( | bool | set_interp | ) |
Defines that the correction values should be interpolated.
[in] | set_interp | New interpolation boolean |
Definition at line 224 of file CECorrections.cpp.
void CECorrections::SetNutationFile | ( | const std::string & | filename | ) |
Sets the name of the nutation corrections file.
[in] | filename | Filename to read/write corrections from/to |
Definition at line 191 of file CECorrections.cpp.
void CECorrections::SetTtUt1HistFile | ( | const std::string & | filename | ) |
Sets the name of the historic values TT-UT1 corrections file.
[in] | filename | Filename to read/write corrections from/to |
Definition at line 202 of file CECorrections.cpp.
void CECorrections::SetTtUt1PredFile | ( | const std::string & | filename | ) |
Sets the name of the predicted values TT-UT1 corrections file.
[in] | filename | Filename to read/write corrections from/to |
Definition at line 213 of file CECorrections.cpp.
double CECorrections::ttut1 | ( | const double & | mjd | ) | const |
Return the TT-UT1 correction at a given date (in seconds)
[in] | mjd | Modified Julian date |
Definition at line 159 of file CECorrections.cpp.
|
inline |
Returns the name of the historic TT-UT1 corrections file.
Definition at line 119 of file CECorrections.h.
|
inline |
Returns the name of the precited TT-UT1 corrections file.
Definition at line 131 of file CECorrections.h.
|
private |
Recompute cached values of nutation valeus if necessary.
[in] | mjd | Modified Julian date for lookup |
Definition at line 590 of file CECorrections.cpp.
|
private |
Recompute cached values of nutation valeus if necessary.
[in] | mjd | Modified Julian date for lookup |
Definition at line 654 of file CECorrections.cpp.
double CECorrections::xpolar | ( | const double & | mjd | ) | const |
Return the x-polar motion correction parameter (radians)
[in] | mjd | Modified Julian date |
Definition at line 95 of file CECorrections.cpp.
double CECorrections::ypolar | ( | const double & | mjd | ) | const |
Return the y-polar motion correction parameter (radians)
[in] | mjd | Modified Julian date |
Definition at line 111 of file CECorrections.cpp.
|
mutableprivate |
Definition at line 112 of file CECorrections.h.
|
mutableprivate |
Definition at line 113 of file CECorrections.h.
|
mutableprivate |
Definition at line 109 of file CECorrections.h.
|
mutableprivate |
Definition at line 108 of file CECorrections.h.
|
mutableprivate |
Definition at line 110 of file CECorrections.h.
|
mutableprivate |
Definition at line 111 of file CECorrections.h.
|
mutableprivate |
Definition at line 115 of file CECorrections.h.
|
mutableprivate |
Definition at line 114 of file CECorrections.h.
|
private |
Definition at line 104 of file CECorrections.h.
|
mutableprivate |
Definition at line 95 of file CECorrections.h.
|
mutableprivate |
Definition at line 96 of file CECorrections.h.
|
mutableprivate |
Definition at line 92 of file CECorrections.h.
|
mutableprivate |
File for nutation corrections.
Definition at line 86 of file CECorrections.h.
|
mutableprivate |
Definition at line 91 of file CECorrections.h.
|
mutableprivate |
Definition at line 93 of file CECorrections.h.
|
mutableprivate |
Definition at line 94 of file CECorrections.h.
|
mutableprivate |
Definition at line 99 of file CECorrections.h.
|
mutableprivate |
File for historic TT-UT1 corrections.
Definition at line 87 of file CECorrections.h.
|
mutableprivate |
File for predicted TT-UT1 corrections.
Definition at line 88 of file CECorrections.h.
|
mutableprivate |
Definition at line 98 of file CECorrections.h.