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_MCEARTHMAGNETIC_H
00030 #define MEASURES_MCEARTHMAGNETIC_H
00031
00032
00033 #include <casacore/casa/aips.h>
00034 #include <casacore/measures/Measures/MEarthMagnetic.h>
00035 #include <casacore/measures/Measures/MeasBase.h>
00036 #include <casacore/measures/Measures/MeasRef.h>
00037 #include <casacore/measures/Measures/MCBase.h>
00038 #include <casacore/measures/Measures/MConvertBase.h>
00039 #include <casacore/measures/Measures/MeasMath.h>
00040 #include <casacore/casa/OS/Mutex.h>
00041
00042 namespace casacore {
00043
00044
00045 class MCEarthMagnetic;
00046 class MVPosition;
00047 class EarthField;
00048 class String;
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 MCEarthMagnetic : public MCBase {
00087
00088 public:
00089
00090
00091
00092 friend class MeasConvert<MEarthMagnetic>;
00093
00094
00095
00096 MCEarthMagnetic();
00097
00098
00099 ~MCEarthMagnetic();
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 B1950_J2000,
00119 J2000_JMEAN,
00120 B1950_BMEAN,
00121 JMEAN_J2000,
00122 JMEAN_JTRUE,
00123 BMEAN_B1950,
00124 BMEAN_BTRUE,
00125 JTRUE_JMEAN,
00126 BTRUE_BMEAN,
00127 J2000_JNAT,
00128 JNAT_J2000,
00129 B1950_APP,
00130 APP_B1950,
00131 APP_TOPO,
00132 HADEC_AZEL,
00133 HADEC_AZELGEO,
00134 AZEL_HADEC,
00135 AZELGEO_HADEC,
00136 HADEC_TOPO,
00137 AZEL_AZELSW,
00138 AZELGEO_AZELSWGEO,
00139 AZELSW_AZEL,
00140 AZELSWGEO_AZELGEO,
00141 APP_JNAT,
00142 JNAT_APP,
00143 J2000_ECLIP,
00144 ECLIP_J2000,
00145 JMEAN_MECLIP,
00146 MECLIP_JMEAN,
00147 JTRUE_TECLIP,
00148 TECLIP_JTRUE,
00149 GAL_SUPERGAL,
00150 SUPERGAL_GAL,
00151 ITRF_HADEC,
00152 HADEC_ITRF,
00153 TOPO_HADEC,
00154 TOPO_APP,
00155 ICRS_J2000,
00156 J2000_ICRS,
00157 N_Routes,
00158
00159 R_MODEL0,
00160 R_MODEL,
00161
00162 R_IGRF
00163 };
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174 MVPosition *MVPOS1;
00175 EarthField *EFIELD;
00176 MeasMath measMath;
00177
00178
00179
00180 static uInt ToRef_p[N_Routes][3];
00181
00182 static uInt FromTo_p[MEarthMagnetic::N_Types][MEarthMagnetic::N_Types];
00183
00184 static MutexedInit theirMutexedInit;
00185
00186
00187 static void fillState()
00188 { theirMutexedInit.exec(); }
00189
00190
00191
00192 MCEarthMagnetic(const MCEarthMagnetic &other);
00193
00194 MCEarthMagnetic &operator=(const MCEarthMagnetic &other);
00195
00196
00197
00198
00199 virtual void getConvert(MConvertBase &mc,
00200 const MRBase &inref,
00201 const MRBase &outref);
00202
00203
00204 virtual void initConvert(uInt which, MConvertBase &mc);
00205
00206
00207 virtual void clearConvert();
00208
00209
00210 virtual void doConvert(MeasValue &in,
00211 MRBase &inref,
00212 MRBase &outref,
00213 const MConvertBase &mc);
00214
00215 void doConvert(MVEarthMagnetic &in,
00216 MRBase &inref,
00217 MRBase &outref,
00218 const MConvertBase &mc);
00219
00220 private:
00221
00222 static void doFillState (void*);
00223 };
00224
00225
00226 }
00227
00228 #endif
00229