Class LazyLoadedGravityFields
- java.lang.Object
-
- org.orekit.forces.gravity.potential.LazyLoadedGravityFields
-
- All Implemented Interfaces:
GravityFields
public class LazyLoadedGravityFields extends Object implements GravityFields
Loads gravity fields when first requested and can be configured until then. Designed to match the behavior ofGravityFieldFactory
in Orekit 10.0.- Since:
- 10.1
- Author:
- Evan Ward, Fabien Maussion, Pascal Parraud, Luc Maisonobe
- See Also:
GravityFieldFactory
-
-
Constructor Summary
Constructors Constructor Description LazyLoadedGravityFields(DataProvidersManager dataProvidersManager, TimeScale timeScale)
Create a factory for gravity fields that uses the given data manager to load the gravity field files.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDefaultOceanTidesReaders()
Add the default readers for ocean tides.void
addDefaultPotentialCoefficientsReaders()
Add the default readers for gravity fields.void
addOceanTidesReader(OceanTidesReader reader)
Add a reader for ocean tides.void
addPotentialCoefficientsReader(PotentialCoefficientsReader reader)
Add a reader for gravity fields.void
clearOceanTidesReaders()
Clear ocean tides readers.void
clearPotentialCoefficientsReaders()
Clear gravity field readers.void
configureOceanLoadDeformationCoefficients(OceanLoadDeformationCoefficients oldc)
Configure ocean load deformation coefficients.NormalizedSphericalHarmonicsProvider
getConstantNormalizedProvider(int degree, int order, AbsoluteDate freezingDate)
Get a constant gravity field normalized coefficients provider frozen at a given epoch.UnnormalizedSphericalHarmonicsProvider
getConstantUnnormalizedProvider(int degree, int order, AbsoluteDate freezingDate)
Get a constant gravity field unnormalized coefficients provider frozen at a given epoch.NormalizedSphericalHarmonicsProvider
getNormalizedProvider(int degree, int order)
Get a gravity field normalized coefficients provider.OceanLoadDeformationCoefficients
getOceanLoadDeformationCoefficients()
Get the configured ocean load deformation coefficients.List<OceanTidesWave>
getOceanTidesWaves(int degree, int order)
Get the ocean tides waves.UnnormalizedSphericalHarmonicsProvider
getUnnormalizedProvider(int degree, int order)
Get a gravity field unnormalized coefficients provider.PotentialCoefficientsReader
readGravityField(int maxParseDegree, int maxParseOrder)
Read a gravity field coefficients provider from the first supported file.
-
-
-
Constructor Detail
-
LazyLoadedGravityFields
public LazyLoadedGravityFields(DataProvidersManager dataProvidersManager, TimeScale timeScale)
Create a factory for gravity fields that uses the given data manager to load the gravity field files.- Parameters:
dataProvidersManager
- provides access to auxiliary data files.timeScale
- use to parse dates for theaddDefaultPotentialCoefficientsReaders()
. In Orekit 10.0 it is TT.
-
-
Method Detail
-
addPotentialCoefficientsReader
public 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
public void addDefaultPotentialCoefficientsReaders()
Add the default readers for gravity fields.The default readers support ICGEM, SHM, EGM and GRGS formats with the default names
GravityFieldFactory.ICGEM_FILENAME
,GravityFieldFactory.SHM_FILENAME
,GravityFieldFactory.EGM_FILENAME
,GravityFieldFactory.GRGS_FILENAME
and don't allow missing coefficients.
-
clearPotentialCoefficientsReaders
public void clearPotentialCoefficientsReaders()
Clear gravity field readers.
-
addOceanTidesReader
public 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
public void configureOceanLoadDeformationCoefficients(OceanLoadDeformationCoefficients oldc)
Configure ocean load deformation coefficients.- Parameters:
oldc
- ocean load deformation coefficients- See Also:
getOceanLoadDeformationCoefficients()
-
getOceanLoadDeformationCoefficients
public 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
public void addDefaultOceanTidesReaders()
Add the default readers for ocean tides.The default readers support 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
public void clearOceanTidesReaders()
Clear ocean tides readers.
-
readGravityField
public 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
-
getConstantNormalizedProvider
public NormalizedSphericalHarmonicsProvider getConstantNormalizedProvider(int degree, int order, AbsoluteDate freezingDate)
Get a constant gravity field normalized coefficients provider frozen at a given epoch.If no
PotentialCoefficientsReader
has been added by callingaddPotentialCoefficientsReader
or ifclearPotentialCoefficientsReaders
has been called afterwards, theaddDefaultPotentialCoefficientsReaders
method will be called automatically.- Specified by:
getConstantNormalizedProvider
in interfaceGravityFields
- Parameters:
degree
- maximal degreeorder
- maximal orderfreezingDate
- freezing epoch- Returns:
- a gravity field coefficients provider containing already loaded data
- See Also:
GravityFields.getNormalizedProvider(int, int)
-
getNormalizedProvider
public NormalizedSphericalHarmonicsProvider getNormalizedProvider(int degree, int order)
Get a gravity field normalized coefficients provider.If no
PotentialCoefficientsReader
has been added by callingaddPotentialCoefficientsReader
or ifclearPotentialCoefficientsReaders
has been called afterwards, theaddDefaultPotentialCoefficientsReaders
method will be called automatically.- Specified by:
getNormalizedProvider
in interfaceGravityFields
- Parameters:
degree
- maximal degreeorder
- maximal order- Returns:
- a gravity field coefficients provider containing already loaded data
- See Also:
GravityFields.getConstantNormalizedProvider(int, int, AbsoluteDate)
-
getConstantUnnormalizedProvider
public UnnormalizedSphericalHarmonicsProvider getConstantUnnormalizedProvider(int degree, int order, AbsoluteDate freezingDate)
Get a constant gravity field unnormalized coefficients provider frozen at a given epoch.If no
PotentialCoefficientsReader
has been added by callingaddPotentialCoefficientsReader
or ifclearPotentialCoefficientsReaders
has been called afterwards, theaddDefaultPotentialCoefficientsReaders
method will be called automatically.- Specified by:
getConstantUnnormalizedProvider
in interfaceGravityFields
- Parameters:
degree
- maximal degreeorder
- maximal orderfreezingDate
- freezing epoch- Returns:
- a gravity field coefficients provider containing already loaded data
- See Also:
GravityFields.getUnnormalizedProvider(int, int)
-
getUnnormalizedProvider
public UnnormalizedSphericalHarmonicsProvider getUnnormalizedProvider(int degree, int order)
Get a gravity field unnormalized coefficients provider.If no
PotentialCoefficientsReader
has been added by callingaddPotentialCoefficientsReader
or ifclearPotentialCoefficientsReaders
has been called afterwards, theaddDefaultPotentialCoefficientsReaders
method will be called automatically.- Specified by:
getUnnormalizedProvider
in interfaceGravityFields
- Parameters:
degree
- maximal degreeorder
- maximal order- Returns:
- a gravity field coefficients provider containing already loaded data
- See Also:
GravityFields.getConstantUnnormalizedProvider(int, int, AbsoluteDate)
-
getOceanTidesWaves
public List<OceanTidesWave> getOceanTidesWaves(int degree, int order)
Get the ocean tides waves.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.
If no
OceanTidesReader
has been added by callingaddOceanTidesReader
or ifclearOceanTidesReaders
has been called afterwards, theaddDefaultOceanTidesReaders
method will be called automatically.- Specified by:
getOceanTidesWaves
in interfaceGravityFields
- Parameters:
degree
- maximal degreeorder
- maximal order- Returns:
- list of tides waves containing already loaded data
-
-