Class GravityFieldFactory
- java.lang.Object
-
- org.orekit.forces.gravity.potential.GravityFieldFactory
-
public class GravityFieldFactory extends Object
Factory used to read gravity field files in several supported formats.- Author:
- Fabien Maussion, Pascal Parraud, Luc Maisonobe
-
-
Field Summary
Fields Modifier and Type Field Description static String
EGM_FILENAME
Default regular expression for EGM files.static String
FES_CHAT_EPSILON_FILENAME
Default regular expression for FES C hat and epsilon tides files.static String
FES_CNM_SNM_FILENAME
Default regular expression for FES Cnm, Snm tides files.static String
FES_HF_FILENAME
Default regular expression for FES Hf tides files.static String
GRGS_FILENAME
Default regular expression for GRGS files.static String
ICGEM_FILENAME
Default regular expression for ICGEM files.static String
SHM_FILENAME
Default regular expression for SHM files.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addDefaultOceanTidesReaders()
Add the default READERS for ocean tides.static void
addDefaultPotentialCoefficientsReaders()
Add the default readers for gravity fields.static void
addOceanTidesReader(OceanTidesReader reader)
Add a reader for ocean tides.static void
addPotentialCoefficientsReader(PotentialCoefficientsReader reader)
Add a reader for gravity fields.static void
clearOceanTidesReaders()
Clear ocean tides readers.static void
clearPotentialCoefficientsReaders()
Clear gravity field readers.static void
configureOceanLoadDeformationCoefficients(OceanLoadDeformationCoefficients oldc)
Configure ocean load deformation coefficients.static NormalizedSphericalHarmonicsProvider
getConstantNormalizedProvider(int degree, int order, AbsoluteDate freezingDate)
Get the constant gravity field coefficients provider from the first supported file.static UnnormalizedSphericalHarmonicsProvider
getConstantUnnormalizedProvider(int degree, int order, AbsoluteDate freezingDate)
Get the constant gravity field coefficients provider from the first supported file.static LazyLoadedGravityFields
getGravityFields()
Get the instance ofGravityFields
that is called by the static methods of this class.static NormalizedSphericalHarmonicsProvider
getNormalizedProvider(double ae, double mu, TideSystem tideSystem, double[][] normalizedC, double[][] normalizedS)
Create a time-independentNormalizedSphericalHarmonicsProvider
from canonical coefficients.static NormalizedSphericalHarmonicsProvider
getNormalizedProvider(int degree, int order)
Get the gravity field coefficients provider from the first supported file.static NormalizedSphericalHarmonicsProvider
getNormalizedProvider(UnnormalizedSphericalHarmonicsProvider unnormalized)
Create aNormalizedSphericalHarmonicsProvider
from anUnnormalizedSphericalHarmonicsProvider
.static OceanLoadDeformationCoefficients
getOceanLoadDeformationCoefficients()
Get the configured ocean load deformation coefficients.static List<OceanTidesWave>
getOceanTidesWaves(int degree, int order)
Get the ocean tides waves from the first supported file.static double[][]
getUnnormalizationFactors(int degree, int order)
Get a un-normalization factors array.static UnnormalizedSphericalHarmonicsProvider
getUnnormalizedProvider(double ae, double mu, TideSystem tideSystem, double[][] unnormalizedC, double[][] unnormalizedS)
Create a time-independentUnnormalizedSphericalHarmonicsProvider
from canonical coefficients.static UnnormalizedSphericalHarmonicsProvider
getUnnormalizedProvider(int degree, int order)
Get the gravity field coefficients provider from the first supported file.static UnnormalizedSphericalHarmonicsProvider
getUnnormalizedProvider(NormalizedSphericalHarmonicsProvider normalized)
Create anUnnormalizedSphericalHarmonicsProvider
from aNormalizedSphericalHarmonicsProvider
.static PotentialCoefficientsReader
readGravityField(int maxParseDegree, int maxParseOrder)
Read a gravity field coefficients provider from the first supported file.
-
-
-
Field Detail
-
ICGEM_FILENAME
public static final String ICGEM_FILENAME
Default regular expression for ICGEM files.- See Also:
- Constant Field Values
-
SHM_FILENAME
public static final String SHM_FILENAME
Default regular expression for SHM files.- See Also:
- Constant Field Values
-
EGM_FILENAME
public static final String EGM_FILENAME
Default regular expression for EGM files.- See Also:
- Constant Field Values
-
GRGS_FILENAME
public static final String GRGS_FILENAME
Default regular expression for GRGS files.- See Also:
- Constant Field Values
-
FES_CNM_SNM_FILENAME
public static final String FES_CNM_SNM_FILENAME
Default regular expression for FES Cnm, Snm tides files.- See Also:
- Constant Field Values
-
FES_CHAT_EPSILON_FILENAME
public static final String FES_CHAT_EPSILON_FILENAME
Default regular expression for FES C hat and epsilon tides files.- See Also:
- Constant Field Values
-
FES_HF_FILENAME
public static final String FES_HF_FILENAME
Default regular expression for FES Hf tides files.- See Also:
- Constant Field Values
-
-
Method Detail
-
getGravityFields
@DefaultDataContext public static LazyLoadedGravityFields getGravityFields()
Get the instance ofGravityFields
that is called by the static methods of this class.- Returns:
- the gravity fields used by this factory.
- Since:
- 10.1
-
addPotentialCoefficientsReader
@DefaultDataContext public static void addPotentialCoefficientsReader(PotentialCoefficientsReader reader)
Add a reader for gravity fields.- Parameters:
reader
- custom reader to add for the gravity field- See Also:
addDefaultPotentialCoefficientsReaders()
,clearPotentialCoefficientsReaders()
-
addDefaultPotentialCoefficientsReaders
@DefaultDataContext public static void addDefaultPotentialCoefficientsReaders()
Add the default readers for gravity fields.The default READERS supports ICGEM, SHM, EGM and GRGS formats with the default names
ICGEM_FILENAME
,SHM_FILENAME
,EGM_FILENAME
,GRGS_FILENAME
and don't allow missing coefficients.
-
clearPotentialCoefficientsReaders
@DefaultDataContext public static void clearPotentialCoefficientsReaders()
Clear gravity field readers.
-
addOceanTidesReader
@DefaultDataContext public static void addOceanTidesReader(OceanTidesReader reader)
Add a reader for ocean tides.- Parameters:
reader
- custom reader to add for the gravity field- See Also:
addDefaultPotentialCoefficientsReaders()
,clearPotentialCoefficientsReaders()
-
configureOceanLoadDeformationCoefficients
@DefaultDataContext public static void configureOceanLoadDeformationCoefficients(OceanLoadDeformationCoefficients oldc)
Configure ocean load deformation coefficients.- Parameters:
oldc
- ocean load deformation coefficients- See Also:
getOceanLoadDeformationCoefficients()
-
getOceanLoadDeformationCoefficients
@DefaultDataContext public static OceanLoadDeformationCoefficients getOceanLoadDeformationCoefficients()
Get the configured ocean load deformation coefficients.If
configureOceanLoadDeformationCoefficients
has never been called, the default value will be theIERS 2010
coefficients.- Returns:
- ocean load deformation coefficients
- See Also:
configureOceanLoadDeformationCoefficients(OceanLoadDeformationCoefficients)
-
addDefaultOceanTidesReaders
@DefaultDataContext public static void addDefaultOceanTidesReaders()
Add the default READERS for ocean tides.The default READERS supports files similar to the fes2004_Cnm-Snm.dat and fes2004.dat as published by IERS, using the
configured
ocean load deformation coefficients, which by default are the IERS 2010 coefficients, which are limited to degree 6. If higher degree coefficients are needed, theconfigureOceanLoadDeformationCoefficients
method can be called prior to loading the ocean tides model with thehigh degree coefficients
computed by Pascal Gégout.WARNING: the files referenced in the published conventions have some errors. These errors have been corrected and the updated files can be found here: http://tai.bipm.org/iers/convupdt/convupdt_c6.html.
-
clearOceanTidesReaders
@DefaultDataContext public static void clearOceanTidesReaders()
Clear ocean tides readers.
-
getConstantNormalizedProvider
@DefaultDataContext public static NormalizedSphericalHarmonicsProvider getConstantNormalizedProvider(int degree, int order, AbsoluteDate freezingDate)
Get the constant gravity field coefficients provider from the first supported file.If no
PotentialCoefficientsReader
has been added by callingaddPotentialCoefficientsReader
or ifclearPotentialCoefficientsReaders
has been called afterwards, theaddDefaultPotentialCoefficientsReaders
method will be called automatically.- Parameters:
degree
- maximal degreeorder
- maximal orderfreezingDate
- freezing epoch- Returns:
- a gravity field coefficients provider containing already loaded data
- Since:
- 12.0
- See Also:
getNormalizedProvider(int, int)
-
getNormalizedProvider
@DefaultDataContext public static NormalizedSphericalHarmonicsProvider getNormalizedProvider(int degree, int order)
Get the gravity field coefficients provider from the first supported file.If no
PotentialCoefficientsReader
has been added by callingaddPotentialCoefficientsReader
or ifclearPotentialCoefficientsReaders
has been called afterwards, theaddDefaultPotentialCoefficientsReaders
method will be called automatically.- Parameters:
degree
- maximal degreeorder
- maximal order- Returns:
- a gravity field coefficients provider containing already loaded data
- Since:
- 6.0
- See Also:
getConstantNormalizedProvider(int, int, AbsoluteDate)
-
getConstantUnnormalizedProvider
@DefaultDataContext public static UnnormalizedSphericalHarmonicsProvider getConstantUnnormalizedProvider(int degree, int order, AbsoluteDate freezingDate)
Get the constant gravity field coefficients provider from the first supported file.If no
PotentialCoefficientsReader
has been added by callingaddPotentialCoefficientsReader
or ifclearPotentialCoefficientsReaders
has been called afterwards, theaddDefaultPotentialCoefficientsReaders
method will be called automatically.- Parameters:
degree
- maximal degreeorder
- maximal orderfreezingDate
- freezing epoch- Returns:
- a gravity field coefficients provider containing already loaded data
- Since:
- 6.0
- See Also:
getUnnormalizedProvider(int, int)
-
getUnnormalizedProvider
@DefaultDataContext public static UnnormalizedSphericalHarmonicsProvider getUnnormalizedProvider(int degree, int order)
Get the gravity field coefficients provider from the first supported file.If no
PotentialCoefficientsReader
has been added by callingaddPotentialCoefficientsReader
or ifclearPotentialCoefficientsReaders
has been called afterwards, theaddDefaultPotentialCoefficientsReaders
method will be called automatically.- Parameters:
degree
- maximal degreeorder
- maximal order- Returns:
- a gravity field coefficients provider containing already loaded data
- Since:
- 6.0
- See Also:
getConstantUnnormalizedProvider(int, int, AbsoluteDate)
-
readGravityField
@DefaultDataContext public static PotentialCoefficientsReader readGravityField(int maxParseDegree, int maxParseOrder)
Read a gravity field coefficients provider from the first supported file.If no
PotentialCoefficientsReader
has been added by callingaddPotentialCoefficientsReader
or ifclearPotentialCoefficientsReaders
has been called afterwards, theaddDefaultPotentialCoefficientsReaders
method will be called automatically.- Parameters:
maxParseDegree
- maximal degree to parsemaxParseOrder
- maximal order to parse- Returns:
- a reader containing already loaded data
- Since:
- 6.0
-
getOceanTidesWaves
@DefaultDataContext public static List<OceanTidesWave> getOceanTidesWaves(int degree, int order)
Get the ocean tides waves from the first supported file.If no
OceanTidesReader
has been added by callingaddOceanTidesReader
or ifclearOceanTidesReaders
has been called afterwards, theaddDefaultOceanTidesReaders
method will be called automatically.WARNING: as of 2013-11-17, there seem to be an inconsistency when loading one or the other file, for wave Sa (Doodson number 56.554) and P1 (Doodson number 163.555). The sign of the coefficients are different. We think the problem lies in the input files from IERS and not in the conversion (which works for all other waves), but cannot be sure. For this reason, ocean tides are still considered experimental at this date.
- Parameters:
degree
- maximal degreeorder
- maximal order- Returns:
- list of tides waves containing already loaded data
- Since:
- 6.1
-
getNormalizedProvider
public static NormalizedSphericalHarmonicsProvider getNormalizedProvider(double ae, double mu, TideSystem tideSystem, double[][] normalizedC, double[][] normalizedS)
Create a time-independentNormalizedSphericalHarmonicsProvider
from canonical coefficients.Note that contrary to the other factory method, this one does not read any data, it simply uses the provided data
- Parameters:
ae
- central body reference radiusmu
- central body attraction coefficienttideSystem
- tide systemnormalizedC
- normalized tesseral-sectorial coefficients (cosine part)normalizedS
- normalized tesseral-sectorial coefficients (sine part)- Returns:
- provider for normalized coefficients
- Since:
- 6.0
-
getNormalizedProvider
public static NormalizedSphericalHarmonicsProvider getNormalizedProvider(UnnormalizedSphericalHarmonicsProvider unnormalized)
Create aNormalizedSphericalHarmonicsProvider
from anUnnormalizedSphericalHarmonicsProvider
.Note that contrary to the other factory method, this one does not read any data, it simply uses the provided data.
- Parameters:
unnormalized
- provider to normalize- Returns:
- provider for normalized coefficients
- Since:
- 6.0
-
getUnnormalizedProvider
public static UnnormalizedSphericalHarmonicsProvider getUnnormalizedProvider(double ae, double mu, TideSystem tideSystem, double[][] unnormalizedC, double[][] unnormalizedS)
Create a time-independentUnnormalizedSphericalHarmonicsProvider
from canonical coefficients.Note that contrary to the other factory method, this one does not read any data, it simply uses the provided data
- Parameters:
ae
- central body reference radiusmu
- central body attraction coefficienttideSystem
- tide systemunnormalizedC
- un-normalized tesseral-sectorial coefficients (cosine part)unnormalizedS
- un-normalized tesseral-sectorial coefficients (sine part)- Returns:
- provider for un-normalized coefficients
- Since:
- 6.0
-
getUnnormalizedProvider
public static UnnormalizedSphericalHarmonicsProvider getUnnormalizedProvider(NormalizedSphericalHarmonicsProvider normalized)
Create anUnnormalizedSphericalHarmonicsProvider
from aNormalizedSphericalHarmonicsProvider
.Note that contrary to the other factory method, this one does not read any data, it simply uses the provided data.
- Parameters:
normalized
- provider to un-normalize- Returns:
- provider for un-normalized coefficients
- Since:
- 6.0
-
getUnnormalizationFactors
public static double[][] getUnnormalizationFactors(int degree, int order)
Get a un-normalization factors array.Un-normalized coefficients are obtained by multiplying normalized coefficients by the factors array elements.
- Parameters:
degree
- maximal degreeorder
- maximal order- Returns:
- triangular un-normalization factors array
- Since:
- 6.0
-
-