00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef MEASURES_MCDIRECTION_H
00030 #define MEASURES_MCDIRECTION_H
00031
00032
00033 #include <casacore/casa/aips.h>
00034 #include <casacore/measures/Measures/MeasBase.h>
00035 #include <casacore/measures/Measures/MeasRef.h>
00036 #include <casacore/measures/Measures/MCBase.h>
00037 #include <casacore/measures/Measures/MConvertBase.h>
00038 #include <casacore/measures/Measures/MDirection.h>
00039 #include <casacore/measures/Measures/MeasMath.h>
00040 #include <casacore/casa/OS/Mutex.h>
00041
00042 namespace casacore {
00043
00044
00045 class MCDirection;
00046 class MVPosition;
00047 class String;
00048
00049 template <class T> class Vector;
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086 class MCDirection : public MCBase {
00087
00088 public:
00089
00090
00091
00092 friend class MeasConvert<MDirection>;
00093
00094
00095
00096 MCDirection();
00097
00098
00099 ~MCDirection();
00100
00101
00102
00103 static String showState();
00104
00105 private:
00106
00107
00108
00109
00110
00111
00112 enum Routes {
00113 GAL_J2000,
00114 GAL_B1950,
00115 J2000_GAL,
00116 B1950_GAL,
00117 J2000_B1950,
00118 J2000_B1950_VLA,
00119 B1950_J2000,
00120 B1950_VLA_J2000,
00121 B1950_B1950_VLA,
00122 B1950_VLA_B1950,
00123 J2000_JMEAN,
00124 B1950_BMEAN,
00125 JMEAN_J2000,
00126 JMEAN_JTRUE,
00127 BMEAN_B1950,
00128 BMEAN_BTRUE,
00129 JTRUE_JMEAN,
00130 BTRUE_BMEAN,
00131 J2000_JNAT,
00132 JNAT_J2000,
00133 B1950_APP,
00134 APP_B1950,
00135 APP_TOPO,
00136 HADEC_AZEL,
00137 HADEC_AZELGEO,
00138 AZEL_HADEC,
00139 AZELGEO_HADEC,
00140 HADEC_TOPO,
00141 AZEL_AZELSW,
00142 AZELGEO_AZELSWGEO,
00143 AZELSW_AZEL,
00144 AZELSWGEO_AZELGEO,
00145 APP_JNAT,
00146 JNAT_APP,
00147 J2000_ECLIP,
00148 ECLIP_J2000,
00149 JMEAN_MECLIP,
00150 MECLIP_JMEAN,
00151 JTRUE_TECLIP,
00152 TECLIP_JTRUE,
00153 GAL_SUPERGAL,
00154 SUPERGAL_GAL,
00155 ITRF_HADEC,
00156 HADEC_ITRF,
00157 TOPO_HADEC,
00158 TOPO_APP,
00159 ICRS_J2000,
00160 J2000_ICRS,
00161 N_Routes,
00162
00163 R_PLANET0,
00164 R_PLANET,
00165 R_COMET0,
00166 R_COMET,
00167
00168 R_MERCURY,
00169 R_VENUS,
00170 R_MARS,
00171 R_JUPITER,
00172 R_SATURN,
00173 R_URANUS,
00174 R_NEPTUNE,
00175 R_PLUTO,
00176 R_SUN,
00177 R_MOON };
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188 MVPosition *MVPOS1, *MVPOS2, *MVPOS3;
00189 Vector<Double> *VEC61, *VEC62, *VEC63;
00190 MeasMath measMath;
00191
00192
00193
00194 static uInt ToRef_p[N_Routes][3];
00195
00196 static uInt FromTo_p[MDirection::N_Types][MDirection::N_Types];
00197
00198 static MutexedInit theirMutexedInit;
00199
00200
00201 static void fillState()
00202 { theirMutexedInit.exec(); }
00203
00204
00205
00206 MCDirection(const MCDirection &other);
00207
00208 MCDirection &operator=(const MCDirection &other);
00209
00210
00211
00212
00213 virtual void getConvert(MConvertBase &mc,
00214 const MRBase &inref,
00215 const MRBase &outref);
00216
00217
00218 virtual void initConvert(uInt which, MConvertBase &mc);
00219
00220
00221 virtual void clearConvert();
00222
00223
00224 virtual void doConvert(MeasValue &in,
00225 MRBase &inref,
00226 MRBase &outref,
00227 const MConvertBase &mc);
00228
00229 void doConvert(MVDirection &in,
00230 MRBase &inref,
00231 MRBase &outref,
00232 const MConvertBase &mc);
00233
00234 private:
00235
00236 static void doFillState (void*);
00237 };
00238
00239
00240 }
00241
00242 #endif
00243