public abstract class PotentialCoefficientsReader extends Object implements DataLoader, PotentialCoefficientsProvider
As it exits many different coefficients models and containers this interface represents all the methods that should
be implemented by a reader. The proper way to use this interface is to call the GravityFieldFactory
which
will determine which reader to use with the selected potential coefficients file.
GravityFieldFactory
Modifier and Type | Field and Description |
---|---|
protected double |
ae
Central body reference radius.
|
protected double |
mu
Central body attraction coefficient.
|
protected double[][] |
normalizedC
fully normalized tesseral-sectorial coefficients matrix.
|
protected double[] |
normalizedJ
fully normalized zonal coefficients array.
|
protected double[][] |
normalizedS
fully normalized tesseral-sectorial coefficients matrix.
|
protected boolean |
readCompleted
Indicator for completed read.
|
Modifier | Constructor and Description |
---|---|
protected |
PotentialCoefficientsReader(String supportedNamesIn,
boolean missingCoefficientsAllowedIn)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
getAe()
Get the value of the central body reference radius.
|
double[][] |
getC(int n,
int m,
boolean normalized)
Get the tesseral-sectorial and zonal coefficients.
|
double[] |
getJ(boolean normalized,
int n)
Get the zonal coefficients.
|
double |
getMu()
Get the central body attraction coefficient.
|
double[][] |
getS(int n,
int m,
boolean normalized)
Get tesseral-sectorial coefficients.
|
String |
getSupportedNames()
Get the regular expression for supported files names.
|
abstract void |
loadData(InputStream input,
String name)
Load data from a stream.
|
boolean |
missingCoefficientsAllowed()
Check if missing coefficients are allowed in the input data.
|
boolean |
stillAcceptsData()
Check if the loader still accepts new data.
|
protected boolean readCompleted
protected double ae
protected double mu
protected double[] normalizedJ
protected double[][] normalizedC
protected double[][] normalizedS
protected PotentialCoefficientsReader(String supportedNamesIn, boolean missingCoefficientsAllowedIn)
Build an uninitialized reader.
supportedNamesIn
- regular expression for supported files namesmissingCoefficientsAllowedIn
- allow missing coefficients in the input datapublic String getSupportedNames()
public boolean missingCoefficientsAllowed()
public boolean stillAcceptsData()
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.
stillAcceptsData
in interface DataLoader
public abstract void loadData(InputStream input, String name) throws IOException, ParseException, PatriusException
loadData
in interface DataLoader
input
- data input streamname
- name of the file (or zip entry)IOException
- if data can't be readParseException
- if data can't be parsedPatriusException
- if some data is missing
or if some loader specific error occurspublic double[] getJ(boolean normalized, int n) throws PatriusException
getJ
in interface PotentialCoefficientsProvider
normalized
- (true) or un-normalized (false)n
- the maximal degree requestedPatriusException
- if the requested maximal degree exceeds the
available degreepublic double[][] getC(int n, int m, boolean normalized) throws PatriusException
getC
in interface PotentialCoefficientsProvider
n
- the degreem
- the ordernormalized
- (true) or un-normalized (false)PatriusException
- if the requested maximal degree or order exceeds the
available degree or orderpublic double[][] getS(int n, int m, boolean normalized) throws PatriusException
getS
in interface PotentialCoefficientsProvider
n
- the degreem
- the ordernormalized
- (true) or un-normalized (false)PatriusException
- if the requested maximal degree or order exceeds the
available degree or orderpublic double getMu()
getMu
in interface PotentialCoefficientsProvider
public double getAe()
getAe
in interface PotentialCoefficientsProvider
Copyright © 2019 CNES. All rights reserved.