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 StringEGM_FILENAMEDefault regular expression for EGM files.static StringFES_CHAT_EPSILON_FILENAMEDefault regular expression for FES C hat and epsilon tides files.static StringFES_CNM_SNM_FILENAMEDefault regular expression for FES Cnm, Snm tides files.static StringFES_HF_FILENAMEDefault regular expression for FES Hf tides files.static StringGRGS_FILENAMEDefault regular expression for GRGS files.static StringICGEM_FILENAMEDefault regular expression for ICGEM files.static StringSHM_FILENAMEDefault regular expression for SHM files.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddDefaultOceanTidesReaders()Add the default READERS for ocean tides.static voidaddDefaultPotentialCoefficientsReaders()Add the default readers for gravity fields.static voidaddOceanTidesReader(OceanTidesReader reader)Add a reader for ocean tides.static voidaddPotentialCoefficientsReader(PotentialCoefficientsReader reader)Add a reader for gravity fields.static voidclearOceanTidesReaders()Clear ocean tides readers.static voidclearPotentialCoefficientsReaders()Clear gravity field readers.static voidconfigureOceanLoadDeformationCoefficients(OceanLoadDeformationCoefficients oldc)Configure ocean load deformation coefficients.static NormalizedSphericalHarmonicsProvidergetConstantNormalizedProvider(int degree, int order, AbsoluteDate freezingDate)Get the constant gravity field coefficients provider from the first supported file.static UnnormalizedSphericalHarmonicsProvidergetConstantUnnormalizedProvider(int degree, int order, AbsoluteDate freezingDate)Get the constant gravity field coefficients provider from the first supported file.static LazyLoadedGravityFieldsgetGravityFields()Get the instance ofGravityFieldsthat is called by the static methods of this class.static NormalizedSphericalHarmonicsProvidergetNormalizedProvider(double ae, double mu, TideSystem tideSystem, double[][] normalizedC, double[][] normalizedS)Create a time-independentNormalizedSphericalHarmonicsProviderfrom canonical coefficients.static NormalizedSphericalHarmonicsProvidergetNormalizedProvider(int degree, int order)Get the gravity field coefficients provider from the first supported file.static NormalizedSphericalHarmonicsProvidergetNormalizedProvider(UnnormalizedSphericalHarmonicsProvider unnormalized)Create aNormalizedSphericalHarmonicsProviderfrom anUnnormalizedSphericalHarmonicsProvider.static OceanLoadDeformationCoefficientsgetOceanLoadDeformationCoefficients()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 UnnormalizedSphericalHarmonicsProvidergetUnnormalizedProvider(double ae, double mu, TideSystem tideSystem, double[][] unnormalizedC, double[][] unnormalizedS)Create a time-independentUnnormalizedSphericalHarmonicsProviderfrom canonical coefficients.static UnnormalizedSphericalHarmonicsProvidergetUnnormalizedProvider(int degree, int order)Get the gravity field coefficients provider from the first supported file.static UnnormalizedSphericalHarmonicsProvidergetUnnormalizedProvider(NormalizedSphericalHarmonicsProvider normalized)Create anUnnormalizedSphericalHarmonicsProviderfrom aNormalizedSphericalHarmonicsProvider.static PotentialCoefficientsReaderreadGravityField(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 ofGravityFieldsthat 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_FILENAMEand 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
configureOceanLoadDeformationCoefficientshas never been called, the default value will be theIERS 2010coefficients.- 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
configuredocean load deformation coefficients, which by default are the IERS 2010 coefficients, which are limited to degree 6. If higher degree coefficients are needed, theconfigureOceanLoadDeformationCoefficientsmethod can be called prior to loading the ocean tides model with thehigh degree coefficientscomputed 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
PotentialCoefficientsReaderhas been added by callingaddPotentialCoefficientsReaderor ifclearPotentialCoefficientsReadershas been called afterwards, theaddDefaultPotentialCoefficientsReadersmethod 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
PotentialCoefficientsReaderhas been added by callingaddPotentialCoefficientsReaderor ifclearPotentialCoefficientsReadershas been called afterwards, theaddDefaultPotentialCoefficientsReadersmethod 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
PotentialCoefficientsReaderhas been added by callingaddPotentialCoefficientsReaderor ifclearPotentialCoefficientsReadershas been called afterwards, theaddDefaultPotentialCoefficientsReadersmethod 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
PotentialCoefficientsReaderhas been added by callingaddPotentialCoefficientsReaderor ifclearPotentialCoefficientsReadershas been called afterwards, theaddDefaultPotentialCoefficientsReadersmethod 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
PotentialCoefficientsReaderhas been added by callingaddPotentialCoefficientsReaderor ifclearPotentialCoefficientsReadershas been called afterwards, theaddDefaultPotentialCoefficientsReadersmethod 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
OceanTidesReaderhas been added by callingaddOceanTidesReaderor ifclearOceanTidesReadershas been called afterwards, theaddDefaultOceanTidesReadersmethod 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-independentNormalizedSphericalHarmonicsProviderfrom 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 aNormalizedSphericalHarmonicsProviderfrom 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-independentUnnormalizedSphericalHarmonicsProviderfrom 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 anUnnormalizedSphericalHarmonicsProviderfrom 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
-
-