casacore
Public Types | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Static Private Attributes | List of all members

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)). More...
 
static Bool getConst (Double &res, MeasJPL::Files which, MeasJPL::Codes what)
 Get indicated special constant. More...
 
static Bool getConst (Double &res, MeasJPL::Files which, const String &nam)
 Get filed constant with name nam. More...
 
static void closeMeas ()
 Close the set of JPL tables only. More...
 

Private Member Functions

 MeasJPL ()
 Default constructor, NOT defined. More...
 
MeasJPLoperator= (const MeasJPL &other)
 Copy assign, NOT defined. More...
 

Static Private Member Functions

static Bool initMeasOnce (MeasJPL::Files which)
 Destructor, NOT defined and not declared to stop warning ~MeasJPL();. More...
 
static void doInitMeas (MeasJPL::Files which)
 
static const DoublefillMeas (Double &intv, MeasJPL::Files which, const MVEpoch &utf)
 Get a pointer to the data for the given date. More...
 
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. More...
 

Static Private Attributes

static std::once_flag theirCallOnceFlags [N_Files]
 Object to ensure safe multi-threaded lazy single initialization. More...
 
static std::mutex theirMutex
 Mutex for thread-safety (other than initialization). More...
 
static Table t [N_Files]
 Tables present. More...
 
static ArrayColumn< Doubleacc [N_Files]
 Data column descriptor. More...
 
static Int mjd0 [N_Files]
 First (-1) MJD in list. More...
 
static Int mjdl [N_Files]
 Last MJD in list. More...
 
static Int dmjd [N_Files]
 Interval in days (i.e., date step between subsequent rows) More...
 
static const String tp [N_Files]
 File names. More...
 
static Int idx [N_Files][3][13]
 Index in record. More...
 
static vector< IntcurDate [N_Files]
 Dates of the data read in buffer. More...
 
static vector< Vector< Double > > dval [N_Files]
 Data read in. More...
 
static Double aufac [N_Files]
 Some helper data read from the table keywords. More...
 
static Double emrat [N_Files]
 
static Double cn [N_Files][N_Codes]
 

Detailed Description

Interface to JPL DE tables

Intended use:

Internal

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25
Test programs:
tMeasJPL

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 <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)
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;
};
@ DE200
DE200.
Definition: MeasJPL.h:161
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)).

Motivation

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

Definition at line 121 of file MeasJPL.h.

Member Enumeration Documentation

◆ Codes

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 170 of file MeasJPL.h.

◆ Files

Types of files.

Enumerator
DE200 

DE200.

DE405 

DE405.

N_Files 

of known types

DEFAULT 

Default.

Definition at line 159 of file MeasJPL.h.

◆ Types

Types of known data.

Enumerator
MJD 

MJD (must be first in list)

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 128 of file MeasJPL.h.

Constructor & Destructor Documentation

◆ MeasJPL()

casacore::MeasJPL::MeasJPL ( )
private

Default constructor, NOT defined.

Member Function Documentation

◆ closeMeas()

static void casacore::MeasJPL::closeMeas ( )
static

Close the set of JPL tables only.

Only call it last at end of program.

◆ doInitMeas()

static void casacore::MeasJPL::doInitMeas ( MeasJPL::Files  which)
staticprivate

◆ fillMeas()

static const Double* casacore::MeasJPL::fillMeas ( Double intv,
MeasJPL::Files  which,
const MVEpoch utf 
)
staticprivate

Get a pointer to the data for the given date.

It reads the data if needed.

◆ get()

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.

◆ getConst() [1/2]

static Bool casacore::MeasJPL::getConst ( Double res,
MeasJPL::Files  which,
const String nam 
)
static

Get filed constant with name nam.

◆ getConst() [2/2]

static Bool casacore::MeasJPL::getConst ( Double res,
MeasJPL::Files  which,
MeasJPL::Codes  what 
)
static

Get indicated special constant.

◆ initMeasOnce()

static Bool casacore::MeasJPL::initMeasOnce ( MeasJPL::Files  which)
staticprivate

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

Initialise tables

◆ interMeas()

static void casacore::MeasJPL::interMeas ( Double  res[],
MeasJPL::Files  which,
Double  intv,
Double  ivf,
Int  ncf,
Int  ncm,
Int  na,
const Double  buf[] 
)
staticprivate

Interpolate Chebyshev polymomial to res.

◆ operator=()

MeasJPL& casacore::MeasJPL::operator= ( const MeasJPL other)
private

Copy assign, NOT defined.

Member Data Documentation

◆ acc

ArrayColumn<Double> casacore::MeasJPL::acc[N_Files]
staticprivate

Data column descriptor.

Definition at line 233 of file MeasJPL.h.

◆ aufac

Double casacore::MeasJPL::aufac[N_Files]
staticprivate

Some helper data read from the table keywords.

Definition at line 250 of file MeasJPL.h.

◆ cn

Double casacore::MeasJPL::cn[N_Files][N_Codes]
staticprivate

Definition at line 252 of file MeasJPL.h.

◆ curDate

vector<Int> casacore::MeasJPL::curDate[N_Files]
staticprivate

Dates of the data read in buffer.

Definition at line 245 of file MeasJPL.h.

◆ dmjd

Int casacore::MeasJPL::dmjd[N_Files]
staticprivate

Interval in days (i.e., date step between subsequent rows)

Definition at line 239 of file MeasJPL.h.

◆ dval

vector<Vector<Double> > casacore::MeasJPL::dval[N_Files]
staticprivate

Data read in.

Definition at line 247 of file MeasJPL.h.

◆ emrat

Double casacore::MeasJPL::emrat[N_Files]
staticprivate

Definition at line 251 of file MeasJPL.h.

◆ idx

Int casacore::MeasJPL::idx[N_Files][3][13]
staticprivate

Index in record.

Definition at line 243 of file MeasJPL.h.

◆ mjd0

Int casacore::MeasJPL::mjd0[N_Files]
staticprivate

First (-1) MJD in list.

Definition at line 235 of file MeasJPL.h.

◆ mjdl

Int casacore::MeasJPL::mjdl[N_Files]
staticprivate

Last MJD in list.

Definition at line 237 of file MeasJPL.h.

◆ t

Table casacore::MeasJPL::t[N_Files]
staticprivate

Tables present.

Definition at line 231 of file MeasJPL.h.

◆ theirCallOnceFlags

std::once_flag casacore::MeasJPL::theirCallOnceFlags[N_Files]
staticprivate

Object to ensure safe multi-threaded lazy single initialization.

Definition at line 227 of file MeasJPL.h.

◆ theirMutex

std::mutex casacore::MeasJPL::theirMutex
staticprivate

Mutex for thread-safety (other than initialization).

Definition at line 229 of file MeasJPL.h.

◆ tp

const String casacore::MeasJPL::tp[N_Files]
staticprivate

File names.

Definition at line 241 of file MeasJPL.h.


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