|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.orekit.models.earth.GeoMagneticField
public class GeoMagneticField
Used to calculate the geomagnetic field at a given geodetic point on earth. The calculation is estimated using spherical harmonic expansion of the geomagnetic potential with coefficients provided by an actual geomagnetic field model (e.g. IGRF, WMM).
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)
Constructor Summary | |
---|---|
GeoMagneticField(String modelName,
double epoch,
int maxN,
int maxNSec,
double validityStart,
double validityEnd)
Create a new geomagnetic field model with the given parameters. |
Method Summary | |
---|---|
GeoMagneticElements |
calculateField(double latitude,
double longitude,
double height)
Calculate the magnetic field at the specified geodetic point identified by latitude, longitude and altitude. |
GeoMagneticElements |
calculateField(GeodeticPoint gp)
Calculate the magnetic field at the specified geodetic point identified by geodetic objet. |
GeoMagneticElements |
calculateField(Vector3D point,
Frame frame,
AbsoluteDate date)
Calculate the magnetic field at the specified point identified by the coordinates of the point and the reference point. |
static double |
getDecimalYear(AbsoluteDate date)
Utility function to get a decimal year for a given AbsoluteDate. |
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. |
void |
setMainFieldCoefficients(int n,
int m,
double gnm,
double hnm)
Set the given main field coefficients. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GeoMagneticField(String modelName, double epoch, int maxN, int maxNSec, double validityStart, double validityEnd)
modelName
- the model nameepoch
- the base time of magnetic field model epoch (yrs)maxN
- the maximum degree of the main modelmaxNSec
- the maximum degree of the secular variationsvalidityStart
- validity start of this modelvalidityEnd
- validity end of this modelMethod Detail |
---|
public 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
otherwisepublic void setMainFieldCoefficients(int n, int m, double gnm, double hnm)
n
- the degreem
- the ordergnm
- the g coefficient at position n,mhnm
- the h coefficient at position n,mpublic void setSecularVariationCoefficients(int n, int m, double dgnm, double dhnm)
n
- the degreem
- the orderdgnm
- the dg coefficient at position n,mdhnm
- the dh coefficient at position n,mpublic GeoMagneticElements calculateField(double latitude, double longitude, double height)
latitude
- the latitude in decimal degreeslongitude
- the longitude in decimal degreesheight
- the altitude in kilometers above mean sea level
GeoMagneticElements
at the given geodetic pointpublic GeoMagneticElements calculateField(GeodeticPoint gp)
gp
- geodetic point
GeoMagneticElements
at the given geodetic pointpublic GeoMagneticElements calculateField(Vector3D point, Frame frame, AbsoluteDate date) throws OrekitException
point
- cartesian pointframe
- frame in which cartesian point is expresseddate
- date in which cartesian point is given
GeoMagneticElements
at the given cartesian point
OrekitException
- if point cannot be converted to body frame
OrekitException
- if the specified year is outside the validity period
OrekitException
- if getDecimalYear() error occurredpublic GeoMagneticField transformModel(double year) throws OrekitException
year
- the year to which the model shall be transformed
OrekitException
- if the specified year is outside the validity period of the
model or the model does not support time transformations
(i.e. no secular variations available)public GeoMagneticField transformModel(GeoMagneticField otherModel, double year) throws OrekitException
otherModel
- the other magnetic field modelyear
- the year to which the model shall be transformed
OrekitException
- if the specified year is outside the validity period of the
model or the model does not support time transformations
(i.e. no secular variations available)public static double getDecimalYear(AbsoluteDate date) throws OrekitException
date
- date in AbsoluteDate format
OrekitException
- if TimeScalesFactory error occurredpublic static double getDecimalYear(int day, int month, int year)
day
- the day (1-31)month
- the month (1-12)year
- the year
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |