casa
5.7.0-16
|
Container for Measure frame. More...
#include <MeasFrame.h>
Public Types | |
enum | FrameTypes { EPOCH, POSITION, DIRECTION, VELOCITY, COMET } |
Enumeration for the different farme entries possible. More... | |
Public Member Functions | |
MeasFrame () | |
Default constructor. More... | |
MeasFrame (const Measure &meas1) | |
Construct frame with specified measures. More... | |
MeasFrame (const Measure &meas1, const Measure &meas2) | |
MeasFrame (const Measure &meas1, const Measure &meas2, const Measure &meas3) | |
MeasFrame (const MeasFrame &other) | |
Copy constructor (reference semantics) More... | |
MeasFrame & | operator= (const MeasFrame &other) |
Copy assignment (reference semantics) More... | |
~MeasFrame () | |
Destructor. More... | |
Bool | operator== (const MeasFrame &other) const |
Comparisons. More... | |
Bool | operator!= (const MeasFrame &other) const |
Bool | empty () const |
Test if empty (i.e. More... | |
void | set (const Measure &meas1) |
Set frame elements. More... | |
void | set (const Measure &meas1, const Measure &meas2) |
void | set (const Measure &meas1, const Measure &meas2, const Measure &meas3) |
void | set (const MeasComet &meas) |
void | resetEpoch (Double val) |
Reset a frame element and its cached derived values. More... | |
void | resetEpoch (const Vector< Double > &val) |
void | resetEpoch (const Quantum< Double > &val) |
void | resetEpoch (const Quantum< Vector< Double > > &val) |
void | resetEpoch (const MVEpoch &val) |
void | resetEpoch (const Measure &val) |
void | resetPosition (const Vector< Double > &val) |
void | resetPosition (const Quantum< Vector< Double > > &val) |
void | resetPosition (const MVPosition &val) |
void | resetPosition (const Measure &val) |
void | resetDirection (const Vector< Double > &val) |
void | resetDirection (const Quantum< Vector< Double > > &val) |
void | resetDirection (const MVDirection &val) |
void | resetDirection (const Measure &val) |
void | resetRadialVelocity (const Vector< Double > &val) |
void | resetRadialVelocity (const Quantum< Vector< Double > > &val) |
void | resetRadialVelocity (const MVRadialVelocity &val) |
void | resetRadialVelocity (const Measure &val) |
void | resetComet (const MeasComet &val) |
const Measure * | epoch () const |
Get the epoch pointer (0 if not present) More... | |
const Measure * | position () const |
Get the position pointer (0 if not present) More... | |
const Measure * | direction () const |
Get the direction pointer (0 if not present) More... | |
const Measure * | radialVelocity () const |
Get the radial velocity pointer (0 if not present) More... | |
const MeasComet * | comet () const |
Get the comet pointer (0 if not present) More... | |
Bool | getTDB (Double &tdb) const |
Get data from frame. More... | |
Bool | getUT1 (Double &tdb) const |
Get UT1 in days. More... | |
Bool | getTT (Double &tdb) const |
Get TT in days. More... | |
Bool | getLong (Double &tdb) const |
Get the ITRF longitude (in rad) More... | |
Bool | getLat (Double &tdb) const |
Get the ITRF latitude (in rad) More... | |
Bool | getITRF (MVPosition &tdb) const |
Get the position. More... | |
Bool | getRadius (Double &tdb) const |
Get the geocentric position (in m) More... | |
Bool | getLatGeo (Double &tdb) const |
Get the geodetic latitude. More... | |
Bool | getLAST (Double &tdb) const |
Get the LAST (in days) More... | |
Bool | getLASTr (Double &tdb) const |
Get the LAST (in rad) More... | |
Bool | getJ2000 (MVDirection &tdb) const |
Get J2000 coordinates (direction cosines) and its longitude/latitude (rad) More... | |
Bool | getJ2000Long (Double &tdb) const |
Bool | getJ2000Lat (Double &tdb) const |
Bool | getB1950 (MVDirection &tdb) const |
Get B1950 coordinates (direction cosines) More... | |
Bool | getB1950Long (Double &tdb) const |
Bool | getB1950Lat (Double &tdb) const |
Bool | getApp (MVDirection &tdb) const |
Get apparent coordinates (direction cosines) More... | |
Bool | getAppLong (Double &tdb) const |
Bool | getAppLat (Double &tdb) const |
Bool | getLSR (Double &tdb) const |
Get LSR radial velocity (m/s) More... | |
Bool | getCometType (uInt &tdb) const |
Get the comet table reference type. More... | |
Bool | getComet (MVPosition &tdb) const |
Get the comet coordinates. More... | |
Private Member Functions | |
void | create () |
Create an instance of the MeasFrame class. More... | |
void | fill (const Measure *in) |
Fill a MeasFrame element. More... | |
void | fill (const MeasComet *in) |
void | makeEpoch () |
Make full Epoch. More... | |
void | makePosition () |
Make full Position. More... | |
void | makeDirection () |
Make full Direction. More... | |
void | makeRadialVelocity () |
Make full RadialVelocity. More... | |
void | makeComet () |
Make full Comet. More... | |
void | errorReset (const String &txt) |
Throw reset error. More... | |
void | lock (uInt &locker) |
Lock the frame to make sure deletion occurs when needed. More... | |
void | unlock (const uInt locker) |
Unlock the frame. More... | |
Private Attributes | |
FrameRep * | rep |
Representation of MeasFrame. More... | |
Friends | |
class | MCFrame |
Machinery. More... | |
ostream & | operator<< (ostream &os, MeasFrame &mf) |
Output a frame. More... | |
Bool | MCFrameGetdbl (void *dmf, uInt tp, Double &result) |
Bool | MCFrameGetmvdir (void *dmf, uInt tp, MVDirection &result) |
Bool | MCFrameGetmvpos (void *dmf, uInt tp, MVPosition &result) |
Bool | MCFrameGetuint (void *dmf, uInt tp, uInt &result) |
Container for Measure frame.
Public interface
From Measure and Frame
Measurements are made in a reference frame (epoch, position, direction, ...).
The class is a container for the reference frame Measures (MEpoch etc). Since a frame will possibly be used by many different Measures, it behaves as a smart pointer, with reference rather than copy characteristics. Since it caches all its operations, it is advisable to have a 'global' MeasFrame across an execution, resetting (or setting) its values when appropriate. The frame can also contain other related information. At the moment the orbit of a solar system body (MeasComet) can be set. In future the planetary ephemeris used (e.g. DE205) and environmental information like refraction data will be added.
A MeasFrame is constructed by setting the appropriate Measures, either in a constructor, or with a set(). The input to the constructors and set are Measures.
Inside the frames automatic conversion to the most appropriate usage of its values is done (e.g. time to TBD time, position to astronomical longitude). These conversions are done only if an explicit Measure::Convert was used that needed information, e.g. the following code:
will set-up a state machine to convert UTC(default) to LAST in conv; the next call will do the actual conversion. During this conversion, the astronomical longitude (among others) will be needed to convert to local sidereal time. conv will ask (getLong()) this from the frame, which will calculate it (including possible other conversions) from the observatory's position specified in a frame. Any calculation done will be cached (e.g. a Nutation calculation in this case for dpsi), and used in subsequent conversions using the same frame.
Furthermore, a frame will often be regularly updated (e.g. coordinate conversion for a series of times). To make use of cached information, and to speed up as much as possible, reset...()
functions are available. These reset functions accept the same range of input parameter types as the MeasConvert () operator, and will keep any determined conversion machines and related information intact, only recalculating whatever is necessary.
The actual frame calculations and interrogations are done in a separate MCFrame hidden class, which attaches itself to MeasFrame when and if necessary (see there if you are really curious).
. get...() functions can return frame measures. Only when the frame has been attached to a calculating machine *MCFrame) are these values available. This attachment is done if the frame has been actively used by a Measure::Convert engine, or if explicitly done by the MCFrame::make(MeasFrame &)
static method.
Caution: An explicit (or implicit) call to MCFrame::make will load the whole conversion machinery (including Tables) into your linked module);
Aipsrc keywords can be used for additional (highly specialised) additional internal conversion parameters.
To separate the frame definition from the measure type
Definition at line 137 of file MeasFrame.h.
Enumeration for the different farme entries possible.
This can be used to find out if a certain conversion needs the frame. It will be used in a registration/notify environment to enable bypassing of some new conversion settings.
Enumerator | |
---|---|
EPOCH | |
POSITION | |
DIRECTION | |
VELOCITY | |
COMET |
Definition at line 158 of file MeasFrame.h.
casacore::MeasFrame::MeasFrame | ( | ) |
Default constructor.
casacore::MeasFrame::MeasFrame | ( | const Measure & | meas1 | ) |
casacore::MeasFrame::MeasFrame | ( | const Measure & | meas1, |
const Measure & | meas2, | ||
const Measure & | meas3 | ||
) |
casacore::MeasFrame::MeasFrame | ( | const MeasFrame & | other | ) |
Copy constructor (reference semantics)
casacore::MeasFrame::~MeasFrame | ( | ) |
Destructor.
const MeasComet* casacore::MeasFrame::comet | ( | ) | const |
Get the comet pointer (0 if not present)
|
private |
Create an instance of the MeasFrame class.
const Measure* casacore::MeasFrame::direction | ( | ) | const |
Get the direction pointer (0 if not present)
Bool casacore::MeasFrame::empty | ( | ) | const |
Test if empty (i.e.
no measure filled in)
const Measure* casacore::MeasFrame::epoch | ( | ) | const |
Get the epoch pointer (0 if not present)
|
private |
Throw reset error.
|
private |
Bool casacore::MeasFrame::getApp | ( | MVDirection & | tdb | ) | const |
Get apparent coordinates (direction cosines)
Bool casacore::MeasFrame::getB1950 | ( | MVDirection & | tdb | ) | const |
Get B1950 coordinates (direction cosines)
Bool casacore::MeasFrame::getComet | ( | MVPosition & | tdb | ) | const |
Get the comet coordinates.
Bool casacore::MeasFrame::getITRF | ( | MVPosition & | tdb | ) | const |
Get the position.
Bool casacore::MeasFrame::getJ2000 | ( | MVDirection & | tdb | ) | const |
Get J2000 coordinates (direction cosines) and its longitude/latitude (rad)
Get data from frame.
Only available if appropriate measures are set, and the frame is in a calculating state.
Get TDB in days
|
private |
Lock the frame to make sure deletion occurs when needed.
|
private |
Make full Comet.
|
private |
Make full Direction.
|
private |
Make full Epoch.
|
private |
Make full Position.
|
private |
Make full RadialVelocity.
Copy assignment (reference semantics)
const Measure* casacore::MeasFrame::position | ( | ) | const |
Get the position pointer (0 if not present)
const Measure* casacore::MeasFrame::radialVelocity | ( | ) | const |
Get the radial velocity pointer (0 if not present)
void casacore::MeasFrame::resetComet | ( | const MeasComet & | val | ) |
void casacore::MeasFrame::resetDirection | ( | const MVDirection & | val | ) |
void casacore::MeasFrame::resetDirection | ( | const Measure & | val | ) |
void casacore::MeasFrame::resetEpoch | ( | Double | val | ) |
void casacore::MeasFrame::resetEpoch | ( | const MVEpoch & | val | ) |
void casacore::MeasFrame::resetEpoch | ( | const Measure & | val | ) |
void casacore::MeasFrame::resetPosition | ( | const MVPosition & | val | ) |
void casacore::MeasFrame::resetPosition | ( | const Measure & | val | ) |
void casacore::MeasFrame::resetRadialVelocity | ( | const MVRadialVelocity & | val | ) |
void casacore::MeasFrame::resetRadialVelocity | ( | const Measure & | val | ) |
void casacore::MeasFrame::set | ( | const Measure & | meas1 | ) |
void casacore::MeasFrame::set | ( | const Measure & | meas1, |
const Measure & | meas2, | ||
const Measure & | meas3 | ||
) |
void casacore::MeasFrame::set | ( | const MeasComet & | meas | ) |
|
private |
Unlock the frame.
|
friend |
Machinery.
Definition at line 146 of file MeasFrame.h.
|
friend |
|
friend |
|
friend |
Output a frame.
|
private |
Representation of MeasFrame.
Definition at line 297 of file MeasFrame.h.