public class GeoMagneticField extends Object
Based on original software written by Manoj Nair from the National Geophysical Data Center, NOAA, as part of the WMM 2010 software release (WMM_SubLibrary.c)
Modifier | Constructor and Description |
---|---|
protected |
GeoMagneticField(String modelName,
double epoch,
int maxN,
int maxNSec,
double validityStart,
double validityEnd)
Create a new geomagnetic field model with the given parameters.
|
Modifier and Type | Method and Description |
---|---|
GeoMagneticElements |
calculateField(double latitude,
double longitude,
double height)
Calculate the magnetic field at the specified geodetic point identified
by latitude, longitude and altitude.
|
static double |
getDecimalYear(int day,
int month,
int year)
Utility function to get a decimal year for a given day.
|
double |
getEpoch()
Returns the epoch for this magnetic field model.
|
String |
getModelName()
Returns the model name.
|
protected void |
setMainFieldCoefficients(int n,
int m,
double gnm,
double hnm)
Set the given main field coefficients.
|
protected void |
setSecularVariationCoefficients(int n,
int m,
double dgnm,
double dhnm)
Set the given secular variation coefficients.
|
boolean |
supportsTimeTransform()
Indicates whether this model supports time transformation or not.
|
GeoMagneticField |
transformModel(double year)
Time transform the model coefficients from the base year of the model
using secular variation coefficients.
|
GeoMagneticField |
transformModel(GeoMagneticField otherModel,
double year)
Time transform the model coefficients from the base year of the model
using a linear interpolation with a second model.
|
double |
validFrom()
Returns the start of the validity period for this model.
|
double |
validTo()
Returns the end of the validity period for this model.
|
protected GeoMagneticField(String modelName, double epoch, int maxN, int maxNSec, double validityStart, double validityEnd)
modelName
- the model nameepoch
- the epoch of the modelmaxN
- the maximum degree of the main modelmaxNSec
- the maximum degree of the secular variationsvalidityStart
- validity start of this modelvalidityEnd
- validity end of this modelpublic double getEpoch()
public String getModelName()
public double validFrom()
public double validTo()
public boolean supportsTimeTransform()
true
if this model can be transformed within its
validity period, false
otherwiseprotected void setMainFieldCoefficients(int n, int m, double gnm, double hnm)
n
- the n indexm
- the m indexgnm
- the g coefficient at position n,mhnm
- the h coefficient at position n,mprotected void setSecularVariationCoefficients(int n, int m, double dgnm, double dhnm)
n
- the n indexm
- the m indexdgnm
- the dg coefficient at position n,mdhnm
- the dh coefficient at position n,mpublic GeoMagneticElements calculateField(double latitude, double longitude, double height)
latitude
- the WGS84 latitude in radianslongitude
- the WGS84 longitude in radiansheight
- the height above the WGS84 ellipsoid in metersGeoMagneticElements
at the given geodetic pointpublic GeoMagneticField transformModel(double year)
year
- the year to which the model shall be transformedpublic GeoMagneticField transformModel(GeoMagneticField otherModel, double year)
otherModel
- the other magnetic field modelyear
- the year to which the model shall be transformedpublic static double getDecimalYear(int day, int month, int year)
day
- the day (1-31)month
- the month (1-12)year
- the yearCopyright © 2002-2020 CS Group. All rights reserved.