MeasJPL.h

Classes

MeasJPL -- Interface to JPL DE tables (full description)

class MeasJPL

Types

enum Types

MJD
MJD (must be first in list)
X
Column with data
N_Columns
Number of columns
MERCURY = 1
Planets
VENUS = 2
EARTH = 3
MARS = 4
JUPITER = 5
SATURN = 6
URANUS = 7
NEPTUNE = 8
PLUTO = 9
MOON = 10
SUN = 11
BARYSOLAR = 12
Solar system barycentre
BARYEARTH = 13
Earth-Moon system barycentre
NUTATION = 14
Nutations
LIBRATION = 15
Librations
N_Types
Number of types

enum Files

DE200
DE200
DE405
DE405
N_Files
# of known types

enum Codes

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

Interface

Public Members
static Bool get(Vector<Double> &returnValue, MeasJPL::Files file, MeasJPL::Types type, const MVEpoch &date)
static Bool getConst(Double &res, MeasJPL::Files which, MeasJPL::Codes what)
static Bool getConst(Double &res, MeasJPL::Files which, const String &nam)
static void closeMeas()
Private Members
MeasJPL()
MeasJPL &operator=(const MeasJPL &other)
static Bool initMeas(MeasJPL::Files which)
static Bool fillMeas(Double &intv, MeasJPL::Files which, const MVEpoch &utf)
static void interMeas(Double res[], MeasJPL::Files which, Double intv, Double ivf, Int ncf, Int ncm, Int na, const Double buf[])

Description

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25
Programs:
Tests:

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/aips/Measures) 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.

  • 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

    To Do

    Member Description

    enum Types

    Types of known data

    enum Files

    Types of files

    enum Codes

    Codes for special constants

    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)). The file can be DE200 or DE405, the type as given in enum.

    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

    MeasJPL()

    Default constructor, NOT defined

    MeasJPL &operator=(const MeasJPL &other)

    Copy assign, NOT defined

    static Bool initMeas(MeasJPL::Files which)

    Destructor, NOT defined and not declared to stop warning ~MeasJPL();

    Initialise tables

    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