org.orekit.models.earth
Class GeoMagneticFieldFactory

java.lang.Object
  extended by org.orekit.models.earth.GeoMagneticFieldFactory

public class GeoMagneticFieldFactory
extends Object

Factory for different GeoMagneticField models.

This is a utility class, so its constructor is private.

Author:
Thomas Neidhart

Nested Class Summary
static class GeoMagneticFieldFactory.FieldModel
          The currently supported geomagnetic field models.
 
Method Summary
static void addDefaultGeoMagneticModelReader(GeoMagneticFieldFactory.FieldModel type)
          Add a default reader for geomagnetic models.
static void addGeoMagneticModelReader(GeoMagneticFieldFactory.FieldModel type, GeoMagneticModelReader reader)
          Add a reader for geomagnetic models.
static void clearGeoMagneticModelReaders()
          Clear geomagnetic models readers.
static void clearModels()
          Method to reset igrf and wmm models to null.
static GeoMagneticField getField(GeoMagneticFieldFactory.FieldModel type, AbsoluteDate year)
          Get the GeoMagneticField for the given model type and year.
static GeoMagneticField getField(GeoMagneticFieldFactory.FieldModel type, double year)
          Get the GeoMagneticField for the given model type and year.
static GeoMagneticField getIGRF(AbsoluteDate year)
          Get the IGRF model for the given year.
static GeoMagneticField getIGRF(double year)
          Get the IGRF model for the given year.
static GeoMagneticField getWMM(AbsoluteDate year)
          Get the WMM model for the given year.
static GeoMagneticField getWMM(double year)
          Get the WMM model for the given year.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addGeoMagneticModelReader

public static void addGeoMagneticModelReader(GeoMagneticFieldFactory.FieldModel type,
                                             GeoMagneticModelReader reader)
                                      throws OrekitException
Add a reader for geomagnetic models.

Parameters:
type - the field model type
reader - custom reader to add for the geomagnetic models
Throws:
OrekitException - when the input field model type does not exist

addDefaultGeoMagneticModelReader

public static void addDefaultGeoMagneticModelReader(GeoMagneticFieldFactory.FieldModel type)
                                             throws OrekitException
Add a default reader for geomagnetic models.

Parameters:
type - the field model type
Throws:
OrekitException - when the input field model type does not exist

clearGeoMagneticModelReaders

public static void clearGeoMagneticModelReaders()
Clear geomagnetic models readers.

See Also:
addGeoMagneticModelReader(FieldModel, GeoMagneticModelReader), addDefaultGeoMagneticModelReader(FieldModel)

clearModels

public static void clearModels()
Method to reset igrf and wmm models to null.


getField

public static GeoMagneticField getField(GeoMagneticFieldFactory.FieldModel type,
                                        AbsoluteDate year)
                                 throws OrekitException
Get the GeoMagneticField for the given model type and year.

Parameters:
type - the field model type
year - the year in AbsoluteDate format
Returns:
a GeoMagneticField for the given year and model
Throws:
OrekitException - if the models could not be loaded
See Also:
GeoMagneticField.getDecimalYear(AbsoluteDate)

getField

public static GeoMagneticField getField(GeoMagneticFieldFactory.FieldModel type,
                                        double year)
                                 throws OrekitException
Get the GeoMagneticField for the given model type and year.

Parameters:
type - the field model type
year - the decimal year
Returns:
a GeoMagneticField for the given year and model
Throws:
OrekitException - if the models could not be loaded
See Also:
GeoMagneticField.getDecimalYear(int, int, int)

getIGRF

public static GeoMagneticField getIGRF(AbsoluteDate year)
                                throws OrekitException
Get the IGRF model for the given year.

Parameters:
year - the year in AbsoluteDate format
Returns:
a GeoMagneticField for the given year
Throws:
OrekitException - if the IGRF models could not be loaded
See Also:
GeoMagneticField.getDecimalYear(AbsoluteDate)

getIGRF

public static GeoMagneticField getIGRF(double year)
                                throws OrekitException
Get the IGRF model for the given year.

Parameters:
year - the decimal year
Returns:
a GeoMagneticField for the given year
Throws:
OrekitException - if the IGRF models could not be loaded
See Also:
GeoMagneticField.getDecimalYear(int, int, int)

getWMM

public static GeoMagneticField getWMM(AbsoluteDate year)
                               throws OrekitException
Get the WMM model for the given year.

Parameters:
year - the year in AbsoluteDate format
Returns:
a GeoMagneticField for the given year
Throws:
OrekitException - if the WMM models could not be loaded
See Also:
GeoMagneticField.getDecimalYear(AbsoluteDate)

getWMM

public static GeoMagneticField getWMM(double year)
                               throws OrekitException
Get the WMM model for the given year.

Parameters:
year - the decimal year
Returns:
a GeoMagneticField for the given year
Throws:
OrekitException - if the WMM models could not be loaded
See Also:
GeoMagneticField.getDecimalYear(int, int, int)


Copyright © 2016 CNES. All Rights Reserved.