Class OceanTidesReader
- java.lang.Object
-
- org.orekit.forces.gravity.potential.OceanTidesReader
-
- All Implemented Interfaces:
DataLoader
- Direct Known Subclasses:
FESCHatEpsilonReader
,FESCnmSnmReader
public abstract class OceanTidesReader extends Object implements DataLoader
Reader for ocean tides coefficients.- Since:
- 6.1
- Author:
- Luc Maisonobe
- See Also:
OceanTidesWave
-
-
Constructor Summary
Constructors Constructor Description OceanTidesReader(String supportedNames)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addWaveCoefficients(int doodson, int n, int m, double cPlus, double sPlus, double cMinus, double sMinus, int lineNumber, String line)
Add parsed coefficients.boolean
canAdd(int n, int m)
Check if coefficients can be added.protected void
endParse()
End parsing.int
getMaxAvailableDegree()
Get the maximal degree available in the last file parsed.int
getMaxAvailableOrder()
Get the maximal order available in the last file parsed.int
getMaxParseDegree()
Get the degree limit for the next file parsing.int
getMaxParseOrder()
Get the order limit for the next file parsing.String
getSupportedNames()
Get the regular expression for supported files names.List<OceanTidesWave>
getWaves()
Get the loaded waves.void
setMaxParseDegree(int maxParseDegree)
Set the degree limit for the next file parsing.void
setMaxParseOrder(int maxParseOrder)
Set the order limit for the next file parsing.protected void
startParse(String fileName)
Start parsing.boolean
stillAcceptsData()
Check if the loader still accepts new data.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.orekit.data.DataLoader
loadData
-
-
-
-
Constructor Detail
-
OceanTidesReader
public OceanTidesReader(String supportedNames)
Simple constructor.- Parameters:
supportedNames
- regular expression for supported files names
-
-
Method Detail
-
getSupportedNames
public String getSupportedNames()
Get the regular expression for supported files names.- Returns:
- regular expression for supported files names
-
setMaxParseDegree
public void setMaxParseDegree(int maxParseDegree)
Set the degree limit for the next file parsing.- Parameters:
maxParseDegree
- maximal degree to parse (may be safely set toInteger.MAX_VALUE
to parse all available coefficients)
-
getMaxParseDegree
public int getMaxParseDegree()
Get the degree limit for the next file parsing.- Returns:
- degree limit for the next file parsing
-
setMaxParseOrder
public void setMaxParseOrder(int maxParseOrder)
Set the order limit for the next file parsing.- Parameters:
maxParseOrder
- maximal order to parse (may be safely set toInteger.MAX_VALUE
to parse all available coefficients)
-
getMaxParseOrder
public int getMaxParseOrder()
Get the order limit for the next file parsing.- Returns:
- order limit for the next file parsing
-
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:
stillAcceptsData
in interfaceDataLoader
- Returns:
- true while the loader still accepts new data
-
startParse
protected void startParse(String fileName)
Start parsing.This method must be called by subclasses when they start parsing a file
- Parameters:
fileName
- name of the file (or zip entry)
-
canAdd
public boolean canAdd(int n, int m)
Check if coefficients can be added.- Parameters:
n
- degree of the coefficientsm
- order of the coefficients- Returns:
- true if coefficients can be added
-
addWaveCoefficients
protected void addWaveCoefficients(int doodson, int n, int m, double cPlus, double sPlus, double cMinus, double sMinus, int lineNumber, String line)
Add parsed coefficients.- Parameters:
doodson
- Doodson number of the current waven
- degree of the coefficientsm
- order of the coefficientscPlus
- C+(n,m)sPlus
- S+(n,m)cMinus
- C-(n,m)sMinus
- S-(n,m)lineNumber
- number of the parsed lineline
- text of the line
-
endParse
protected void endParse()
End parsing.This method must be called by subclasses when they end parsing a file
-
getWaves
public List<OceanTidesWave> getWaves()
Get the loaded waves.- Returns:
- loaded waves
-
getMaxAvailableDegree
public int getMaxAvailableDegree()
Get the maximal degree available in the last file parsed.- Returns:
- maximal degree available in the last file parsed
- Since:
- 12.0.1
-
getMaxAvailableOrder
public int getMaxAvailableOrder()
Get the maximal order available in the last file parsed.- Returns:
- maximal order available in the last file parsed
- Since:
- 12.0.1
-
-