Interface to JPL DE tables. More...
#include <MeasJPL.h>
Public Types | |
enum | Types { MJD, X, N_Columns, MERCURY, VENUS, EARTH, MARS, JUPITER, SATURN, URANUS, NEPTUNE, PLUTO, MOON, SUN, BARYSOLAR, BARYEARTH, NUTATION, LIBRATION, N_Types } |
Types of known data. More... | |
enum | Files { DE200, DE405, N_Files, DEFAULT } |
Types of files. More... | |
enum | Codes { CAU, GMS, AU, RADS, N_Codes } |
Codes for special constants. More... | |
Static Public Member Functions | |
static Bool | get (Vector< Double > &returnValue, MeasJPL::Files file, MeasJPL::Types type, const MVEpoch &date) |
Get the values from a DE table, interpolated for date(in MJD(TDB)). | |
static Bool | getConst (Double &res, MeasJPL::Files which, MeasJPL::Codes what) |
Get indicated special constant. | |
static Bool | getConst (Double &res, MeasJPL::Files which, const String &nam) |
Get filed constant with name nam. | |
static void | closeMeas () |
Close the set of JPL tables only. | |
Private Member Functions | |
MeasJPL () | |
Default constructor, NOT defined. | |
MeasJPL & | operator= (const MeasJPL &other) |
Copy assign, NOT defined. | |
Static Private Member Functions | |
static Bool | initMeas (MeasJPL::Files which) |
Destructor, NOT defined and not declared to stop warning ~MeasJPL();. | |
static Bool | doInitMeas (MeasJPL::Files which) |
static const Double * | fillMeas (Double &intv, MeasJPL::Files which, const MVEpoch &utf) |
Get a pointer to the data for the given date. | |
static void | interMeas (Double res[], MeasJPL::Files which, Double intv, Double ivf, Int ncf, Int ncm, Int na, const Double buf[]) |
Interpolate Chebyshev polymomial to res. | |
Static Private Attributes | |
static volatile Bool | needInit [N_Files] |
Measured data readable. | |
static Table | t [N_Files] |
Tables present. | |
static ArrayColumn< Double > | acc [N_Files] |
Data column descriptor. | |
static Int | mjd0 [N_Files] |
First (-1) MJD in list. | |
static Int | mjdl [N_Files] |
Last MJD in list. | |
static Int | dmjd [N_Files] |
Interval in days (i.e., date step between subsequent rows). | |
static const String | tp [N_Files] |
File names. | |
static Int | idx [N_Files][3][13] |
Index in record. | |
static vector< Int > | curDate [N_Files] |
Dates of the data read in buffer. | |
static vector< Vector< Double > > | dval [N_Files] |
Data read in. | |
static Double | aufac [N_Files] |
Some helper data read from the table keywords. | |
static Double | emrat [N_Files] |
static Double | cn [N_Files][N_Codes] |
static Mutex | theirMutex |
Mutex for thread-safety. |
Interface to JPL DE tables.
Internal
From Measure and JPL
MeasJPL is the interface class to the JPL DE planetary data. It has only static memebers.
Tables are found using the aipsrc (using measures.<table>.directory
) mechanism. If not provided they are assumed to reside in standard places (i.e. in $AIPSROOT/data/ephemerides) Tables are assumed to have the VS_VERSION, VS_DATE, VS_CREATE and VS_TYPE keywords, and be of type IERS, else an exception will be thrown.
The get()
method will obtain data from the JPL planetary tables (i.e. the DE200
and the DE405
tables). The data obtained will be the barycentric position (AU) and velocity (AU/d) of planets; the nutation (rad, rad/d) or the libration (rad, rad/d; DE405 only). All in the J2000 system.
The JPL DE Tables have a large set of constants attach to it. Some will be available by their own special code, the others their filed name. (See the get
functions.
The enumeration code gives the available data and planets. See E.M. Standish et al., JPL IOM 314.10 - 127 for further details.
Note that the normal usage of these tables is through the Measures system.
Note: A message is Logged (once) if a table cannot be found; A message is logged (once) if a date outside the range in the Tables is asked for;
#include <casacore/casa/aips.h> #include <casacore/casa/Quanta/MVEpoch.h> #include <casacore/measures/Measures/MeasJPL.h> #include <casacore/casa/Arrays/Vector.h> const MVEpoch dat = 51116; // a date (1998/10/30) in TDB Vector<Double> val(6), valE(6); // results // Get position and velocity of Venus (barycentric) if (!MeasJPL::get(val, MeasJPL::DE200, MeasJPL::VENUS, dat)) { cout << "Some error getting Venus position" << endl; // Get Earth position and velocity (barycentric) } else if (!MeasJPL::get(valE, MeasJPL::DE200, MeasJPL::VENUS, dat)) { cout << "Some error getting Earth position" << endl; } else { cout << "Venus (geocentric): " << (val-valE) << endl; };
To use the JPL data for planetary positions and high precision nutation
Definition at line 120 of file MeasJPL.h.
Types of known data.
casacore::MeasJPL::MeasJPL | ( | ) | [private] |
Default constructor, NOT defined.
static void casacore::MeasJPL::closeMeas | ( | ) | [static] |
Close the set of JPL tables only.
static Bool casacore::MeasJPL::doInitMeas | ( | MeasJPL::Files | which | ) | [static, private] |
static const Double* casacore::MeasJPL::fillMeas | ( | Double & | intv, | |
MeasJPL::Files | which, | |||
const MVEpoch & | utf | |||
) | [static, private] |
Get a pointer to the data for the given date.
It reads the data if needed.
static Bool casacore::MeasJPL::get | ( | Vector< Double > & | returnValue, | |
MeasJPL::Files | file, | |||
MeasJPL::Types | type, | |||
const MVEpoch & | date | |||
) | [static] |
Get the values from a DE table, interpolated for date(in MJD(TDB)).
The file can be DE200 or DE405, the type as given in enum.
static Bool casacore::MeasJPL::getConst | ( | Double & | res, | |
MeasJPL::Files | which, | |||
const String & | nam | |||
) | [static] |
Get filed constant with name nam.
static Bool casacore::MeasJPL::getConst | ( | Double & | res, | |
MeasJPL::Files | which, | |||
MeasJPL::Codes | what | |||
) | [static] |
Get indicated special constant.
static Bool casacore::MeasJPL::initMeas | ( | MeasJPL::Files | which | ) | [static, private] |
Destructor, NOT defined and not declared to stop warning ~MeasJPL();.
Initialise tables
static void casacore::MeasJPL::interMeas | ( | Double | res[], | |
MeasJPL::Files | which, | |||
Double | intv, | |||
Double | ivf, | |||
Int | ncf, | |||
Int | ncm, | |||
Int | na, | |||
const Double | buf[] | |||
) | [static, private] |
Interpolate Chebyshev polymomial to res.
ArrayColumn<Double> casacore::MeasJPL::acc[N_Files] [static, private] |
Double casacore::MeasJPL::aufac[N_Files] [static, private] |
Double casacore::MeasJPL::cn[N_Files][N_Codes] [static, private] |
vector<Int> casacore::MeasJPL::curDate[N_Files] [static, private] |
Int casacore::MeasJPL::dmjd[N_Files] [static, private] |
vector<Vector<Double> > casacore::MeasJPL::dval[N_Files] [static, private] |
Double casacore::MeasJPL::emrat[N_Files] [static, private] |
Int casacore::MeasJPL::idx[N_Files][3][13] [static, private] |
Int casacore::MeasJPL::mjd0[N_Files] [static, private] |
Int casacore::MeasJPL::mjdl[N_Files] [static, private] |
volatile Bool casacore::MeasJPL::needInit[N_Files] [static, private] |
Table casacore::MeasJPL::t[N_Files] [static, private] |
Mutex casacore::MeasJPL::theirMutex [static, private] |
const String casacore::MeasJPL::tp[N_Files] [static, private] |