Ginan
Loading...
Searching...
No Matches
geomagField.cpp File Reference

Functions

void readIGRF (string filename)
 Read the IGRF file Only support the latest generations of IGRF file from IGRF-11.
 
double decimalYear (GTime time)
 Convert time to decimal year For example: 2019-07-18 00:00:00 -> 2019.54247.
 
bool getSHCoef (GTime time, GeomagMainField &igrfMF)
 Calculate the SH coefficients at given epoch based on a piecewise linear model For years starting in 1900 and ending in 2020, the change rates should be calculated using the two nearest data points For the final 5 years of model validity (2020 to 2025 for IGRF-13), the Secular Variation coefficients are explicitly provided See ref [1].
 
VectorEnu getGeomagIntensity (GTime time, const VectorPos &pos)
 Compute the geomagnetic field components in geocentric local reference system at given time and position See ref [1] [2] Note that the normalisation of associated Legendre functions for Geomagnetic field is different from that for Geogravitational field, i.e.
 
VectorEcef getGeomagIntensityEcef (GTime time, const VectorPos &pos)
 Compute the geomagnetic field components in ECEF reference system at given time and position.
 

Function Documentation

◆ decimalYear()

double decimalYear ( GTime time)

Convert time to decimal year For example: 2019-07-18 00:00:00 -> 2019.54247.

Parameters
timetime
Here is the caller graph for this function:

◆ getGeomagIntensity()

VectorEnu getGeomagIntensity ( GTime time,
const VectorPos & pos )

Compute the geomagnetic field components in geocentric local reference system at given time and position See ref [1] [2] Note that the normalisation of associated Legendre functions for Geomagnetic field is different from that for Geogravitational field, i.e.

Pnm_gra_norm(x) = sqrt((2-dm0)*(2*n+1) * (n-m)/(n+m)) * Pnm(x) Pnm_mag_norm(x) = sqrt((2-dm0)* (n-m)/(n+m)) * Pnm(x) where dm0 is the Kronecker delta which is equal to 1 for m==0 and 0 for m!=0 Thus we have Pnm_gra_norm(x) = sqrt(2*n+1) * Pnm_mag_norm(x) See ref [3] [4]

Parameters
timetime of geomagnetic field to model
posposition in geocentric spherical coordinates where geomagnetic field to model
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getGeomagIntensityEcef()

VectorEcef getGeomagIntensityEcef ( GTime time,
const VectorPos & pos )

Compute the geomagnetic field components in ECEF reference system at given time and position.

Parameters
timetime of geomagnetic field to model
posposition in geocentric spherical coordinates where geomagnetic field to model
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSHCoef()

bool getSHCoef ( GTime time,
GeomagMainField & igrfMF )

Calculate the SH coefficients at given epoch based on a piecewise linear model For years starting in 1900 and ending in 2020, the change rates should be calculated using the two nearest data points For the final 5 years of model validity (2020 to 2025 for IGRF-13), the Secular Variation coefficients are explicitly provided See ref [1].

Parameters
timetime of IGRF coefficients to calculate
igrfMFmap of the IGRF coefficients calculated
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readIGRF()

void readIGRF ( string filename)

Read the IGRF file Only support the latest generations of IGRF file from IGRF-11.

Parameters
filenameIGRF file to read
Here is the caller graph for this function: