Loading...
Searching...
No Matches
MCEarthMagnetic.h
Go to the documentation of this file.
//# MCEarthMagnetic.h: MEarthMagnetic conversion routines
//# Copyright (C) 1998,1999,2000,2002,2004
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: casa-feedback@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
#ifndef MEASURES_MCEARTHMAGNETIC_H
#define MEASURES_MCEARTHMAGNETIC_H
//# Includes
#include <casacore/casa/aips.h>
#include <casacore/casa/Arrays/ArrayFwd.h>
#include <casacore/measures/Measures/MEarthMagnetic.h>
#include <casacore/measures/Measures/MeasBase.h>
#include <casacore/measures/Measures/MeasRef.h>
#include <casacore/measures/Measures/MCBase.h>
#include <casacore/measures/Measures/MConvertBase.h>
#include <casacore/measures/Measures/MeasMath.h>
#include <mutex>
namespace casacore { //# NAMESPACE CASACORE - BEGIN
//# Forward Declarations
class MCEarthMagnetic;
class MVPosition;
class EarthField;
class String;
//# Typedefs
// <summary> MEarthMagnetic conversion routines </summary>
// <use visibility=local>
// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="tMEarthMagnetic" demos="">
// </reviewed>
// <prerequisite>
// <li> <linkto class=Measure>Measure</linkto> class
// <li> <linkto class=MCBase>MCBase</linkto> base class
// <li> <linkto class=MConvertBase>overall conversion</linkto> class
// </prerequisite>
//
// <etymology>
// Measure, Convert and EarthMagnetic
// </etymology>
//
// <synopsis>
// Contains state machinery and caching for actual conversions
// </synopsis>
//
// <example>
// See <linkto module=Measures>Measures</linkto> module description for
// conversion examples.
// </example>
//
// <motivation>
// </motivation>
//
// <todo asof="1998/04/21">
// <li> Use MCDirection routines directly
// </todo>
class MCEarthMagnetic : public MCBase {
public:
//# Friends
// Conversion of data
friend class MeasConvert<MEarthMagnetic>;
//# Constructors
// Default constructor
MCEarthMagnetic();
//# Destructor
~MCEarthMagnetic();
//# Member functions
// Show the state of the conversion engine (mainly for debugging purposes)
static String showState();
private:
//# Enumerations
// The list of actual routines provided.
// <note role=warning> Each <src>AA_BB</src> in the list points to routine
// that can be used in the FromTo list in the getConvert routine.
// In addition the type to which each is converted should be in the
// ToRef array, again in the proper order. </note>
enum Routes {
GAL_J2000,
GAL_B1950,
J2000_GAL,
B1950_GAL,
J2000_B1950,
B1950_J2000,
J2000_JMEAN,
B1950_BMEAN,
JMEAN_J2000,
JMEAN_JTRUE,
BMEAN_B1950,
BMEAN_BTRUE,
JTRUE_JMEAN,
BTRUE_BMEAN,
J2000_JNAT,
JNAT_J2000,
B1950_APP,
APP_B1950,
APP_TOPO,
HADEC_AZEL,
HADEC_AZELGEO,
AZEL_HADEC,
AZELGEO_HADEC,
HADEC_TOPO,
AZEL_AZELSW,
AZELGEO_AZELSWGEO,
AZELSW_AZEL,
AZELSWGEO_AZELGEO,
APP_JNAT,
JNAT_APP,
J2000_ECLIP,
ECLIP_J2000,
JMEAN_MECLIP,
MECLIP_JMEAN,
JTRUE_TECLIP,
TECLIP_JTRUE,
GAL_SUPERGAL,
SUPERGAL_GAL,
ITRF_HADEC,
HADEC_ITRF,
TOPO_HADEC,
TOPO_APP,
ICRS_J2000,
J2000_ICRS,
N_Routes,
// General for Models
R_MODEL0,
R_MODEL,
// Individual models. Order should be the same as in MEarthMagnetic.h
R_IGRF
};
//# Typedefs
//# Operators
//# General Member Functions
//# Enumerations
//# Cached Data
MVPosition *MVPOS1;
EarthField *EFIELD;
MeasMath measMath;
//# State machine data
// Transition list
static uInt ToRef_p[N_Routes][3];
// Transition matrix
static uInt FromTo_p[MEarthMagnetic::N_Types][MEarthMagnetic::N_Types];
// Object to ensure safe multi-threaded lazy single initialization
static std::once_flag theirInitOnceFlag;
//# Constructors
// Copy constructor (not implemented)
MCEarthMagnetic(const MCEarthMagnetic &other);
// Assignment (not implemented)
MCEarthMagnetic &operator=(const MCEarthMagnetic &other);
//# Member functions
// Create conversion function pointer
virtual void getConvert(MConvertBase &mc,
const MRBase &inref,
const MRBase &outref);
// Create help structures for Measure conversion routines
virtual void initConvert(uInt which, MConvertBase &mc);
// Delete the pointers used in the MeasConvert help structure cache
virtual void clearConvert();
// Routines to convert EarthMagnetics from one reference frame to another
virtual void doConvert(MeasValue &in,
MRBase &inref,
MRBase &outref,
const MConvertBase &mc);
// Conversion routine to cater for inheritance question
void doConvert(MVEarthMagnetic &in,
MRBase &inref,
MRBase &outref,
const MConvertBase &mc);
private:
// Fill the global state. Called using theirInitOnce.
static void doFillState();
};
} //# NAMESPACE CASACORE - END
#endif
casacore::EarthField
Definition EarthField.h:128
casacore::MCBase
Definition MCBase.h:116
casacore::MCEarthMagnetic::MCEarthMagnetic
MCEarthMagnetic(const MCEarthMagnetic &other)
Copy constructor (not implemented).
casacore::MCEarthMagnetic::doConvert
virtual void doConvert(MeasValue &in, MRBase &inref, MRBase &outref, const MConvertBase &mc)
Routines to convert EarthMagnetics from one reference frame to another.
casacore::MCEarthMagnetic::~MCEarthMagnetic
~MCEarthMagnetic()
casacore::MCEarthMagnetic::measMath
MeasMath measMath
Definition MCEarthMagnetic.h:174
casacore::MCEarthMagnetic::EFIELD
EarthField * EFIELD
Definition MCEarthMagnetic.h:173
casacore::MCEarthMagnetic::Routes
Routes
The list of actual routines provided.
Definition MCEarthMagnetic.h:110
casacore::MCEarthMagnetic::AZELSW_AZEL
@ AZELSW_AZEL
Definition MCEarthMagnetic.h:137
casacore::MCEarthMagnetic::TOPO_HADEC
@ TOPO_HADEC
Definition MCEarthMagnetic.h:151
casacore::MCEarthMagnetic::TECLIP_JTRUE
@ TECLIP_JTRUE
Definition MCEarthMagnetic.h:146
casacore::MCEarthMagnetic::R_MODEL0
@ R_MODEL0
General for Models.
Definition MCEarthMagnetic.h:157
casacore::MCEarthMagnetic::ECLIP_J2000
@ ECLIP_J2000
Definition MCEarthMagnetic.h:142
casacore::MCEarthMagnetic::JTRUE_JMEAN
@ JTRUE_JMEAN
Definition MCEarthMagnetic.h:123
casacore::MCEarthMagnetic::HADEC_AZEL
@ HADEC_AZEL
Definition MCEarthMagnetic.h:130
casacore::MCEarthMagnetic::SUPERGAL_GAL
@ SUPERGAL_GAL
Definition MCEarthMagnetic.h:148
casacore::MCEarthMagnetic::APP_B1950
@ APP_B1950
Definition MCEarthMagnetic.h:128
casacore::MCEarthMagnetic::TOPO_APP
@ TOPO_APP
Definition MCEarthMagnetic.h:152
casacore::MCEarthMagnetic::ITRF_HADEC
@ ITRF_HADEC
Definition MCEarthMagnetic.h:149
casacore::MCEarthMagnetic::JMEAN_J2000
@ JMEAN_J2000
Definition MCEarthMagnetic.h:119
casacore::MCEarthMagnetic::R_MODEL
@ R_MODEL
Definition MCEarthMagnetic.h:158
casacore::MCEarthMagnetic::APP_JNAT
@ APP_JNAT
Definition MCEarthMagnetic.h:139
casacore::MCEarthMagnetic::BMEAN_B1950
@ BMEAN_B1950
Definition MCEarthMagnetic.h:121
casacore::MCEarthMagnetic::MECLIP_JMEAN
@ MECLIP_JMEAN
Definition MCEarthMagnetic.h:144
casacore::MCEarthMagnetic::JMEAN_JTRUE
@ JMEAN_JTRUE
Definition MCEarthMagnetic.h:120
casacore::MCEarthMagnetic::AZEL_AZELSW
@ AZEL_AZELSW
Definition MCEarthMagnetic.h:135
casacore::MCEarthMagnetic::BMEAN_BTRUE
@ BMEAN_BTRUE
Definition MCEarthMagnetic.h:122
casacore::MCEarthMagnetic::HADEC_TOPO
@ HADEC_TOPO
Definition MCEarthMagnetic.h:134
casacore::MCEarthMagnetic::JTRUE_TECLIP
@ JTRUE_TECLIP
Definition MCEarthMagnetic.h:145
casacore::MCEarthMagnetic::B1950_GAL
@ B1950_GAL
Definition MCEarthMagnetic.h:114
casacore::MCEarthMagnetic::B1950_BMEAN
@ B1950_BMEAN
Definition MCEarthMagnetic.h:118
casacore::MCEarthMagnetic::J2000_JNAT
@ J2000_JNAT
Definition MCEarthMagnetic.h:125
casacore::MCEarthMagnetic::JNAT_APP
@ JNAT_APP
Definition MCEarthMagnetic.h:140
casacore::MCEarthMagnetic::ICRS_J2000
@ ICRS_J2000
Definition MCEarthMagnetic.h:153
casacore::MCEarthMagnetic::J2000_ICRS
@ J2000_ICRS
Definition MCEarthMagnetic.h:154
casacore::MCEarthMagnetic::BTRUE_BMEAN
@ BTRUE_BMEAN
Definition MCEarthMagnetic.h:124
casacore::MCEarthMagnetic::AZELGEO_AZELSWGEO
@ AZELGEO_AZELSWGEO
Definition MCEarthMagnetic.h:136
casacore::MCEarthMagnetic::AZEL_HADEC
@ AZEL_HADEC
Definition MCEarthMagnetic.h:132
casacore::MCEarthMagnetic::HADEC_ITRF
@ HADEC_ITRF
Definition MCEarthMagnetic.h:150
casacore::MCEarthMagnetic::J2000_GAL
@ J2000_GAL
Definition MCEarthMagnetic.h:113
casacore::MCEarthMagnetic::GAL_B1950
@ GAL_B1950
Definition MCEarthMagnetic.h:112
casacore::MCEarthMagnetic::R_IGRF
@ R_IGRF
Individual models.
Definition MCEarthMagnetic.h:160
casacore::MCEarthMagnetic::J2000_ECLIP
@ J2000_ECLIP
Definition MCEarthMagnetic.h:141
casacore::MCEarthMagnetic::AZELSWGEO_AZELGEO
@ AZELSWGEO_AZELGEO
Definition MCEarthMagnetic.h:138
casacore::MCEarthMagnetic::HADEC_AZELGEO
@ HADEC_AZELGEO
Definition MCEarthMagnetic.h:131
casacore::MCEarthMagnetic::B1950_APP
@ B1950_APP
Definition MCEarthMagnetic.h:127
casacore::MCEarthMagnetic::GAL_J2000
@ GAL_J2000
Definition MCEarthMagnetic.h:111
casacore::MCEarthMagnetic::B1950_J2000
@ B1950_J2000
Definition MCEarthMagnetic.h:116
casacore::MCEarthMagnetic::J2000_JMEAN
@ J2000_JMEAN
Definition MCEarthMagnetic.h:117
casacore::MCEarthMagnetic::AZELGEO_HADEC
@ AZELGEO_HADEC
Definition MCEarthMagnetic.h:133
casacore::MCEarthMagnetic::JNAT_J2000
@ JNAT_J2000
Definition MCEarthMagnetic.h:126
casacore::MCEarthMagnetic::JMEAN_MECLIP
@ JMEAN_MECLIP
Definition MCEarthMagnetic.h:143
casacore::MCEarthMagnetic::GAL_SUPERGAL
@ GAL_SUPERGAL
Definition MCEarthMagnetic.h:147
casacore::MCEarthMagnetic::J2000_B1950
@ J2000_B1950
Definition MCEarthMagnetic.h:115
casacore::MCEarthMagnetic::N_Routes
@ N_Routes
Definition MCEarthMagnetic.h:155
casacore::MCEarthMagnetic::APP_TOPO
@ APP_TOPO
Definition MCEarthMagnetic.h:129
casacore::MCEarthMagnetic::ToRef_p
static uInt ToRef_p[N_Routes][3]
Transition list.
Definition MCEarthMagnetic.h:178
casacore::MCEarthMagnetic::operator=
MCEarthMagnetic & operator=(const MCEarthMagnetic &other)
Assignment (not implemented).
casacore::MCEarthMagnetic::MVPOS1
MVPosition * MVPOS1
Definition MCEarthMagnetic.h:172
casacore::MCEarthMagnetic::showState
static String showState()
Show the state of the conversion engine (mainly for debugging purposes).
casacore::MCEarthMagnetic::doFillState
static void doFillState()
Fill the global state.
casacore::MCEarthMagnetic::MCEarthMagnetic
MCEarthMagnetic()
Default constructor.
casacore::MCEarthMagnetic::doConvert
void doConvert(MVEarthMagnetic &in, MRBase &inref, MRBase &outref, const MConvertBase &mc)
Conversion routine to cater for inheritance question.
casacore::MCEarthMagnetic::initConvert
virtual void initConvert(uInt which, MConvertBase &mc)
Create help structures for Measure conversion routines.
casacore::MCEarthMagnetic::clearConvert
virtual void clearConvert()
Delete the pointers used in the MeasConvert help structure cache.
casacore::MCEarthMagnetic::theirInitOnceFlag
static std::once_flag theirInitOnceFlag
Object to ensure safe multi-threaded lazy single initialization.
Definition MCEarthMagnetic.h:182
casacore::MCEarthMagnetic::FromTo_p
static uInt FromTo_p[MEarthMagnetic::N_Types][MEarthMagnetic::N_Types]
Transition matrix.
Definition MCEarthMagnetic.h:180
casacore::MCEarthMagnetic::getConvert
virtual void getConvert(MConvertBase &mc, const MRBase &inref, const MRBase &outref)
Create conversion function pointer.
casacore::MConvertBase
Definition MConvertBase.h:144
casacore::MEarthMagnetic
Definition MEarthMagnetic.h:115
casacore::MEarthMagnetic::N_Types
@ N_Types
Definition MEarthMagnetic.h:152
casacore::MRBase
Definition MRBase.h:100
casacore::MVEarthMagnetic
Definition MVEarthMagnetic.h:108
casacore::MVPosition
Definition MVPosition.h:111
casacore::MeasConvert
Definition MeasConvert.h:143
casacore::MeasMath
Definition MeasMath.h:93
casacore::MeasValue
Definition MeasValue.h:104
casacore::String
String: the storage and methods of handling collections of characters.
Definition String.h:223
casacore
this file contains all the compiler specific defines
Definition mainpage.dox:28
casacore::uInt
unsigned int uInt
Definition aipstype.h:49