casa
$Rev:20696$
|
00001 //# MCFrame.h: Measure frame calculations proxy 00002 //# Copyright (C) 1996-2003,2007 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be addressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 //# $Id: MCFrame.h 19852 2007-02-13 01:54:23Z Malte.Marquarding $ 00027 00028 #ifndef MEASURES_MCFRAME_H 00029 #define MEASURES_MCFRAME_H 00030 00031 //# Includes 00032 #include <casa/aips.h> 00033 #include <casa/Arrays/Vector.h> 00034 #include <measures/Measures/Measure.h> 00035 #include <measures/Measures/MeasFrame.h> 00036 00037 namespace casa { //# NAMESPACE CASA - BEGIN 00038 00039 //# Forward Declarations 00040 class MVDirection; 00041 class MVPosition; 00042 00043 // <summary> 00044 // Measure frame calculations proxy 00045 // </summary> 00046 00047 // <use visibility=local> 00048 00049 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="tMeasure" demos=""> 00050 // </reviewed> 00051 00052 // <prerequisite> 00053 // <li> <linkto class=Measure>Measure</linkto> class 00054 // <li> <linkto class=MeasFrame>MeasFrame</linkto> class 00055 // </prerequisite> 00056 // 00057 // <etymology> 00058 // From Measure and Frame 00059 // </etymology> 00060 // 00061 // <synopsis> 00062 // The <linkto class=MeasFrame>MeasFrame</linkto> class contains the 'when 00063 // and where' of an observed Measure. Calculations to get the appropiate 00064 // value (e.g. the Earth's longitude) from this frame for conversions are 00065 // done in this class, together with all the caching of (intermediate) results 00066 // that can speed-up calculations.<br> 00067 // The MCFrame class is used by the individual measure conversion classes 00068 // (see <linkto class=MCBase>MCBase</linkto> class).<br> 00069 // </synopsis> 00070 // 00071 // <example> 00072 // <srcblock> 00073 // MEpoch my_epoch(Quantity(MeasData::MJDB1950,"d")); // an epoch 00074 // MCFrame frame(my_epoch); // used in a frame 00075 // frame.set(obser); // add observatory (an MPosition) 00076 // MEpoch::Convert conv(my_epoch, MEPoch::Ref(MEpoch::LAST, frame)); 00077 // </srcblock> 00078 // The <em>conv</em> conversion engine will (transpararently) use the MCFrame 00079 // class in calls from MCEpoch (the time conversions), which will be called 00080 // by the MEpoch::Convert () operator. 00081 // </example> 00082 // 00083 // <motivation> 00084 // To separate the frame calculations from the Measure containers, to enable 00085 // e.g. Tables to have Measures. 00086 // </motivation> 00087 // 00088 // <todo asof="1997/04/17"> 00089 // </todo> 00090 00091 class MCFrame { 00092 00093 public: 00094 00095 //# Friends 00096 00097 //# Constructors 00098 // Construct using the MeasFrame parent 00099 MCFrame(MeasFrame &inf); 00100 00101 // Destructor 00102 ~MCFrame(); 00103 00104 //# Operators 00105 00106 //# General member functions 00107 // Reset Epoch value 00108 void resetEpoch(); 00109 // Reset Position value 00110 void resetPosition(); 00111 // Reset Direction value 00112 void resetDirection(); 00113 // Reset RadialVelocity value 00114 void resetRadialVelocity(); 00115 // Reset Comet 00116 void resetComet(); 00117 // Make full Epoch 00118 void makeEpoch(); 00119 // Make full Position 00120 void makePosition(); 00121 // Make full Direction 00122 void makeDirection(); 00123 // Make full RadialVelocity 00124 void makeRadialVelocity(); 00125 // Make full Comet 00126 void makeComet(); 00127 00128 // Get TDB in days 00129 Bool getTDB(Double &tdb); 00130 // Get UT1 in days 00131 Bool getUT1(Double &tdb); 00132 // Get TT in days 00133 Bool getTT(Double &tdb); 00134 // Get the longitude (in rad) 00135 Bool getLong(Double &tdb); 00136 // Get the latitude (ITRF) (in rad) 00137 Bool getLat(Double &tdb); 00138 // Get the position 00139 Bool getITRF(MVPosition &tdb); 00140 // Get the geocentric position (in m) 00141 Bool getRadius(Double &tdb); 00142 // Get the geodetic latitude 00143 Bool getLatGeo(Double &tdb); 00144 // Get the LAST (in days) 00145 Bool getLAST(Double &tdb); 00146 // Get the LAST (in rad) 00147 Bool getLASTr(Double &tdb); 00148 // Get J2000 coordinates (direction cosines) and long/lat (rad) 00149 // <group> 00150 Bool getJ2000(MVDirection &tdb); 00151 Bool getJ2000Long(Double &tdb); 00152 Bool getJ2000Lat(Double &tdb); 00153 // </group> 00154 // Get B1950 coordinates (direction cosines) and long/lat (rad) 00155 // <group> 00156 Bool getB1950(MVDirection &tdb); 00157 Bool getB1950Long(Double &tdb); 00158 Bool getB1950Lat(Double &tdb); 00159 // </group> 00160 // Get apparent coordinates (direction cosines) and long/lat (rad) 00161 // <group> 00162 Bool getApp(MVDirection &tdb); 00163 Bool getAppLong(Double &tdb); 00164 Bool getAppLat(Double &tdb); 00165 // </group> 00166 // Get LSR radial velocity (m/s) 00167 Bool getLSR(Double &tdb); 00168 // Get Comet type 00169 Bool getCometType(uInt &tdb); 00170 // Get Comet position 00171 Bool getComet(MVPosition &tdb); 00172 00173 private: 00174 //# Data 00175 // The belonging frame pointer 00176 MeasFrame myf; 00177 // The actual measure conversion values 00178 // <group> 00179 // Conversion to TDB time (due to some (for me) unsolvable dependency 00180 // errors) 00181 // not the proper MeasConvert* here) 00182 void *epConvTDB; 00183 // TDB time 00184 Double *epTDBp; 00185 // Conversion to UT1 time 00186 void *epConvUT1; 00187 // UT1 time 00188 Double *epUT1p; 00189 // Conversion to TT time 00190 void *epConvTT; 00191 // TT time 00192 Double *epTTp; 00193 // Conversion to LAST time 00194 void *epConvLAST; 00195 // LAST time 00196 Double *epLASTp; 00197 // Conversion to ITRF longitude/latitude 00198 void *posConvLong; 00199 // Longitude 00200 Vector<Double> *posLongp; 00201 // Position 00202 MVPosition *posITRFp; 00203 // Conversion to geodetic longitude/latitude 00204 void *posConvLongGeo; 00205 // Latitude 00206 Vector<Double> *posLongGeop; 00207 // Position 00208 MVPosition *posGeop; 00209 // Conversion to J2000 00210 void *dirConvJ2000; 00211 // Longitude 00212 Vector<Double> *j2000Longp; 00213 // J2000 coordinates 00214 MVDirection *dirJ2000p; 00215 // Conversion to B1950 00216 void *dirConvB1950; 00217 // Longitude 00218 Vector<Double> *b1950Longp; 00219 // B1950 coordinates 00220 MVDirection *dirB1950p; 00221 // Conversion to apparent coordinates 00222 void *dirConvApp; 00223 // Longitude 00224 Vector<Double> *appLongp; 00225 // Apparent coordinates 00226 MVDirection *dirAppp; 00227 // Conversion to LSR radial velocity 00228 void *radConvLSR; 00229 // Radial velocity 00230 Double *radLSRp; 00231 // </group> 00232 00233 //# Member functions 00234 // Default constructor (not implemented) 00235 MCFrame(); 00236 // Copy constructor (not implemented) 00237 MCFrame(const MCFrame &other); 00238 // Copy assignment (not implemented) 00239 MCFrame &operator=(const MCFrame &other); 00240 }; 00241 00242 00243 } //# NAMESPACE CASA - END 00244 00245 #endif