List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
fwk::ParametricGeoMagneticField Class Reference

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
 

Detailed Description

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.

Constructor & Destructor Documentation

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().

Member Function Documentation

utl::Vector fwk::ParametricGeoMagneticField::Get ( const utl::Point where) const
double fwk::ParametricGeoMagneticField::GetBaseYear ( ) const
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
utl::SVector< 3, double > fwk::ParametricGeoMagneticField::GetXYZ ( const double  latitude,
const double  longitude,
const double  elevation 
) const
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().

void fwk::ParametricGeoMagneticField::Grow ( const size_t  order)
protected

Definition at line 155 of file ParametricGeoMagneticField.cc.

References fG, fH, fOrder, and WARNING.

Referenced by fwk::ParametricGeoMagChange::Extrapolate(), and Interpolate().

ParametricGeoMagneticField fwk::ParametricGeoMagneticField::IGRF2010 ( )
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().

Friends And Related Function Documentation

friend class ParametricGeoMagChange
friend

Definition at line 56 of file ParametricGeoMagneticField.h.

Member Data Documentation

double fwk::ParametricGeoMagneticField::fBaseYear = 0
protected

Definition at line 43 of file ParametricGeoMagneticField.h.

Referenced by GetBaseYear(), and Interpolate().

std::valarray<double> fwk::ParametricGeoMagneticField::fG
protected
std::valarray<double> fwk::ParametricGeoMagneticField::fH
protected
size_t fwk::ParametricGeoMagneticField::fOrder = 0
protected

The documentation for this class was generated from the following files:

, generated on Tue Sep 26 2023.