casa
$Rev:20696$
|
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 | fillMeas (Double &intv, MeasJPL::Files which, const MVEpoch &utf) |
Fill Table lines. | |
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 | measFlag [N_Files] |
Measured data readable. | |
static Table | t [N_Files] |
Tables present. | |
static ROTableRow | row [N_Files] |
Row descriptions. | |
static RORecordFieldPtr< Double > | rfp [N_Files][MeasJPL::N_Types] |
Field pointers. | |
static Int | mjd0 [N_Files] |
First (-1) MJD in list. | |
static Int | mjdl [N_Files] |
Last MJD in list. | |
static Int | dmjd [N_Files] |
Increment in rows. | |
static Bool | msgDone |
Message given. | |
static const String | tp [N_Files] |
File names. | |
static Int | idx [N_Files][3][13] |
Index in record. | |
static ArrayColumn< Double > | acc [N_Files] |
Data column descriptor. | |
static Vector< Double > | dval [N_Files] |
Data in current row. | |
static Int | ldat [N_Files] |
Current row. | |
static Double | chc [18] |
Chebyshev coefficients. | |
static Double | chcv [18] |
static Double | aufac [N_Files] |
Some helper data. | |
static Double | emrat [N_Files] |
static Double | cn [N_Files][N_Codes] |
static Int | np |
static Int | nv |
static Double | twot |
static Double | vfac |
static Mutex | theirMutex |
Mutex for thread-safety. |
Interface to JPL DE tables.
Internal
<h3>Review Status</h3><dl><dt>Reviewed By:<dd>UNKNOWN<dt>Date Reviewed:<dd>before2004/08/25<dt>Test programs:<dd>tMeasJPL</dl>
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 <casa/aips.h> #include <casa/Quanta/MVEpoch.h> #include <measures/Measures/MeasJPL.h> #include <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
enum casa::MeasJPL::Codes |
enum casa::MeasJPL::Files |
enum casa::MeasJPL::Types |
Types of known data.
casa::MeasJPL::MeasJPL | ( | ) | [private] |
Default constructor, NOT defined.
static void casa::MeasJPL::closeMeas | ( | ) | [static] |
Close the set of JPL tables only.
static Bool casa::MeasJPL::fillMeas | ( | Double & | intv, |
MeasJPL::Files | which, | ||
const MVEpoch & | utf | ||
) | [static, private] |
Fill Table lines.
static Bool casa::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 casa::MeasJPL::getConst | ( | Double & | res, |
MeasJPL::Files | which, | ||
MeasJPL::Codes | what | ||
) | [static] |
Get indicated special constant.
static Bool casa::MeasJPL::getConst | ( | Double & | res, |
MeasJPL::Files | which, | ||
const String & | nam | ||
) | [static] |
Get filed constant with name nam.
static Bool casa::MeasJPL::initMeas | ( | MeasJPL::Files | which | ) | [static, private] |
Destructor, NOT defined and not declared to stop warning ~MeasJPL();.
Initialise tables
static void casa::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> casa::MeasJPL::acc[N_Files] [static, private] |
Double casa::MeasJPL::aufac[N_Files] [static, private] |
Double casa::MeasJPL::chc[18] [static, private] |
Double casa::MeasJPL::chcv[18] [static, private] |
Double casa::MeasJPL::cn[N_Files][N_Codes] [static, private] |
Int casa::MeasJPL::dmjd[N_Files] [static, private] |
Vector<Double> casa::MeasJPL::dval[N_Files] [static, private] |
Double casa::MeasJPL::emrat[N_Files] [static, private] |
Int casa::MeasJPL::idx[N_Files][3][13] [static, private] |
Int casa::MeasJPL::ldat[N_Files] [static, private] |
volatile Bool casa::MeasJPL::measFlag[N_Files] [static, private] |
Int casa::MeasJPL::mjd0[N_Files] [static, private] |
Int casa::MeasJPL::mjdl[N_Files] [static, private] |
Bool casa::MeasJPL::msgDone [static, private] |
Int casa::MeasJPL::np [static, private] |
Int casa::MeasJPL::nv [static, private] |
RORecordFieldPtr<Double> casa::MeasJPL::rfp[N_Files][MeasJPL::N_Types] [static, private] |
ROTableRow casa::MeasJPL::row[N_Files] [static, private] |
Table casa::MeasJPL::t[N_Files] [static, private] |
Mutex casa::MeasJPL::theirMutex [static, private] |
const String casa::MeasJPL::tp[N_Files] [static, private] |
Double casa::MeasJPL::twot [static, private] |
Double casa::MeasJPL::vfac [static, private] |