casacore
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: aips2-request@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 //# $Id$
27 
28 #ifndef MEASURES_MCFRAME_H
29 #define MEASURES_MCFRAME_H
30 
31 //# Includes
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/Arrays/Vector.h>
34 #include <casacore/measures/Measures/Measure.h>
35 #include <casacore/measures/Measures/MeasFrame.h>
36 
37 namespace casacore { //# NAMESPACE CASACORE - BEGIN
38 
39 //# Forward Declarations
40 class MVDirection;
41 class MVPosition;
42 
43 // <summary>
44 // Measure frame calculations proxy
45 // </summary>
46 
47 // <use visibility=local>
48 
49 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="tMeasure" demos="">
50 // </reviewed>
51 
52 // <prerequisite>
53 // <li> <linkto class=Measure>Measure</linkto> class
54 // <li> <linkto class=MeasFrame>MeasFrame</linkto> class
55 // </prerequisite>
56 //
57 // <etymology>
58 // From Measure and Frame
59 // </etymology>
60 //
61 // <synopsis>
62 // The <linkto class=MeasFrame>MeasFrame</linkto> class contains the 'when
63 // and where' of an observed Measure. Calculations to get the appropiate
64 // value (e.g. the Earth's longitude) from this frame for conversions are
65 // done in this class, together with all the caching of (intermediate) results
66 // that can speed-up calculations.<br>
67 // The MCFrame class is used by the individual measure conversion classes
68 // (see <linkto class=MCBase>MCBase</linkto> class).<br>
69 // </synopsis>
70 //
71 // <example>
72 // <srcblock>
73 // MEpoch my_epoch(Quantity(MeasData::MJDB1950,"d")); // an epoch
74 // MCFrame frame(my_epoch); // used in a frame
75 // frame.set(obser); // add observatory (an MPosition)
76 // MEpoch::Convert conv(my_epoch, MEPoch::Ref(MEpoch::LAST, frame));
77 // </srcblock>
78 // The <em>conv</em> conversion engine will (transpararently) use the MCFrame
79 // class in calls from MCEpoch (the time conversions), which will be called
80 // by the MEpoch::Convert () operator.
81 // </example>
82 //
83 // <motivation>
84 // To separate the frame calculations from the Measure containers, to enable
85 // e.g. Tables to have Measures.
86 // </motivation>
87 //
88 // <todo asof="1997/04/17">
89 // </todo>
90 
91 class MCFrame {
92 
93 public:
94 
95  //# Friends
96 
97  //# Constructors
98  // Construct using the MeasFrame parent
100 
101  // Destructor
103 
104  //# Operators
105 
106  //# General member functions
107  // Reset Epoch value
108  void resetEpoch();
109  // Reset Position value
111  // Reset Direction value
113  // Reset RadialVelocity value
115  // Reset Comet
116  void resetComet();
117  // Make full Epoch
118  void makeEpoch();
119  // Make full Position
120  void makePosition();
121  // Make full Direction
123  // Make full RadialVelocity
125  // Make full Comet
126  void makeComet();
127 
128  // Get TDB in days
130  // Get UT1 in days
132  // Get TT in days
134  // Get the longitude (in rad)
136  // Get the latitude (ITRF) (in rad)
138  // Get the position
140  // Get the geocentric position (in m)
142  // Get the geodetic latitude
144  // Get the LAST (in days)
146  // Get the LAST (in rad)
148  // Get J2000 coordinates (direction cosines) and long/lat (rad)
149  // <group>
153  // </group>
154  // Get B1950 coordinates (direction cosines) and long/lat (rad)
155  // <group>
159  // </group>
160  // Get apparent coordinates (direction cosines) and long/lat (rad)
161  // <group>
165  // </group>
166  // Get LSR radial velocity (m/s)
168  // Get Comet type
170  // Get Comet position
172 
173 private:
174  //# Data
175  // The belonging frame pointer
177  // The actual measure conversion values
178  // <group>
179  // Conversion to TDB time (due to some (for me) unsolvable dependency
180  // errors)
181  // not the proper MeasConvert* here)
182  void *epConvTDB;
183  // TDB time
185  // Conversion to UT1 time
186  void *epConvUT1;
187  // UT1 time
189  // Conversion to TT time
190  void *epConvTT;
191  // TT time
193  // Conversion to LAST time
194  void *epConvLAST;
195  // LAST time
197  // Conversion to ITRF longitude/latitude
198  void *posConvLong;
199  // Longitude
201  // Position
203  // Conversion to geodetic longitude/latitude
205  // Latitude
207  // Position
209  // Conversion to J2000
211  // Longitude
213  // J2000 coordinates
215  // Conversion to B1950
217  // Longitude
219  // B1950 coordinates
221  // Conversion to apparent coordinates
222  void *dirConvApp;
223  // Longitude
225  // Apparent coordinates
227  // Conversion to LSR radial velocity
228  void *radConvLSR;
229  // Radial velocity
231  // </group>
232 
233  //# Member functions
234  // Default constructor (not implemented)
236  // Copy constructor (not implemented)
237  MCFrame(const MCFrame &other);
238  // Copy assignment (not implemented)
239  MCFrame &operator=(const MCFrame &other);
240 };
241 
242 
243 } //# NAMESPACE CASACORE - END
244 
245 #endif
Double * epTTp
TT time.
Definition: MCFrame.h:192
Bool getJ2000Long(Double &tdb)
void makeEpoch()
Make full Epoch.
MVPosition * posGeop
Position.
Definition: MCFrame.h:208
void resetPosition()
Reset Position value.
void * epConvLAST
Conversion to LAST time.
Definition: MCFrame.h:194
void resetComet()
Reset Comet.
void resetEpoch()
Reset Epoch value.
MVDirection * dirB1950p
B1950 coordinates.
Definition: MCFrame.h:220
MeasFrame myf
The belonging frame pointer.
Definition: MCFrame.h:176
void makeComet()
Make full Comet.
MVPosition * posITRFp
Position.
Definition: MCFrame.h:202
void * posConvLongGeo
Conversion to geodetic longitude/latitude.
Definition: MCFrame.h:204
Bool getApp(MVDirection &tdb)
Get apparent coordinates (direction cosines) and long/lat (rad)
void * dirConvApp
Conversion to apparent coordinates.
Definition: MCFrame.h:222
Bool getLong(Double &tdb)
Get the longitude (in rad)
Vector< Double > * b1950Longp
Longitude.
Definition: MCFrame.h:218
void makeRadialVelocity()
Make full RadialVelocity.
MCFrame()
Default constructor (not implemented)
Bool getJ2000Lat(Double &tdb)
Vector< Double > * appLongp
Longitude.
Definition: MCFrame.h:224
Bool getCometType(uInt &tdb)
Get Comet type.
Bool getLat(Double &tdb)
Get the latitude (ITRF) (in rad)
void * radConvLSR
Conversion to LSR radial velocity.
Definition: MCFrame.h:228
void * epConvTT
Conversion to TT time.
Definition: MCFrame.h:190
Bool getTT(Double &tdb)
Get TT in days.
Bool getRadius(Double &tdb)
Get the geocentric position (in m)
Vector< Double > * j2000Longp
Longitude.
Definition: MCFrame.h:212
Double * epUT1p
UT1 time.
Definition: MCFrame.h:188
Bool getLAST(Double &tdb)
Get the LAST (in days)
void makePosition()
Make full Position.
MVDirection * dirAppp
Apparent coordinates.
Definition: MCFrame.h:226
Bool getLASTr(Double &tdb)
Get the LAST (in rad)
void * dirConvJ2000
Conversion to J2000.
Definition: MCFrame.h:210
Bool getAppLat(Double &tdb)
Bool getITRF(MVPosition &tdb)
Get the position.
void * epConvUT1
Conversion to UT1 time.
Definition: MCFrame.h:186
void * dirConvB1950
Conversion to B1950.
Definition: MCFrame.h:216
void * posConvLong
Conversion to ITRF longitude/latitude.
Definition: MCFrame.h:198
Double * radLSRp
Radial velocity.
Definition: MCFrame.h:230
Bool getJ2000(MVDirection &tdb)
Get J2000 coordinates (direction cosines) and long/lat (rad)
void * epConvTDB
The actual measure conversion values.
Definition: MCFrame.h:182
Bool getLatGeo(Double &tdb)
Get the geodetic latitude.
Bool getB1950Long(Double &tdb)
Double * epLASTp
LAST time.
Definition: MCFrame.h:196
Bool getAppLong(Double &tdb)
Vector< Double > * posLongGeop
Latitude.
Definition: MCFrame.h:206
Bool getB1950Lat(Double &tdb)
MCFrame(const MCFrame &other)
Copy constructor (not implemented)
void resetDirection()
Reset Direction value.
void resetRadialVelocity()
Reset RadialVelocity value.
void makeDirection()
Make full Direction.
Bool getUT1(Double &tdb)
Get UT1 in days.
MCFrame(MeasFrame &inf)
Construct using the MeasFrame parent.
MVDirection * dirJ2000p
J2000 coordinates.
Definition: MCFrame.h:214
Bool getComet(MVPosition &tdb)
Get Comet position.
Bool getTDB(Double &tdb)
Get TDB in days.
Bool getLSR(Double &tdb)
Get LSR radial velocity (m/s)
MCFrame & operator=(const MCFrame &other)
Copy assignment (not implemented)
Bool getB1950(MVDirection &tdb)
Get B1950 coordinates (direction cosines) and long/lat (rad)
~MCFrame()
Destructor.
Double * epTDBp
TDB time.
Definition: MCFrame.h:184
Vector< Double > * posLongp
Longitude.
Definition: MCFrame.h:200
this file contains all the compiler specific defines
Definition: mainpage.dox:28
unsigned int uInt
Definition: aipstype.h:51
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
double Double
Definition: aipstype.h:55