casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Static Private Attributes
casa::MeasJPL Class Reference

Interface to JPL DE tables. More...

#include <MeasJPL.h>

List of all members.

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.
MeasJPLoperator= (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< Doublerfp [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< Doubleacc [N_Files]
 Data column descriptor.
static Vector< Doubledval [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.

Detailed Description

Interface to JPL DE tables.

Intended use:

Internal

 <h3>Review Status</h3><dl><dt>Reviewed By:<dd>UNKNOWN<dt>Date Reviewed:<dd>before2004/08/25<dt>Test programs:<dd>tMeasJPL</dl> 

Prerequisite

Etymology

From Measure and JPL

Synopsis

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;

Thrown Exceptions

Example

        #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;
        };

Motivation

To use the JPL data for planetary positions and high precision nutation

Definition at line 120 of file MeasJPL.h.


Member Enumeration Documentation

Codes for special constants.

Enumerator:
CAU 

Light velocity used in AU/d.

GMS 

Solar mass (GM0)/c2 in AU.

AU 

AU in km.

RADS 

Solar radius in AU.

N_Codes 

of codes

Definition at line 169 of file MeasJPL.h.

Types of files.

Enumerator:
DE200 

DE200.

DE405 

DE405.

N_Files 

of known types

DEFAULT 

Default.

Definition at line 158 of file MeasJPL.h.

Types of known data.

Enumerator:
MJD 

MJD (must be first in list)

X 

Column with data.

N_Columns 

Number of columns.

MERCURY 

Planets.

VENUS 
EARTH 
MARS 
JUPITER 
SATURN 
URANUS 
NEPTUNE 
PLUTO 
MOON 
SUN 
BARYSOLAR 

Solar system barycentre.

BARYEARTH 

Earth-Moon system barycentre.

NUTATION 

Nutations.

LIBRATION 

Librations.

N_Types 

Number of types.

Definition at line 127 of file MeasJPL.h.


Constructor & Destructor Documentation

casa::MeasJPL::MeasJPL ( ) [private]

Default constructor, NOT defined.


Member Function Documentation

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.

MeasJPL& casa::MeasJPL::operator= ( const MeasJPL other) [private]

Copy assign, NOT defined.


Member Data Documentation

Data column descriptor.

Definition at line 244 of file MeasJPL.h.

Double casa::MeasJPL::aufac[N_Files] [static, private]

Some helper data.

Definition at line 256 of file MeasJPL.h.

Double casa::MeasJPL::chc[18] [static, private]

Chebyshev coefficients.

Definition at line 251 of file MeasJPL.h.

Double casa::MeasJPL::chcv[18] [static, private]

Definition at line 252 of file MeasJPL.h.

Double casa::MeasJPL::cn[N_Files][N_Codes] [static, private]

Definition at line 258 of file MeasJPL.h.

Int casa::MeasJPL::dmjd[N_Files] [static, private]

Increment in rows.

Definition at line 236 of file MeasJPL.h.

Data in current row.

Definition at line 246 of file MeasJPL.h.

Double casa::MeasJPL::emrat[N_Files] [static, private]

Definition at line 257 of file MeasJPL.h.

Int casa::MeasJPL::idx[N_Files][3][13] [static, private]

Index in record.

Definition at line 242 of file MeasJPL.h.

Int casa::MeasJPL::ldat[N_Files] [static, private]

Current row.

Definition at line 248 of file MeasJPL.h.

volatile Bool casa::MeasJPL::measFlag[N_Files] [static, private]

Measured data readable.

Definition at line 224 of file MeasJPL.h.

Int casa::MeasJPL::mjd0[N_Files] [static, private]

First (-1) MJD in list.

Definition at line 232 of file MeasJPL.h.

Int casa::MeasJPL::mjdl[N_Files] [static, private]

Last MJD in list.

Definition at line 234 of file MeasJPL.h.

Bool casa::MeasJPL::msgDone [static, private]

Message given.

Definition at line 238 of file MeasJPL.h.

Int casa::MeasJPL::np [static, private]

Definition at line 259 of file MeasJPL.h.

Int casa::MeasJPL::nv [static, private]

Definition at line 260 of file MeasJPL.h.

Field pointers.

Definition at line 230 of file MeasJPL.h.

Row descriptions.

Definition at line 228 of file MeasJPL.h.

Table casa::MeasJPL::t[N_Files] [static, private]

Tables present.

Definition at line 226 of file MeasJPL.h.

Mutex casa::MeasJPL::theirMutex [static, private]

Mutex for thread-safety.

Definition at line 265 of file MeasJPL.h.

const String casa::MeasJPL::tp[N_Files] [static, private]

File names.

Definition at line 240 of file MeasJPL.h.

Double casa::MeasJPL::twot [static, private]

Definition at line 261 of file MeasJPL.h.

Double casa::MeasJPL::vfac [static, private]

Definition at line 262 of file MeasJPL.h.


The documentation for this class was generated from the following file: