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,
Serialized Form| 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 double[][] |
normalizedSigmasC
fully normalized tesseral-sectorial sigma coefficients matrix.
|
protected double[][] |
normalizedSigmasS
fully normalized tesseral-sectorial sigma coefficients matrix.
|
protected boolean |
readCompleted
Indicator for completed read.
|
protected boolean |
readSigmas
Sigmas reader indicator
|
| Modifier | Constructor and Description |
|---|---|
protected |
PotentialCoefficientsReader(String supportedNamesIn,
boolean missingCoefficientsAllowedIn)
Simple constructor.
|
|
PotentialCoefficientsReader(String supportedNamesIn,
boolean missingCoefficientsAllowedIn,
boolean readSigmasIn)
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.
|
double[][] |
getSigmaC(int n,
int m,
boolean normalized)
Get the sigma tesseral-sectorial and zonal coefficients.
|
double[][] |
getSigmaS(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 boolean readSigmas
protected double ae
protected double mu
protected double[] normalizedJ
protected double[][] normalizedC
protected double[][] normalizedS
protected double[][] normalizedSigmasC
protected double[][] normalizedSigmasS
protected PotentialCoefficientsReader(String supportedNamesIn, boolean missingCoefficientsAllowedIn)
Build an uninitialized reader with a default "false" value for reading sigmas coefficient.
supportedNamesIn - regular expression for supported files namesmissingCoefficientsAllowedIn - allow missing coefficients in the input datapublic PotentialCoefficientsReader(String supportedNamesIn, boolean missingCoefficientsAllowedIn, boolean readSigmasIn)
Build an uninitialized reader.
supportedNamesIn - regular expression for supported files namesmissingCoefficientsAllowedIn - allow missing coefficients in the input datareadSigmasIn - if true, will read sigmas coefficient (sigma C & sigma S)public 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 DataLoaderpublic abstract void loadData(InputStream input, String name) throws IOException, ParseException, PatriusException
loadData in interface DataLoaderinput - 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 PotentialCoefficientsProvidernormalized - (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 PotentialCoefficientsProvidern - 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 PotentialCoefficientsProvidern - the degreem - the ordernormalized - (true) or un-normalized (false)PatriusException - if the requested maximal degree or order exceeds the
available degree or orderpublic double[][] getSigmaC(int n,
int m,
boolean normalized)
throws PatriusException
getSigmaC in interface PotentialCoefficientsProvidern - the degreem - the ordernormalized - (true) or un-normalized (false)PatriusException - if the requested maximal degree or order exceeds the
available degree or orderpublic double[][] getSigmaS(int n,
int m,
boolean normalized)
throws PatriusException
getSigmaS in interface PotentialCoefficientsProvidern - 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 PotentialCoefficientsProviderpublic double getAe()
getAe in interface PotentialCoefficientsProviderCopyright © 2025 CNES. All rights reserved.