Class EGMFormatReader
- java.lang.Object
-
- org.orekit.forces.gravity.potential.PotentialCoefficientsReader
-
- org.orekit.forces.gravity.potential.EGMFormatReader
-
- All Implemented Interfaces:
DataLoader
public class EGMFormatReader extends PotentialCoefficientsReader
This reader is adapted to the EGM Format.The proper way to use this class is to call the
GravityFieldFactory
which will determine which reader to use with the selected gravity field file.- Author:
- Fabien Maussion
- See Also:
GravityFields
-
-
Constructor Summary
Constructors Constructor Description EGMFormatReader(String supportedNames, boolean missingCoefficientsAllowed)
Simple constructor.EGMFormatReader(String supportedNames, boolean missingCoefficientsAllowed, boolean useWgs84Coefficients)
Simple constructor that allows overriding 'standard' EGM96 ae and mu with WGS84 variants.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RawSphericalHarmonicsProvider
getProvider(boolean wantNormalized, int degree, int order)
Get a provider for read spherical harmonics coefficients.void
loadData(InputStream input, String name)
Load data from a stream.-
Methods inherited from class org.orekit.forces.gravity.potential.PotentialCoefficientsReader
buildFlatArray, buildRow, getAe, getBaseProvider, getMaxAvailableDegree, getMaxAvailableOrder, getMaxParseDegree, getMaxParseOrder, getMu, getSupportedNames, getTideSystem, missingCoefficientsAllowed, parseCoefficient, parseDouble, rescale, rescale, setAe, setMaxParseDegree, setMaxParseOrder, setMu, setRawCoefficients, setReadComplete, setTideSystem, stillAcceptsData, toDate, toDate
-
-
-
-
Constructor Detail
-
EGMFormatReader
public EGMFormatReader(String supportedNames, boolean missingCoefficientsAllowed)
Simple constructor.- Parameters:
supportedNames
- regular expression for supported files namesmissingCoefficientsAllowed
- if true, allows missing coefficients in the input data
-
EGMFormatReader
public EGMFormatReader(String supportedNames, boolean missingCoefficientsAllowed, boolean useWgs84Coefficients)
Simple constructor that allows overriding 'standard' EGM96 ae and mu with WGS84 variants.- Parameters:
supportedNames
- regular expression for supported files namesmissingCoefficientsAllowed
- if true, allows missing coefficients in the input datauseWgs84Coefficients
- if true, the WGS84 values will be used for equatorial radius and central attraction coefficient
-
-
Method Detail
-
loadData
public void loadData(InputStream input, String name) throws IOException, ParseException, OrekitException
Load data from a stream.- Specified by:
loadData
in interfaceDataLoader
- Specified by:
loadData
in classPotentialCoefficientsReader
- Parameters:
input
- data input streamname
- name of the file (or zip entry)- Throws:
IOException
- if data can't be readParseException
- if data can't be parsed or if some loader specific error occursOrekitException
-
getProvider
public RawSphericalHarmonicsProvider getProvider(boolean wantNormalized, int degree, int order)
Get a provider for read spherical harmonics coefficients.EGM fields don't include time-dependent parts, so this method returns directly a constant provider.
- Specified by:
getProvider
in classPotentialCoefficientsReader
- Parameters:
wantNormalized
- if true, the provider will provide normalized coefficients, otherwise it will provide un-normalized coefficientsdegree
- maximal degreeorder
- maximal order- Returns:
- a new provider
- Since:
- 6.0
-
-