EarthField.h
Classes
- EarthField -- EarthField class model calculations (full description)
Types
- IGRF
-
Standard IGRF model
- NONE
-
Make the field equal to zero
- STANDARD = IGRF
-
Standard default model if none specified
Interface
- Public Members
- EarthField()
- EarthField(const EarthField &other)
- explicit EarthField(EarthFieldTypes model, Double catepoch=51544.5)
- EarthField &operator=(const EarthField &other)
- ~EarthField()
- const Vector<Double> &operator()(const MVPosition &pos)
- const Vector<Double> *derivative(const MVPosition &pos)
- void init()
- void init(EarthFieldTypes model, Double catepoch=51544.5)
- void refresh()
- Private Members
- void copy(const EarthField &other)
- void fillField()
- void calcField(const MVPosition &pos)
Review Status
- Reviewed By:
- UNKNOWN
- Date Reviewed:
- before2004/08/25
- Programs:
- Tests:
Prerequisite
Etymology
Earth magnetic Field model
Synopsis
EarthField forms the class for Earth magnetic field calculations. It is a
simple container with the selected model, and the mean epoch.
The method is selected from one of the following:
- EarthField::STANDARD (at 1998/05/18 the IGRF definition)
- EarthField::IGRF (IGRF reference field model)
Epochs can be specified as the MJD (with defined constants
MeasData::MJD2000 and MeasData::MJD1950 or the actual MJD),
leading to the following constructors:
- EarthField() default; assuming IGRF and MJD2000
- EarthField(method); assuming J2000 as epoch
- EarthField(method, epoch) with epoch Double(MJD)
Actual EarthField for a certain position on Earth is calculated by the ()
operator. Arguments can be:
- MVPosition: a position on Earth (in the ITRF frame)
The returned value is a 3D vector of the field (in nT) in ITRF coordinates.
The derivative (d-1) can be obtained as well by
derivative(MVPosition).
An EarthField can be re-initialised with a different method and/or other
epoch with the init() functions (same format as constructors).
To bypass the full, lengthy calculation actual returned values are calculated
using the derivative if within about 50 km (error less than about
10-2 G). A call to refresh() will re-initiate calculations
from scratch.
The following details can be set with the
Aipsrc mechanism:
- measures.earthfield.d_interval: approximation radius
(km is default unit) over which a linear approximation
is used
The field model is assumed to be constant over the time-span the class
is used.
The calculations are based on a routine provided by the IGRF community. See
ftp.ngdc.noaa.gov/Solid_Earth/Mainfld_Mag/Models/IAGA, routine IGRFLIB.FOR.
The values are in nT (10uG).
Example
EarthField mine(EarthField::STANDARD,
45837.0); // define EarthField type
// for 84/05/17
MPosition pos;
MeasTable::Observatory(pos, "WSRT"); // Obervatory position
// Make sure correct position frame used
MVPosition x(MPosition::Convert(pos, MPosition::ITRF)().getValue());
MVEarthMagnetic now = mine(x); // get EarthField
Motivation
To have a container (with history) for field calculations
To Do
Member Description
Known EarthField calculation models
Default constructor, generates default J2000 EarthField identification
EarthField(const EarthField &other)
Copy constructor
explicit EarthField(EarthFieldTypes model, Double catepoch=51544.5)
Constructor with epoch in MJulian days (default is J2000)
EarthField &operator=(const EarthField &other)
Copy assignment
Return the EarthField components. Note that the value returned has only
a lifetime as long as the EarthField container exists, and no new
derivative is asked for.
Return derivatives of field (to X, Y, Z). Note that the value returned
has only a lifetime as long as the EarthField container exists, and
no new components or derivative is calculated. The returned value should
not be deleted.
Re-initialise EarthField object with specified model and epoch, or
defaults STANDARD and J2000.
Refresh calculations
void copy(const EarthField &other)
Make a copy
Create correct default fixedEpoch and catalogue field data
Calculate EarthField for longitude and latitude and altitude (m)