casacore
Loading...
Searching...
No Matches
MCFrame.h
Go to the documentation of this file.
1//# MCFrame.h: Measure frame calculations proxy
2//# Copyright (C) 1996-2003,2007
3//# Associated Universities, Inc. Washington DC, USA.
4//#
5//# This library is free software; you can redistribute it and/or modify it
6//# under the terms of the GNU Library General Public License as published by
7//# the Free Software Foundation; either version 2 of the License, or (at your
8//# option) any later version.
9//#
10//# This library is distributed in the hope that it will be useful, but WITHOUT
11//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13//# License for more details.
14//#
15//# You should have received a copy of the GNU Library General Public License
16//# along with this library; if not, write to the Free Software Foundation,
17//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18//#
19//# Correspondence concerning AIPS++ should be addressed as follows:
20//# Internet email: casa-feedback@nrao.edu.
21//# Postal address: AIPS++ Project Office
22//# National Radio Astronomy Observatory
23//# 520 Edgemont Road
24//# Charlottesville, VA 22903-2475 USA
25
26#ifndef MEASURES_MCFRAME_H
27#define MEASURES_MCFRAME_H
28
29//# Includes
30#include <casacore/casa/aips.h>
31#include <casacore/measures/Measures/Measure.h>
32
33namespace casacore { //# NAMESPACE CASACORE - BEGIN
34
35//# Forward Declarations
36class MeasFrame;
37struct MCFrameImplementation;
38
39// <summary>
40// Measure frame calculations proxy
41// </summary>
42
43// <use visibility=local>
44
45// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="tMeasure" demos="">
46// </reviewed>
47
48// <prerequisite>
49// <li> <linkto class=Measure>Measure</linkto> class
50// <li> <linkto class=MeasFrame>MeasFrame</linkto> class
51// </prerequisite>
52//
53// <etymology>
54// From Measure and Frame
55// </etymology>
56//
57// <synopsis>
58// The <linkto class=MeasFrame>MeasFrame</linkto> class contains the 'when
59// and where' of an observed Measure. Calculations to get the appropiate
60// value (e.g. the Earth's longitude) from this frame for conversions are
61// done in this class, together with all the caching of (intermediate) results
62// that can speed-up calculations.<br>
63// The MCFrame class is used by the individual measure conversion classes
64// (see <linkto class=MCBase>MCBase</linkto> class).<br>
65// </synopsis>
66//
67// <example>
68// <srcblock>
69// MEpoch my_epoch(Quantity(MeasData::MJDB1950,"d")); // an epoch
70// MCFrame frame(my_epoch); // used in a frame
71// frame.set(obser); // add observatory (an MPosition)
72// MEpoch::Convert conv(my_epoch, MEPoch::Ref(MEpoch::LAST, frame));
73// </srcblock>
74// The <em>conv</em> conversion engine will (transpararently) use the MCFrame
75// class in calls from MCEpoch (the time conversions), which will be called
76// by the MEpoch::Convert () operator.
77// </example>
78//
79// <motivation>
80// To separate the frame calculations from the Measure containers, to enable
81// e.g. Tables to have Measures.
82// </motivation>
83//
84// <todo asof="1997/04/17">
85// </todo>
86
87class MCFrame {
88
89public:
90
91 //# Friends
92
93 //# Constructors
94 // Construct using the MeasFrame parent
96 MCFrame(const MCFrame &other);
97 MCFrame(MCFrame &&other);
98
99 // Destructor
101
102 //# Operators
103
104 //# General member functions
105 // Reset Epoch value
107 // Reset Position value
109 // Reset Direction value
111 // Reset RadialVelocity value
113 // Reset Comet
115 // Make full Epoch
116 void makeEpoch(MeasFrame& frame);
117 // Make full Position
118 void makePosition(const MeasFrame& frame);
119 // Make full Direction
121 // Make full RadialVelocity
122 void makeRadialVelocity(const MeasFrame& frame);
123 // Make full Comet
124 void makeComet();
125
126 // Get time as Temps Dynamique Barycentrique (TDB, or Barycentric Dynamical Time) in days
127 Bool getTDB(Double &tdb, const MeasFrame& frame);
128 // Get UT1 in days
129 Bool getUT1(Double &tdb, const MeasFrame& frame);
130 // Get TT in days
131 Bool getTT(Double &tdb, const MeasFrame& frame);
132 // Get the longitude (in rad)
133 Bool getLong(Double &tdb, const MeasFrame& frame);
134 // Get the latitude (ITRF) (in rad)
135 Bool getLat(Double &tdb, const MeasFrame& frame);
136 // Get the position
137 Bool getITRF(MVPosition &tdb, const MeasFrame& frame);
138 // Get the geocentric position (in m)
139 Bool getRadius(Double &tdb, const MeasFrame& frame);
140 // Get the geodetic latitude
141 Bool getLatGeo(Double &tdb, const MeasFrame& frame);
142 // Get the LAST (in days)
143 Bool getLAST(Double &tdb, const MeasFrame& frame);
144 // Get the LAST (in rad)
145 Bool getLASTr(Double &tdb, const MeasFrame& frame);
146 // Get J2000 coordinates (direction cosines) and long/lat (rad)
147 // <group>
148 Bool getJ2000(MVDirection &tdb, const MeasFrame& frame);
149 Bool getJ2000Long(Double &tdb, const MeasFrame& frame);
150 Bool getJ2000Lat(Double &tdb, const MeasFrame& frame);
151 // </group>
152 // Get B1950 coordinates (direction cosines) and long/lat (rad)
153 // <group>
154 Bool getB1950(MVDirection &tdb, const MeasFrame& frame);
155 Bool getB1950Long(Double &tdb, const MeasFrame& frame);
156 Bool getB1950Lat(Double &tdb, const MeasFrame& frame);
157 // </group>
158 // Get apparent coordinates (direction cosines) and long/lat (rad)
159 // <group>
160 Bool getApp(MVDirection &tdb, const MeasFrame& frame);
161 Bool getAppLong(Double &tdb, const MeasFrame& frame);
162 Bool getAppLat(Double &tdb, const MeasFrame& frame);
163 // </group>
164 // Get LSR radial velocity (m/s)
165 Bool getLSR(Double &tdb, const MeasFrame& frame);
166 // Get Comet type
167 Bool getCometType(uInt &tdb, const MeasFrame& frame);
168 // Get Comet position
169 Bool getComet(MVPosition &tdb, const MeasFrame& frame);
170
171private:
172 MCFrame &operator=(const MCFrame &other) = delete;
173
174 // pointer-to-implementation (pimpl) pattern is used to avoid a large number of
175 // dependencies in the header file.
176 std::unique_ptr<MCFrameImplementation> impl_;
177};
178
179
180} //# NAMESPACE CASACORE - END
181
182#endif
void makePosition(const MeasFrame &frame)
Make full Position.
Bool getB1950Lat(Double &tdb, const MeasFrame &frame)
void makeEpoch(MeasFrame &frame)
Make full Epoch.
void resetPosition()
Reset Position value.
void resetComet()
Reset Comet.
void resetEpoch()
Reset Epoch value.
void makeComet()
Make full Comet.
Bool getLong(Double &tdb, const MeasFrame &frame)
Get the longitude (in rad).
Bool getITRF(MVPosition &tdb, const MeasFrame &frame)
Get the position.
void makeRadialVelocity(const MeasFrame &frame)
Make full RadialVelocity.
MCFrame(MCFrame &&other)
Bool getAppLong(Double &tdb, const MeasFrame &frame)
MCFrame()
Construct using the MeasFrame parent.
Bool getTDB(Double &tdb, const MeasFrame &frame)
Get time as Temps Dynamique Barycentrique (TDB, or Barycentric Dynamical Time) in days.
std::unique_ptr< MCFrameImplementation > impl_
pointer-to-implementation (pimpl) pattern is used to avoid a large number of dependencies in the head...
Definition MCFrame.h:176
Bool getLatGeo(Double &tdb, const MeasFrame &frame)
Get the geodetic latitude.
Bool getAppLat(Double &tdb, const MeasFrame &frame)
Bool getLASTr(Double &tdb, const MeasFrame &frame)
Get the LAST (in rad).
Bool getApp(MVDirection &tdb, const MeasFrame &frame)
Get apparent coordinates (direction cosines) and long/lat (rad).
void makeDirection(MeasFrame &frame)
Make full Direction.
Bool getRadius(Double &tdb, const MeasFrame &frame)
Get the geocentric position (in m).
Bool getLat(Double &tdb, const MeasFrame &frame)
Get the latitude (ITRF) (in rad).
Bool getJ2000Lat(Double &tdb, const MeasFrame &frame)
Bool getTT(Double &tdb, const MeasFrame &frame)
Get TT in days.
Bool getB1950Long(Double &tdb, const MeasFrame &frame)
Bool getCometType(uInt &tdb, const MeasFrame &frame)
Get Comet type.
MCFrame(const MCFrame &other)
void resetDirection()
Reset Direction value.
void resetRadialVelocity()
Reset RadialVelocity value.
Bool getUT1(Double &tdb, const MeasFrame &frame)
Get UT1 in days.
MCFrame & operator=(const MCFrame &other)=delete
Bool getComet(MVPosition &tdb, const MeasFrame &frame)
Get Comet position.
Bool getJ2000(MVDirection &tdb, const MeasFrame &frame)
Get J2000 coordinates (direction cosines) and long/lat (rad).
Bool getLSR(Double &tdb, const MeasFrame &frame)
Get LSR radial velocity (m/s).
~MCFrame()
Destructor.
Bool getLAST(Double &tdb, const MeasFrame &frame)
Get the LAST (in days).
Bool getB1950(MVDirection &tdb, const MeasFrame &frame)
Get B1950 coordinates (direction cosines) and long/lat (rad).
Bool getJ2000Long(Double &tdb, const MeasFrame &frame)
this file contains all the compiler specific defines
Definition mainpage.dox:28
unsigned int uInt
Definition aipstype.h:49
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
double Double
Definition aipstype.h:53