MeasMath.h

Classes

MeasMath -- Measure conversion aid routines (full description)

class MeasMath

Types

enum FrameType

EPOCH = 0
POSITION
DIRECTION
VELOCITY
N_FrameType

enum FrameInfo

TDB = 0
LASTR
TT
UT1
LONG
LAT
RADIUS
LATGEO
J2000LONG
J2000LAT
B1950LONG
B1950LAT
APPLONG
APPLAT
N_FrameDInfo
J2000DIR = N_FrameDInfo,B1950DIR
APPDIR
N_FrameInfo

Interface

Public Members
MeasMath()
~MeasMath()
void initFrame(MRBase &outref, MRBase &inref)
void createPrecession()
void applyPrecession(MVPosition &in)
void deapplyPrecession(MVPosition &in)
void createPrecessionB1950()
void applyPrecessionB1950(MVPosition &in)
void deapplyPrecessionB1950(MVPosition &in)
void createNutation()
void applyNutation(MVPosition &in)
void deapplyNutation(MVPosition &in)
void createNutationB1950()
void applyNutationB1950(MVPosition &in)
void deapplyNutationB1950(MVPosition &in)
void createPrecNutat()
void applyPrecNutat(MVPosition &in)
void deapplyPrecNutat(MVPosition &in)
void createPrecNutatB1950()
void applyPrecNutatB1950(MVPosition &in, Bool doin=True)
void deapplyPrecNutatB1950(MVPosition &in, Bool doin=True)
void createAberration()
void applyAberration(MVPosition &in, Bool doin=True)
void deapplyAberration(MVPosition &in, Bool doin=True)
void createAberrationB1950()
void applyAberrationB1950(MVPosition &in, Bool doin=True)
void deapplyAberrationB1950(MVPosition &in, Bool doin=True)
void createSolarPos()
void applySolarPos(MVPosition &in, Bool doin=True)
void deapplySolarPos(MVPosition &in, Bool doin=True)
void applyHADECtoITRF(MVPosition &in)
void deapplyHADECtoITRF(MVPosition &in)
void applyHADECtoAZEL(MVPosition &in)
void deapplyHADECtoAZEL(MVPosition &in)
void applyHADECtoAZELGEO(MVPosition &in)
void deapplyHADECtoAZELGEO(MVPosition &in)
void applyJ2000toB1950(MVPosition &in, Bool doin=True)
void deapplyJ2000toB1950(MVPosition &in, Bool doin=True)
void applyETerms(MVPosition &in, Bool doin=True)
void deapplyETerms(MVPosition &in, Bool doin=True)
void applyGALtoJ2000(MVPosition &in)
void deapplyGALtoJ2000(MVPosition &in)
void applyGALtoB1950(MVPosition &in)
void deapplyGALtoB1950(MVPosition &in)
void applyGALtoSUPERGAL(MVPosition &in)
void deapplyGALtoSUPERGAL(MVPosition &in)
void applyICRStoJ2000(MVPosition &in)
void deapplyICRStoJ2000(MVPosition &in)
void applyTOPOtoHADEC(MVPosition &in, Bool doin=True)
void deapplyTOPOtoHADEC(MVPosition &in, Bool doin=True)
void applyPolarMotion(MVPosition &in)
void deapplyPolarMotion(MVPosition &in)
void applyPolarMotionLong(MVPosition &in)
void deapplyPolarMotionLong(MVPosition &in)
void applyAZELtoAZELSW(MVPosition &in)
void applyECLIPtoJ2000(MVPosition &in)
void deapplyECLIPtoJ2000(MVPosition &in)
void applyMECLIPtoJMEAN(MVPosition &in)
void deapplyMECLIPtoJMEAN(MVPosition &in)
void applyTECLIPtoJTRUE(MVPosition &in)
void deapplyTECLIPtoJTRUE(MVPosition &in)
void applyAPPtoTOPO(MVPosition &in, const Double len, Bool doin=True)
void deapplyAPPtoTOPO(MVPosition &in, const Double len, Bool doin=True)
void getAPP(MVPosition &out)
void getJ2000(MVPosition &out)
void getB1950(MVPosition &out)
Private Members
typedef const Measure *const (Measure::*FRFCT)() const
typedef Bool (MCFrame::*FRDINFO)(Double &)
typedef Bool (MCFrame::*FRMVDINFO)(MVDirection &)
MeasMath(const MeasMath &other)
MeasMath &operator=(const MeasMath &other)
void getFrame(FrameType i)
void getInfo(FrameInfo i)
void rotateShift(MVPosition &in, const MVPosition &shft, const FrameInfo lng, const FrameInfo lat, Bool doin)

Description

Review Status

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

Prerequisite

Etymology

Measure and Mathematics

Synopsis

The conversion of measures like MDirection, MPosition etc have many conversion routines in common. This class combines all of these conversions, including data caches for re-use.

The class is always created by the default constructor. For each operation (like e.g. Precession application), it has three function:

Example

See MCDirection source for how to use the class.

Motivation

To re-use code for a specific measure conversion, and to ease the caching administration for each individual conversion.

To Do

Member Description

MeasMath()

Default constructor

~MeasMath()

void initFrame(MRBase &outref, MRBase &inref)

Initialise the frame to be used. The apply direction uses the inref if present; the deapply the outref if present, otherwise the other one.

void createPrecession()
void applyPrecession(MVPosition &in)
void deapplyPrecession(MVPosition &in)

Functions to create a particular conversion instance; to apply or deapply the instance.

Precession for J2000 (IAU definition) and in coordinates

void createPrecessionB1950()
void applyPrecessionB1950(MVPosition &in)
void deapplyPrecessionB1950(MVPosition &in)

Functions to create a particular conversion instance; to apply or deapply the instance.

Precession for B1950 and in coordinates

void createNutation()
void applyNutation(MVPosition &in)
void deapplyNutation(MVPosition &in)

Functions to create a particular conversion instance; to apply or deapply the instance.

Nutation for J2000 (IAU standard) and in coordinates

void createNutationB1950()
void applyNutationB1950(MVPosition &in)
void deapplyNutationB1950(MVPosition &in)

Functions to create a particular conversion instance; to apply or deapply the instance.

Nutation for B1950 and in coordinates

void createPrecNutat()
void applyPrecNutat(MVPosition &in)
void deapplyPrecNutat(MVPosition &in)
void createPrecNutatB1950()
void applyPrecNutatB1950(MVPosition &in, Bool doin=True)
void deapplyPrecNutatB1950(MVPosition &in, Bool doin=True)

Functions to create a particular conversion instance; to apply or deapply the instance.

Precession and Nutation for J2000 or B1950 and in coordinates

void createAberration()
void applyAberration(MVPosition &in, Bool doin=True)
void deapplyAberration(MVPosition &in, Bool doin=True)
void createAberrationB1950()
void applyAberrationB1950(MVPosition &in, Bool doin=True)
void deapplyAberrationB1950(MVPosition &in, Bool doin=True)

Functions to create a particular conversion instance; to apply or deapply the instance.

Aberration for J2000 (IAU definition) and B1950 and in coordinates

void createSolarPos()
void applySolarPos(MVPosition &in, Bool doin=True)
void deapplySolarPos(MVPosition &in, Bool doin=True)

Functions to create a particular conversion instance; to apply or deapply the instance.

Solar bending for J2000 (IAU definition) and in coordinates. False if dependent on frame direction rather than input one.

void applyHADECtoITRF(MVPosition &in)
void deapplyHADECtoITRF(MVPosition &in)
void applyHADECtoAZEL(MVPosition &in)
void deapplyHADECtoAZEL(MVPosition &in)
void applyHADECtoAZELGEO(MVPosition &in)
void deapplyHADECtoAZELGEO(MVPosition &in)
void applyJ2000toB1950(MVPosition &in, Bool doin=True)
void deapplyJ2000toB1950(MVPosition &in, Bool doin=True)
void applyETerms(MVPosition &in, Bool doin=True)
void deapplyETerms(MVPosition &in, Bool doin=True)
void applyGALtoJ2000(MVPosition &in)
void deapplyGALtoJ2000(MVPosition &in)
void applyGALtoB1950(MVPosition &in)
void deapplyGALtoB1950(MVPosition &in)
void applyGALtoSUPERGAL(MVPosition &in)
void deapplyGALtoSUPERGAL(MVPosition &in)
void applyICRStoJ2000(MVPosition &in)
void deapplyICRStoJ2000(MVPosition &in)
void applyTOPOtoHADEC(MVPosition &in, Bool doin=True)
void deapplyTOPOtoHADEC(MVPosition &in, Bool doin=True)
void applyPolarMotion(MVPosition &in)
void deapplyPolarMotion(MVPosition &in)
void applyPolarMotionLong(MVPosition &in)
void deapplyPolarMotionLong(MVPosition &in)
void applyAZELtoAZELSW(MVPosition &in)
void applyECLIPtoJ2000(MVPosition &in)
void deapplyECLIPtoJ2000(MVPosition &in)
void applyMECLIPtoJMEAN(MVPosition &in)
void deapplyMECLIPtoJMEAN(MVPosition &in)
void applyTECLIPtoJTRUE(MVPosition &in)
void deapplyTECLIPtoJTRUE(MVPosition &in)
void applyAPPtoTOPO(MVPosition &in, const Double len, Bool doin=True)
void deapplyAPPtoTOPO(MVPosition &in, const Double len, Bool doin=True)

Functions to create a particular conversion instance; to apply or deapply the instance.

enum FrameType

Types of frame information groups

enum FrameInfo

Types of frame information

void getAPP(MVPosition &out)
void getJ2000(MVPosition &out)
void getB1950(MVPosition &out)

Transfer some information

typedef const Measure *const (Measure::*FRFCT)() const

To get frame group

typedef Bool (MCFrame::*FRDINFO)(Double &)
typedef Bool (MCFrame::*FRMVDINFO)(MVDirection &)

Data cached for fast calculations and workspace

MeasMath(const MeasMath &other)

Copy constructor (not implemented)

MeasMath &operator=(const MeasMath &other)

Assignment (not implemented)

void getFrame(FrameType i)

Get proper frame information

void getInfo(FrameInfo i)

Get information from the frame

Thrown Exceptions

void rotateShift(MVPosition &in, const MVPosition &shft, const FrameInfo lng, const FrameInfo lat, Bool doin)

Make a shift of coordinate into a rotation and apply it when doin is False. Else apply a shift. Given are the longitude and latitude codes of the direction to be used, and the shift to be applied in that system to the in coordinate.