Class SHAFormatReader
java.lang.Object
org.orekit.forces.gravity.potential.PotentialCoefficientsReader
org.orekit.forces.gravity.potential.SHAFormatReader
- All Implemented Interfaces:
DataLoader
Reader for the SHA gravity field format.
This format is used by some lunar gravity models distributed by NASA's Planetary Geology, Geophysics and Geochemistry Laboratory such as GRGM1200B and GRGM1200L. It is a simple ASCII format, described in the GRGM1200B model product site. The first line contains 4 constants: model GM, mean radius, maximum degree and maximum order. All other lines contain 6 entries: degree, order, Clm, Slm, sigma Clm and sigma Slm (formal errors of Clm and Slm).
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:
- Rafael Ayala
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSHAFormatReader(String supportedNames, boolean missingCoefficientsAllowed) Simple constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetProvider(boolean wantNormalized, int degree, int order) Provider for read spherical harmonics coefficients.voidloadData(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 Details
-
SHAFormatReader
Simple constructor.- Parameters:
supportedNames- regular expression for supported files namesmissingCoefficientsAllowed- if true, allows missing coefficients in the input data- Since:
- 12.2
-
-
Method Details
-
loadData
public void loadData(InputStream input, String name) throws IOException, ParseException, OrekitException Load data from a stream.- Specified by:
loadDatain interfaceDataLoader- Specified by:
loadDatain 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
Provider for read spherical harmonics coefficients. Like EGM fields, SHA fields don't include time-dependent parts, so this method returns directly a constant provider.- Specified by:
getProviderin 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:
- 12.2
-