org.orekit.forces.gravity.variations.coefficients
Class VariablePotentialCoefficientsReader

java.lang.Object
  extended by org.orekit.forces.gravity.variations.coefficients.VariablePotentialCoefficientsReader
All Implemented Interfaces:
DataLoader, VariablePotentialCoefficientsProvider
Direct Known Subclasses:
GRGSRL02FormatReader

public abstract class VariablePotentialCoefficientsReader
extends Object
implements DataLoader, VariablePotentialCoefficientsProvider

Abstract class representing a variable potential coefficients file reader. No actual "file reading" takes place in this class, as the loadData method is delegated to sub-classes, but this class handles all the data structures and answers the VariablePotentialCoefficientsProvider interface.

Since:
1.3
Version:
$Id: VariablePotentialCoefficientsReader.java 6995 2012-11-29 13:03:26Z HoudrogeR $
Author:
Rami Houdroge
See Also:
VariableGravityFieldFactory
Concurrency :
not thread-safe
Concurrency comment :
because of static fields

Constructor Summary
protected VariablePotentialCoefficientsReader(String supportedNames)
          Simple constructor.
 
Method Summary
protected  void add(VariablePotentialCoefficientsSet set)
          Add an entry
 double getAe()
          Get the value of the central body reference radius.
 Map<Integer,Map<Integer,VariablePotentialCoefficientsSet>> getData()
          Get the normalized variable potential coefficients
 AbsoluteDate getDate()
          Get the reference date of the file
 int getMaxDegree()
          Get the max degree available
 double getMu()
          Get the central body attraction coefficient.
 String getSupportedNames()
          Get the regular expression for supported files names.
protected  void put(Integer deg)
          Add a new orders list for given degree
protected  void setAe(double aeIn)
           
protected  void setMaxDegree(int degree)
          Set max degree
protected  void setMu(double muIn)
           
protected  void setReadCompleted(boolean read)
           
protected  void setYear(int fileYear)
          Set file year
 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

VariablePotentialCoefficientsReader

protected VariablePotentialCoefficientsReader(String supportedNames)
Simple constructor.

Build an uninitialized reader.

Parameters:
supportedNames - regular expression for supported files names
Method Detail

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 interface DataLoader
Returns:
true while the loader still accepts new data

getSupportedNames

public String getSupportedNames()
Get the regular expression for supported files names.

Returns:
regular expression for supported files names

getData

public Map<Integer,Map<Integer,VariablePotentialCoefficientsSet>> getData()
Get the normalized variable potential coefficients

Specified by:
getData in interface VariablePotentialCoefficientsProvider
Returns:
a list of coefficients

getMu

public double getMu()
Get the central body attraction coefficient.

Specified by:
getMu in interface VariablePotentialCoefficientsProvider
Returns:
mu (m3/s2)

getAe

public double getAe()
Get the value of the central body reference radius.

Specified by:
getAe in interface VariablePotentialCoefficientsProvider
Returns:
ae (m)

add

protected void add(VariablePotentialCoefficientsSet set)
Add an entry

Parameters:
set - set to add to the map

put

protected void put(Integer deg)
Add a new orders list for given degree

Parameters:
deg - degree

setAe

protected void setAe(double aeIn)
Parameters:
aeIn - the ae to set

setMu

protected void setMu(double muIn)
Parameters:
muIn - the mu to set

setReadCompleted

protected void setReadCompleted(boolean read)
Parameters:
read - the readCompleted to set

setYear

protected void setYear(int fileYear)
                throws OrekitException
Set file year

Parameters:
fileYear - reference year of the loaded file
Throws:
OrekitException - if UTC timescale fails

getDate

public AbsoluteDate getDate()
Description copied from interface: VariablePotentialCoefficientsProvider
Get the reference date of the file

Specified by:
getDate in interface VariablePotentialCoefficientsProvider
Returns:
the reference year of the file

getMaxDegree

public int getMaxDegree()
Get the max degree available

Specified by:
getMaxDegree in interface VariablePotentialCoefficientsProvider
Returns:
max degree

setMaxDegree

protected void setMaxDegree(int degree)
Set max degree

Parameters:
degree - max degree available


Copyright © 2016 CNES. All Rights Reserved.