MPosition.h

Classes

MPosition -- A Measure: position on Earth (full description)

class MPosition : public MeasBase<MVPosition, MeasRef<MPosition> >

Types

enum Types

ITRF
WGS84
N_Types

Interface

Public Members
typedef WHATEVER_SUN_TYPEDEF(MPosition) Types Types
MPosition()
MPosition(const MVPosition &dt)
MPosition(const MVPosition &dt, const MPosition::Ref &rf)
MPosition(const MVPosition &dt, MPosition::Types rf)
MPosition(const Quantity &dt, const Quantity &dt1, const Quantity &dt2)
MPosition(const Quantity &dt, const Quantity &dt1, const Quantity &dt2, const MPosition::Ref &rf)
MPosition(const Quantity &dt, const Quantity &dt1, const Quantity &dt2, MPosition::Types rf)
MPosition(const Quantity &dt0, const Quantum<Quantum<Double> > &dt)
MPosition(const Quantity &dt0, const Quantum<Quantum<Double> > &dt, const MPosition::Ref &rf)
MPosition(const Quantity &dt0, const Quantum<Quantum<Double> > &dt, MPosition::Vector rf)
MPosition(const Measure *dt)
MPosition(const MeasValue *dt)
MPosition(const MPosition &)
MPosition &operator=(const MPosition &)
virtual ~MPosition()
virtual const String &tellMe() const
static const String &showMe()
virtual uInt type() const
static void assure(const Measure &in)
static MPosition::Types castType(uInt tp)
static const String &showType(MPosition::Types tp)
static const String &showType(uInt tp)
static Bool getType(MPosition::Types &tp, const String &in)
Bool giveMe(MPosition::Ref &mr, const String &in)
virtual Bool setOffset(const Measure &in)
virtual Bool setRefString(const String &in)
virtual const String &getDefaultType() const
virtual const String *const allTypes(Int &nall, Int &nextra, const uInt *&typ) const
static const String *const allMyTypes(Int &nall, Int &nextra, const uInt *&typ)
virtual void checkTypes() const
static void checkMyTypes()
virtual String getRefString() const
static uInt myType()
Quantum<Vector<Double> > get(const Unit &inunit) const
Quantum<Vector<Double> > getAngle() const
Quantum<Vector<Double> > getAngle(const Unit &inunit) const
virtual Measure *clone() const

Description

Review Status

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

Prerequisite

Etymology

Synopsis

MPosition forms derived Measure class for an instant in time.

Example

Motivation

To Do

Member Description

enum Types

Types of known MPositions

Warning The order defines the order in the translation matrix FromTo in the getConvert routine. Do not change the order without changing the array. Additions should be made before N_types, and an additional row and column should be coded in FromTo, and in showType().

typedef WHATEVER_SUN_TYPEDEF(MPosition) Types Types

Reference enum Types (included originally for gcc 2.95)

MPosition()

Tip In the following constructors and other functions, all MeasRef can be replaced with simple Measure::TYPE where no offsets or frames are needed in the reference.
Default constructor; generates the ITRF centre

MPosition(const MVPosition &dt)
MPosition(const MVPosition &dt, const MPosition::Ref &rf)
MPosition(const MVPosition &dt, MPosition::Types rf)
MPosition(const Quantity &dt, const Quantity &dt1, const Quantity &dt2)
MPosition(const Quantity &dt, const Quantity &dt1, const Quantity &dt2, const MPosition::Ref &rf)
MPosition(const Quantity &dt, const Quantity &dt1, const Quantity &dt2, MPosition::Types rf)
MPosition(const Quantity &dt0, const Quantum<Quantum<Double> > &dt)
MPosition(const Quantity &dt0, const Quantum<Quantum<Double> > &dt, const MPosition::Ref &rf)
MPosition(const Quantity &dt0, const Quantum<Quantum<Double> > &dt, MPosition::Vector rf)
MPosition(const Measure *dt)
MPosition(const MeasValue *dt)

Create from data and reference

MPosition(const MPosition &)
MPosition &operator=(const MPosition &)

virtual ~MPosition()

virtual const String &tellMe() const
static const String &showMe()
virtual uInt type() const
static void assure(const Measure &in)

Tell me your type

static MPosition::Types castType(uInt tp)
static const String &showType(MPosition::Types tp)
static const String &showType(uInt tp)

Translate reference code. The uInt version has a check for valid codes (i.e. it is a safe cast).

Thrown Exceptions

static Bool getType(MPosition::Types &tp, const String &in)
Bool giveMe(MPosition::Ref &mr, const String &in)

Translate string to reference code

virtual Bool setOffset(const Measure &in)

Set the offset in the reference (False if non-matching Measure)

virtual Bool setRefString(const String &in)

Set the reference type to the specified String. False if illegal string, reference set to DEFAULT.

virtual const String &getDefaultType() const

Get the default reference type

virtual const String *const allTypes(Int &nall, Int &nextra, const uInt *&typ) const
static const String *const allMyTypes(Int &nall, Int &nextra, const uInt *&typ)

Get a list of all known reference codes. nall returns the number in list, nextra the number of specials (like planets) that should be at end of list). typ returns the list of corresponding types.

virtual void checkTypes() const
static void checkMyTypes()

Check if all internal tables of types (both enum and String) are complete and correct. This function is called automatically if and when necessary.

Thrown Exceptions

virtual String getRefString() const

Get the reference type (for records, including codes like R_)

static uInt myType()

Get my type (as Register)

Quantum<Vector<Double> > get(const Unit &inunit) const
Quantum<Vector<Double> > getAngle() const
Quantum<Vector<Double> > getAngle(const Unit &inunit) const

Get Measure data

virtual Measure *clone() const

Make copy