Package org.orekit.utils
Class InterpolationTableLoader
java.lang.Object
org.orekit.utils.InterpolationTableLoader
- All Implemented Interfaces:
DataLoader
Used to read an interpolation table from a data file.
- Author:
- Thomas Neidhart
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]Returns a copy of the abscissa grid for the interpolation function.double[]Returns a copy of the ordinate grid for the interpolation function.double[][]Returns a copy of the values samples for the interpolation function.voidloadData(InputStream input, String name) Loads an bi-variate interpolation table from the givenInputStream.booleanCheck if the loader still accepts new data.
-
Constructor Details
-
InterpolationTableLoader
public InterpolationTableLoader()Empty constructor.This constructor is not strictly necessary, but it prevents spurious javadoc warnings with JDK 18 and later.
- Since:
- 12.0
-
-
Method Details
-
getAbscissaGrid
public double[] getAbscissaGrid()Returns a copy of the abscissa grid for the interpolation function.- Returns:
- the abscissa grid for the interpolation function,
or
nullif the file could not be read
-
getOrdinateGrid
public double[] getOrdinateGrid()Returns a copy of the ordinate grid for the interpolation function.- Returns:
- the ordinate grid for the interpolation function,
or
nullif the file could not be read
-
getValuesSamples
public double[][] getValuesSamples()Returns a copy of the values samples for the interpolation function.- Returns:
- the values samples for the interpolation function,
or
nullif the file could not be read
-
stillAcceptsData
public boolean stillAcceptsData()Check if the loader still accepts new data.This method is used to speed up data loading by interrupting crawling the data sets as soon as a loader has found the data it was waiting for. For loaders that can merge data from any number of sources (for example JPL ephemerides or Earth Orientation Parameters that are split among several files), this method should always return true to make sure no data is left over.
- Specified by:
stillAcceptsDatain interfaceDataLoader- Returns:
- true while the loader still accepts new data
-
loadData
Loads an bi-variate interpolation table from the givenInputStream. The format of the table is as follows (number of rows/columns can be extended):Table: tableName | 0.0 | 60.0 | 66.0 ------------------------- 0 | 0.0 | 0.003 | 0.006 500 | 0.0 | 0.003 | 0.006- Specified by:
loadDatain interfaceDataLoader- Parameters:
input- the input stream to read data fromname- the name of the input file- Throws:
IOException- if data can't be readParseException- if data can't be parsed
-