Class GravityFieldFactory
- Author:
- Fabien Maussion, Pascal Parraud, Luc Maisonobe
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault regular expression for EGM files.static final StringDefault regular expression for FES C hat and epsilon tides files.static final StringDefault regular expression for FES Cnm, Snm tides files.static final StringDefault regular expression for FES Hf tides files.static final StringDefault regular expression for GRGS files.static final StringDefault regular expression for ICGEM files.static final StringDefault regular expression for SHA files.static final StringDefault regular expression for SHM files. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidAdd the default READERS for ocean tides.static voidAdd the default readers for gravity fields.static voidaddOceanTidesReader(OceanTidesReader reader) Add a reader for ocean tides.static voidAdd a reader for gravity fields.static voidClear ocean tides readers.static voidClear gravity field readers.static voidConfigure ocean load deformation coefficients.getConstantNormalizedProvider(int degree, int order, AbsoluteDate freezingDate) Get the constant gravity field coefficients provider from the first supported file.getConstantUnnormalizedProvider(int degree, int order, AbsoluteDate freezingDate) Get the constant gravity field coefficients provider from the first supported file.static LazyLoadedGravityFieldsGet the instance ofGravityFieldsthat is called by the static methods of this class.getNormalizedProvider(double ae, double mu, TideSystem tideSystem, double[][] normalizedC, double[][] normalizedS) Create a time-independentNormalizedSphericalHarmonicsProviderfrom canonical coefficients.getNormalizedProvider(int degree, int order) Get the gravity field coefficients provider from the first supported file.getNormalizedProvider(UnnormalizedSphericalHarmonicsProvider unnormalized) Create aNormalizedSphericalHarmonicsProviderfrom anUnnormalizedSphericalHarmonicsProvider.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.getUnnormalizedProvider(double ae, double mu, TideSystem tideSystem, double[][] unnormalizedC, double[][] unnormalizedS) Create a time-independentUnnormalizedSphericalHarmonicsProviderfrom canonical coefficients.getUnnormalizedProvider(int degree, int order) Get the gravity field coefficients provider from the first supported file.Create anUnnormalizedSphericalHarmonicsProviderfrom aNormalizedSphericalHarmonicsProvider.static PotentialCoefficientsReaderreadGravityField(int maxParseDegree, int maxParseOrder) Read a gravity field coefficients provider from the first supported file.
-
Field Details
-
ICGEM_FILENAME
Default regular expression for ICGEM files.- See Also:
-
SHM_FILENAME
Default regular expression for SHM files.- See Also:
-
EGM_FILENAME
Default regular expression for EGM files.- See Also:
-
GRGS_FILENAME
Default regular expression for GRGS files.- See Also:
-
SHA_FILENAME
Default regular expression for SHA files.- See Also:
-
FES_CNM_SNM_FILENAME
Default regular expression for FES Cnm, Snm tides files.- See Also:
-
FES_CHAT_EPSILON_FILENAME
Default regular expression for FES C hat and epsilon tides files.- See Also:
-
FES_HF_FILENAME
Default regular expression for FES Hf tides files.- See Also:
-
-
Method Details
-
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
Add the default readers for gravity fields.The default READERS supports ICGEM, SHM, EGM, GRGS and SHA formats with the default names
ICGEM_FILENAME,SHM_FILENAME,EGM_FILENAME,GRGS_FILENAME,SHA_FILENAMEand don't allow missing coefficients.- See Also:
-
clearPotentialCoefficientsReaders
Clear gravity field readers.- See Also:
-
addOceanTidesReader
Add a reader for ocean tides.- Parameters:
reader- custom reader to add for the gravity field- See Also:
-
configureOceanLoadDeformationCoefficients
@DefaultDataContext public static void configureOceanLoadDeformationCoefficients(OceanLoadDeformationCoefficients oldc) Configure ocean load deformation coefficients.- Parameters:
oldc- ocean load deformation coefficients- See Also:
-
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:
-
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.
- See Also:
-
clearOceanTidesReaders
Clear ocean tides readers.- See Also:
-
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
@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:
-
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
@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:
-
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
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
-