casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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>
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
99  MCFrame(MeasFrame &inf);
100 
101  // Destructor
102  ~MCFrame();
103 
104  //# Operators
105 
106  //# General member functions
107  // Reset Epoch value
108  void resetEpoch();
109  // Reset Position value
110  void resetPosition();
111  // Reset Direction value
112  void resetDirection();
113  // Reset RadialVelocity value
114  void resetRadialVelocity();
115  // Reset Comet
116  void resetComet();
117  // Make full Epoch
118  void makeEpoch();
119  // Make full Position
120  void makePosition();
121  // Make full Direction
122  void makeDirection();
123  // Make full RadialVelocity
124  void makeRadialVelocity();
125  // Make full Comet
126  void makeComet();
127 
128  // Get TDB in days
129  Bool getTDB(Double &tdb);
130  // Get UT1 in days
131  Bool getUT1(Double &tdb);
132  // Get TT in days
133  Bool getTT(Double &tdb);
134  // Get the longitude (in rad)
135  Bool getLong(Double &tdb);
136  // Get the latitude (ITRF) (in rad)
137  Bool getLat(Double &tdb);
138  // Get the position
139  Bool getITRF(MVPosition &tdb);
140  // Get the geocentric position (in m)
141  Bool getRadius(Double &tdb);
142  // Get the geodetic latitude
143  Bool getLatGeo(Double &tdb);
144  // Get the LAST (in days)
145  Bool getLAST(Double &tdb);
146  // Get the LAST (in rad)
147  Bool getLASTr(Double &tdb);
148  // Get J2000 coordinates (direction cosines) and long/lat (rad)
149  // <group>
150  Bool getJ2000(MVDirection &tdb);
151  Bool getJ2000Long(Double &tdb);
152  Bool getJ2000Lat(Double &tdb);
153  // </group>
154  // Get B1950 coordinates (direction cosines) and long/lat (rad)
155  // <group>
156  Bool getB1950(MVDirection &tdb);
157  Bool getB1950Long(Double &tdb);
158  Bool getB1950Lat(Double &tdb);
159  // </group>
160  // Get apparent coordinates (direction cosines) and long/lat (rad)
161  // <group>
162  Bool getApp(MVDirection &tdb);
163  Bool getAppLong(Double &tdb);
164  Bool getAppLat(Double &tdb);
165  // </group>
166  // Get LSR radial velocity (m/s)
167  Bool getLSR(Double &tdb);
168  // Get Comet type
169  Bool getCometType(uInt &tdb);
170  // Get Comet position
171  Bool getComet(MVPosition &tdb);
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)
235  MCFrame();
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
void makeDirection()
Make full Direction.
MVPosition * posITRFp
Position.
Definition: MCFrame.h:202
void makePosition()
Make full Position.
void resetPosition()
Reset Position value.
Vector< Double > * j2000Longp
Longitude.
Definition: MCFrame.h:212
MVPosition * posGeop
Position.
Definition: MCFrame.h:208
MVDirection * dirJ2000p
J2000 coordinates.
Definition: MCFrame.h:214
void * epConvTT
Conversion to TT time.
Definition: MCFrame.h:190
Bool getCometType(uInt &tdb)
Get Comet type.
void * epConvLAST
Conversion to LAST time.
Definition: MCFrame.h:194
Vector< Double > * appLongp
Longitude.
Definition: MCFrame.h:224
Double * epTDBp
TDB time.
Definition: MCFrame.h:184
MVDirection * dirB1950p
B1950 coordinates.
Definition: MCFrame.h:220
Vector< Double > * b1950Longp
Longitude.
Definition: MCFrame.h:218
Bool getComet(MVPosition &tdb)
Get Comet position.
Bool getTDB(Double &tdb)
Get TDB in days.
MeasFrame myf
The belonging frame pointer.
Definition: MCFrame.h:176
Container for Measure frame.
Definition: MeasFrame.h:137
Bool getLatGeo(Double &tdb)
Get the geodetic latitude.
Bool getTT(Double &tdb)
Get TT in days.
void resetRadialVelocity()
Reset RadialVelocity value.
Bool getJ2000Lat(Double &tdb)
void resetDirection()
Reset Direction value.
Bool getAppLong(Double &tdb)
Measure frame calculations proxy.
Definition: MCFrame.h:91
Bool getLat(Double &tdb)
Get the latitude (ITRF) (in rad)
MVDirection * dirAppp
Apparent coordinates.
Definition: MCFrame.h:226
void resetComet()
Reset Comet.
Bool getJ2000(MVDirection &tdb)
Get J2000 coordinates (direction cosines) and long/lat (rad)
Double * radLSRp
Radial velocity.
Definition: MCFrame.h:230
Bool getLSR(Double &tdb)
Get LSR radial velocity (m/s)
MCFrame & operator=(const MCFrame &other)
Copy assignment (not implemented)
Vector< Double > * posLongGeop
Latitude.
Definition: MCFrame.h:206
Bool getAppLat(Double &tdb)
Double * epTTp
TT time.
Definition: MCFrame.h:192
void * epConvTDB
The actual measure conversion values.
Definition: MCFrame.h:182
void resetEpoch()
Reset Epoch value.
MCFrame()
Default constructor (not implemented)
double Double
Definition: aipstype.h:55
Double * epLASTp
LAST time.
Definition: MCFrame.h:196
Bool getB1950Long(Double &tdb)
void * dirConvB1950
Conversion to B1950.
Definition: MCFrame.h:216
void * posConvLongGeo
Conversion to geodetic longitude/latitude.
Definition: MCFrame.h:204
void * posConvLong
Conversion to ITRF longitude/latitude.
Definition: MCFrame.h:198
void * radConvLSR
Conversion to LSR radial velocity.
Definition: MCFrame.h:228
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
A 3D vector in space.
Definition: MVPosition.h:113
void * epConvUT1
Conversion to UT1 time.
Definition: MCFrame.h:186
Bool getB1950Lat(Double &tdb)
Bool getLAST(Double &tdb)
Get the LAST (in days)
void makeRadialVelocity()
Make full RadialVelocity.
Bool getB1950(MVDirection &tdb)
Get B1950 coordinates (direction cosines) and long/lat (rad)
~MCFrame()
Destructor.
Bool getApp(MVDirection &tdb)
Get apparent coordinates (direction cosines) and long/lat (rad)
Double * epUT1p
UT1 time.
Definition: MCFrame.h:188
void makeComet()
Make full Comet.
void makeEpoch()
Make full Epoch.
Vector of three direction cosines.
Definition: MVDirection.h:106
Bool getRadius(Double &tdb)
Get the geocentric position (in m)
void * dirConvJ2000
Conversion to J2000.
Definition: MCFrame.h:210
void * dirConvApp
Conversion to apparent coordinates.
Definition: MCFrame.h:222
Bool getLASTr(Double &tdb)
Get the LAST (in rad)
Bool getLong(Double &tdb)
Get the longitude (in rad)
Vector< Double > * posLongp
Longitude.
Definition: MCFrame.h:200
Bool getJ2000Long(Double &tdb)
unsigned int uInt
Definition: aipstype.h:51
Bool getUT1(Double &tdb)
Get UT1 in days.
Bool getITRF(MVPosition &tdb)
Get the position.
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42