Spherical harmonics parametrisation of geomagnetic field. More...
#include <ParametricGeoMagneticField.h>
Public Member Functions | |
utl::Vector | Get (const utl::Point &where) const |
double | GetBaseYear () const |
double | GetDeclination (const utl::Point &where) const |
ParametricGeoMagneticField | Interpolate (const double year, const ParametricGeoMagneticField &later) const |
Interpolate between two models Given a time as decimal year, interpolate coefficients between this and a later model. Return a new model for that time. More... | |
ParametricGeoMagneticField (const double baseyear, const size_t order, const double g[], const double h[]) | |
Static Public Member Functions | |
static ParametricGeoMagneticField | IGRF2010 () |
Named constructor for 2010 IGRF model This is meant for testing. Coefficients should rather be read from external files/db later. More... | |
Protected Member Functions | |
utl::SVector< 3, double > | GetXYZ (const double latitude, const double longitude, const double elevation) const |
Get magnetic field components from geocentric(!) coordinates Given the position relative to the earth core output tuple with x=northing, y=easting, z=downward component. More... | |
void | Grow (const size_t order) |
Protected Attributes | |
double | fBaseYear = 0 |
std::valarray< double > | fG |
std::valarray< double > | fH |
size_t | fOrder = 0 |
Friends | |
class | ParametricGeoMagChange |
Spherical harmonics parametrisation of geomagnetic field.
An attempt to calculate the geo magnetic field vector from parametrisations like IGRF and WMM.
Definition at line 20 of file ParametricGeoMagneticField.h.
fwk::ParametricGeoMagneticField::ParametricGeoMagneticField | ( | const double | baseyear, |
const size_t | order, | ||
const double | g[], | ||
const double | h[] | ||
) |
Definition at line 16 of file ParametricGeoMagneticField.cc.
Referenced by IGRF2010().
utl::Vector fwk::ParametricGeoMagneticField::Get | ( | const utl::Point & | where | ) | const |
Definition at line 130 of file ParametricGeoMagneticField.cc.
References fwk::LocalCoordinateSystemConstructor< Policy >::Create(), fwk::CoordinateSystemRegistry::Get(), utl::BasicVector< HepVector >::GetR(), utl::BasicVector< HepVector >::GetRho(), utl::BasicVector< HepVector >::GetX(), GetXYZ(), utl::BasicVector< HepVector >::GetY(), and utl::BasicVector< HepVector >::GetZ().
Referenced by GetDeclination().
|
inline |
Definition at line 27 of file ParametricGeoMagneticField.h.
References fBaseYear.
Referenced by Interpolate(), and fwk::MagneticFieldModel::ModelForYear().
double fwk::ParametricGeoMagneticField::GetDeclination | ( | const utl::Point & | where | ) | const |
Definition at line 121 of file ParametricGeoMagneticField.cc.
References fwk::LocalCoordinateSystemConstructor< Policy >::Create(), utl::degree, Get(), and utl::BasicVector< HepVector >::GetPhi().
|
protected |
Get magnetic field components from geocentric(!) coordinates Given the position relative to the earth core output tuple with x=northing, y=easting, z=downward component.
Definition at line 26 of file ParametricGeoMagneticField.cc.
References fG, fH, fOrder, utl::kilometer, utl::m, utl::nano, G4StationSimulatorOG::p, std::pow(), result, sqrt(), and galactic::tesla.
Referenced by Get().
|
protected |
Definition at line 155 of file ParametricGeoMagneticField.cc.
References fG, fH, fOrder, and WARNING.
Referenced by fwk::ParametricGeoMagChange::Extrapolate(), and Interpolate().
|
static |
Named constructor for 2010 IGRF model This is meant for testing. Coefficients should rather be read from external files/db later.
Definition at line 197 of file ParametricGeoMagneticField.cc.
References utl::g, and ParametricGeoMagneticField().
ParametricGeoMagneticField fwk::ParametricGeoMagneticField::Interpolate | ( | const double | year, |
const ParametricGeoMagneticField & | later | ||
) | const |
Interpolate between two models Given a time as decimal year, interpolate coefficients between this and a later model. Return a new model for that time.
Definition at line 167 of file ParametricGeoMagneticField.cc.
References ERROR, fBaseYear, fG, fH, fOrder, GetBaseYear(), and Grow().
Referenced by fwk::MagneticFieldModel::ModelForYear().
|
friend |
Definition at line 56 of file ParametricGeoMagneticField.h.
|
protected |
Definition at line 43 of file ParametricGeoMagneticField.h.
Referenced by GetBaseYear(), and Interpolate().
|
protected |
Definition at line 45 of file ParametricGeoMagneticField.h.
Referenced by fwk::ParametricGeoMagChange::Extrapolate(), GetXYZ(), Grow(), and Interpolate().
|
protected |
Definition at line 46 of file ParametricGeoMagneticField.h.
Referenced by fwk::ParametricGeoMagChange::Extrapolate(), GetXYZ(), Grow(), and Interpolate().
|
protected |
Definition at line 44 of file ParametricGeoMagneticField.h.
Referenced by fwk::ParametricGeoMagChange::Extrapolate(), GetXYZ(), Grow(), and Interpolate().