casa
$Rev:20696$
|
Calculates magnetic field in a direction. More...
#include <EarthMagneticMachine.h>
Public Member Functions | |
EarthMagneticMachine () | |
Construct an empty machine (probably not usable unles set() used) | |
EarthMagneticMachine (const MDirection::Ref &in, const Quantum< Double > &hgt, MeasFrame &frame) | |
Construct a machine from the input values. | |
EarthMagneticMachine (const MDirection::Ref &in, const Quantum< Double > &hgt, const MPosition &pos, const MEpoch &tm) | |
EarthMagneticMachine (const MDirection::Ref &in, const MVDirection &dir, MeasFrame &frame) | |
EarthMagneticMachine (const MDirection::Ref &in, const MVDirection &dir, const MPosition &pos, const MEpoch &tm) | |
EarthMagneticMachine (const EarthMagneticMachine &other) | |
Copy constructor. | |
EarthMagneticMachine & | operator= (const EarthMagneticMachine &other) |
Copy assignments. | |
~EarthMagneticMachine () | |
Double | operator() () |
Return line-of-sight field (nT or given units) (from previous calculate if no direction or height given) | |
Quantum< Double > | operator() (const Unit &un) |
Double | operator() (const MVDirection &in) |
Quantum< Double > | operator() (const MVDirection &in, const Unit &un) |
Double | operator() (const Quantum< Double > &in) |
Quantum< Double > | operator() (const Quantum< Double > &in, const Unit &un) |
Double | operator() (const Double in) |
Quantum< Double > | operator() (const Double in, const Unit &un) |
void | set (const MDirection::Ref &in) |
Set or reset part of the machine. | |
void | set (const Quantum< Double > &hgt) |
void | set (MeasFrame &frame) |
void | set (const MPosition &pos) |
void | set (const MEpoch &tm) |
void | set (const MVDirection &dir) |
Bool | calculate (const MVDirection &in) |
Calculate a value from direction or height (in m if not Quantity) | |
Bool | calculate (const Quantum< Double > &hgt) |
Bool | calculate (const Double hgt) |
Double | getLOSField () |
Return data. | |
Double | getLOSField (const MVDirection &in) |
Double | getLOSField (const Quantum< Double > &in) |
Double | getLOSField (const Double in) |
Quantum< Double > | getLOSField (const Unit &un) |
Line-of-sight field in specified units (e.g. | |
Quantum< Double > | getLOSField (const MVDirection &in, const Unit &un) |
Quantum< Double > | getLOSField (const Quantum< Double > &in, const Unit &un) |
Quantum< Double > | getLOSField (const Double in, const Unit &un) |
const MVEarthMagnetic & | getField () |
Field (in nT, in ITRF) | |
const MVEarthMagnetic & | getField (const MVDirection &in) |
Double | getLong () |
Longitude (rad) | |
Double | getLong (const MVDirection &in) |
Quantum< Double > | getLong (const Unit &un) |
Longitude in units (e.g. | |
Quantum< Double > | getLong (const MVDirection &in, const Unit &un) |
const MVPosition & | getPosition () |
Position point. | |
const MVPosition & | getPosition (const MVDirection &in) |
void | reCalculate () |
Recalculate the machinery. | |
Private Member Functions | |
void | init () |
Initialise machinery. | |
void | copy (const EarthMagneticMachine &other) |
Copy data members. | |
void | calculate () |
Calculate field. | |
Private Attributes | |
MDirection::Ref | inref_p |
Input direction reference. | |
Double | hgt_p |
Height (m) | |
MVPosition | pos_p |
Observatory position. | |
Double | posl_p |
Distance to Earth centre. | |
Double | subl_p |
Distance squared to sub-point. | |
Double | epo_p |
Epoch. | |
MDirection::Convert | conv_p |
Conversion engine. | |
MVDirection | in_p |
Input position. | |
MVDirection | rin_p |
Re-typed input position. | |
Bool | fex_p |
Extension calculated. | |
Bool | pex_p |
MVPosition | sub_p |
Position sub-point. | |
EarthField | fldc_p |
Earth field calculator. | |
MVEarthMagnetic | fld_p |
Magnetic field. | |
Double | los_p |
Line-of-sight field. | |
Vector< Double > | pl_p |
Field position. | |
Int | fil_p |
Fields filled. | |
Int | cumf_p |
Cumulative filled fields. | |
Bool | clx_p |
Calc done. |
Calculates magnetic field in a direction.
Public interface
<h3>Review Status</h3><dl><dt>Reviewed By:<dd>UNKNOWN<dt>Date Reviewed:<dd>before2004/08/25<dt>Test programs:<dd>tEarthMagneticMachine</dl>
From Earth' magnetic Field and machinery
The construction of an EarthMagneticMachine class object creates a machine that can calculate the magnetic field in an arbitrary direction.
The constructors need a reference code (and possibly frame) input MDirection::Ref to specify how the the input coordinates have to be interpreted (e.g. MDirection::HADEC). It also needs an altitude above the Earth for which the field has to be calculated. The position on Earth can be given as either a position , or as a frame containing the position. In the latter case the frame will also be used in the coordinate transformations.
Once the EarthMagneticMachine has been established, it can be used to calculate the field by the calculate(MVDirection) method. A variety of get methods let you obtain e.g. the field along the line of sight, the longitude of the point for which the field was calculated (e.g. the sub-ionospheric point).
// Define a time/position frame MEpoch epo(MVEpoch(MVTime(98,5,16,0.5).day())); MPosition pos; MeasTable::Observatory(pos, "ATCA"); MeasFrame frame(epo, pos); // Note that e.g. the time in the frame can be changed later // Set up a machine EarthMagneticMachine exec(MDirection::B1950, Quantity(200, "km"), frame); // Given a current observational direction MDirection indir(Quantity(3.25745692, "rad"), Quantity(0.040643336,"rad"), MDirection::Ref(MDirection::B1950)); // The field in this direction is calculated exec.calculate(indir.getValue()); // Show some data cout << "Parallel field: " << exec.getLOSField() << " nT" << endl; cout << "Sub-ionosphere long: " << exec.getLong("deg") << endl;
To aid calculating fields in a simple way.
Definition at line 116 of file EarthMagneticMachine.h.
Construct an empty machine (probably not usable unles set() used)
casa::EarthMagneticMachine::EarthMagneticMachine | ( | const MDirection::Ref & | in, |
const Quantum< Double > & | hgt, | ||
MeasFrame & | frame | ||
) |
casa::EarthMagneticMachine::EarthMagneticMachine | ( | const MDirection::Ref & | in, |
const Quantum< Double > & | hgt, | ||
const MPosition & | pos, | ||
const MEpoch & | tm | ||
) |
casa::EarthMagneticMachine::EarthMagneticMachine | ( | const MDirection::Ref & | in, |
const MVDirection & | dir, | ||
MeasFrame & | frame | ||
) |
casa::EarthMagneticMachine::EarthMagneticMachine | ( | const MDirection::Ref & | in, |
const MVDirection & | dir, | ||
const MPosition & | pos, | ||
const MEpoch & | tm | ||
) |
casa::EarthMagneticMachine::EarthMagneticMachine | ( | const EarthMagneticMachine & | other | ) |
Copy constructor.
Bool casa::EarthMagneticMachine::calculate | ( | const MVDirection & | in | ) |
Calculate a value from direction or height (in m if not Quantity)
Bool casa::EarthMagneticMachine::calculate | ( | const Quantum< Double > & | hgt | ) |
Bool casa::EarthMagneticMachine::calculate | ( | const Double | hgt | ) |
void casa::EarthMagneticMachine::calculate | ( | ) | [private] |
Calculate field.
void casa::EarthMagneticMachine::copy | ( | const EarthMagneticMachine & | other | ) | [private] |
Copy data members.
Field (in nT, in ITRF)
const MVEarthMagnetic& casa::EarthMagneticMachine::getField | ( | const MVDirection & | in | ) |
Longitude (rad)
Double casa::EarthMagneticMachine::getLong | ( | const MVDirection & | in | ) |
Quantum<Double> casa::EarthMagneticMachine::getLong | ( | const Unit & | un | ) |
Longitude in units (e.g.
deg)
Quantum<Double> casa::EarthMagneticMachine::getLong | ( | const MVDirection & | in, |
const Unit & | un | ||
) |
Return data.
Line-of-sight field in nT
Double casa::EarthMagneticMachine::getLOSField | ( | const MVDirection & | in | ) |
Double casa::EarthMagneticMachine::getLOSField | ( | const Quantum< Double > & | in | ) |
Double casa::EarthMagneticMachine::getLOSField | ( | const Double | in | ) |
Quantum<Double> casa::EarthMagneticMachine::getLOSField | ( | const Unit & | un | ) |
Line-of-sight field in specified units (e.g.
G)
Quantum<Double> casa::EarthMagneticMachine::getLOSField | ( | const MVDirection & | in, |
const Unit & | un | ||
) |
Quantum<Double> casa::EarthMagneticMachine::getLOSField | ( | const Quantum< Double > & | in, |
const Unit & | un | ||
) |
Quantum<Double> casa::EarthMagneticMachine::getLOSField | ( | const Double | in, |
const Unit & | un | ||
) |
Position point.
const MVPosition& casa::EarthMagneticMachine::getPosition | ( | const MVDirection & | in | ) |
void casa::EarthMagneticMachine::init | ( | ) | [private] |
Initialise machinery.
Double casa::EarthMagneticMachine::operator() | ( | ) |
Return line-of-sight field (nT or given units) (from previous calculate if no direction or height given)
Double casa::EarthMagneticMachine::operator() | ( | const MVDirection & | in | ) |
Quantum<Double> casa::EarthMagneticMachine::operator() | ( | const MVDirection & | in, |
const Unit & | un | ||
) |
Quantum<Double> casa::EarthMagneticMachine::operator() | ( | const Quantum< Double > & | in, |
const Unit & | un | ||
) |
EarthMagneticMachine& casa::EarthMagneticMachine::operator= | ( | const EarthMagneticMachine & | other | ) |
Copy assignments.
Recalculate the machinery.
void casa::EarthMagneticMachine::set | ( | const MDirection::Ref & | in | ) |
Set or reset part of the machine.
void casa::EarthMagneticMachine::set | ( | const Quantum< Double > & | hgt | ) |
void casa::EarthMagneticMachine::set | ( | MeasFrame & | frame | ) |
void casa::EarthMagneticMachine::set | ( | const MPosition & | pos | ) |
void casa::EarthMagneticMachine::set | ( | const MEpoch & | tm | ) |
void casa::EarthMagneticMachine::set | ( | const MVDirection & | dir | ) |
Bool casa::EarthMagneticMachine::clx_p [private] |
Calc done.
Definition at line 256 of file EarthMagneticMachine.h.
Conversion engine.
Definition at line 231 of file EarthMagneticMachine.h.
Int casa::EarthMagneticMachine::cumf_p [private] |
Cumulative filled fields.
Definition at line 254 of file EarthMagneticMachine.h.
Double casa::EarthMagneticMachine::epo_p [private] |
Epoch.
Definition at line 229 of file EarthMagneticMachine.h.
Bool casa::EarthMagneticMachine::fex_p [private] |
Extension calculated.
Definition at line 238 of file EarthMagneticMachine.h.
Int casa::EarthMagneticMachine::fil_p [private] |
Fields filled.
Definition at line 252 of file EarthMagneticMachine.h.
Magnetic field.
Definition at line 246 of file EarthMagneticMachine.h.
EarthField casa::EarthMagneticMachine::fldc_p [private] |
Earth field calculator.
Definition at line 244 of file EarthMagneticMachine.h.
Double casa::EarthMagneticMachine::hgt_p [private] |
Height (m)
Definition at line 221 of file EarthMagneticMachine.h.
MVDirection casa::EarthMagneticMachine::in_p [private] |
Input position.
Definition at line 233 of file EarthMagneticMachine.h.
Input direction reference.
Definition at line 219 of file EarthMagneticMachine.h.
Double casa::EarthMagneticMachine::los_p [private] |
Line-of-sight field.
Definition at line 248 of file EarthMagneticMachine.h.
Bool casa::EarthMagneticMachine::pex_p [private] |
Definition at line 239 of file EarthMagneticMachine.h.
Vector<Double> casa::EarthMagneticMachine::pl_p [private] |
Field position.
Definition at line 250 of file EarthMagneticMachine.h.
MVPosition casa::EarthMagneticMachine::pos_p [private] |
Observatory position.
Definition at line 223 of file EarthMagneticMachine.h.
Double casa::EarthMagneticMachine::posl_p [private] |
Distance to Earth centre.
Definition at line 225 of file EarthMagneticMachine.h.
MVDirection casa::EarthMagneticMachine::rin_p [private] |
Re-typed input position.
Definition at line 235 of file EarthMagneticMachine.h.
MVPosition casa::EarthMagneticMachine::sub_p [private] |
Position sub-point.
Definition at line 242 of file EarthMagneticMachine.h.
Double casa::EarthMagneticMachine::subl_p [private] |
Distance squared to sub-point.
Definition at line 227 of file EarthMagneticMachine.h.