org.orekit.utils
Class AbstractBoundedPVProvider

java.lang.Object
  extended by org.orekit.utils.AbstractBoundedPVProvider
All Implemented Interfaces:
PVCoordinatesProvider
Direct Known Subclasses:
EphemerisPvHermite, EphemerisPvLagrange

public abstract class AbstractBoundedPVProvider
extends Object
implements PVCoordinatesProvider

This abstract class shall be extended to provides a PVCoordinates provider based on manipulation of PVCoordinates ephemeris. The method of the implemented interface PVCoordinatesProvider is not implemented here and have to be implemented in extending classes to provide a position velocity for a given date.

Since:
3.1
Version:
$Id: AbstractBoundedPVProvider.java 17625 2017-05-19 12:06:56Z bignon $
Author:
chabaudp
Concurrency :
not thread-safe
Concurrency comment :
internal mutable attributes

Field Summary
protected  int polyOrder
          Lagrange/Hermite polynomial order
protected  AbsoluteDate[] tDate
          Dates table
protected  PVCoordinates[] tPVCoord
          Position velocity coordinates table
 
Constructor Summary
AbstractBoundedPVProvider(PVCoordinates[] tabPV, int order, Frame frame, AbsoluteDate[] tabDate, ISearchIndex algo)
          Instantiation of AbstractBoundedPVProvider attributes.
AbstractBoundedPVProvider(SpacecraftState[] tabState, int order, ISearchIndex algo)
          Creates an instance of AbstractBoundedPVProvider from a SpacecraftState table
 
Method Summary
 AbsoluteDate getDateRef()
          Get the reference date
 Frame getFrame()
          Get the reference frame
 AbsoluteDate getMaxDate()
          Return the higher date authorized to call getPVCoordinates.
 AbsoluteDate getMinDate()
          Return the lower date authorized to call getPVCoordinates.
 int getPreviousIndex()
          Get the previous search index
 ISearchIndex getSearchIndex()
          Get the optimize indice search algorithm
 int indexValidity(int index)
          Checks if interpolation is valid : meaning if 0<= index +1 -interpOrder/2 or index + interpOrder/2 <= maximalIndex
protected  void setPreviousIndex(int index)
          Set the previous search index
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.orekit.utils.PVCoordinatesProvider
getPVCoordinates
 

Field Detail

tPVCoord

protected final PVCoordinates[] tPVCoord
Position velocity coordinates table


polyOrder

protected final int polyOrder
Lagrange/Hermite polynomial order


tDate

protected final AbsoluteDate[] tDate
Dates table

Constructor Detail

AbstractBoundedPVProvider

public AbstractBoundedPVProvider(PVCoordinates[] tabPV,
                                 int order,
                                 Frame frame,
                                 AbsoluteDate[] tabDate,
                                 ISearchIndex algo)
Instantiation of AbstractBoundedPVProvider attributes.

Parameters:
tabPV - position velocity coordinates table (table is not copied and so internal class state can be modified from outside)
order - Lagrange/Hermite interpolation order. It must be even.
frame - coordinates expression frame
tabDate - table of dates for each position velocity (table is not copied and so internal class state can be modified from outside)
algo - class to find the nearest date index from a given date in the date table (If null, algo will be, by default, a BinarySearchIndexOpenClosed based on a table of duration since the first date of the dates table)
Throws:
IllegalArgumentException - if : - tabPV and tabDate have not the same size - parameters are not consistent : order is higher than the length of PV coordinates table - order is not even
Since:
3.1

AbstractBoundedPVProvider

public AbstractBoundedPVProvider(SpacecraftState[] tabState,
                                 int order,
                                 ISearchIndex algo)
Creates an instance of AbstractBoundedPVProvider from a SpacecraftState table

Parameters:
tabState - SpacecraftState table
order - Lagrange/Hermite interpolation order. It must be even.
algo - class to find the nearest date index from a given date (If null, algo will be BinarySearchIndexOpenClosed by default based on a table of duration since the first date of the dates table)
Throws:
IllegalArgumentException - if : - spacecraftState table should contains elements, and if tabacc not null should be of the same size. - tabPV and tabDate have not the same size - parameters are not consistent : order is higher than the length of PV coordinates table - order is not even Exception thrown also if order is not even.
Since:
3.1
Method Detail

getDateRef

public AbsoluteDate getDateRef()
Get the reference date

Returns:
dateRef
Since:
3.1

getFrame

public Frame getFrame()
Get the reference frame

Returns:
pvFrame
Since:
3.1

getSearchIndex

public ISearchIndex getSearchIndex()
Get the optimize indice search algorithm

Returns:
searchIndex
Since:
3.1

getPreviousIndex

public int getPreviousIndex()
Get the previous search index

Returns:
previousIndex
Since:
3.1

setPreviousIndex

protected void setPreviousIndex(int index)
Set the previous search index

Parameters:
index - previous search index
Since:
3.1

indexValidity

public int indexValidity(int index)
                  throws OrekitException
Checks if interpolation is valid : meaning if 0<= index +1 -interpOrder/2 or index + interpOrder/2 <= maximalIndex

Parameters:
index - : the closest index from a given date.
Returns:
i0 : i0 = index + 1 - order / 2. is the first interpolation point.
Throws:
OrekitException - if the index does not allow enough point to do the interpolation.

getMinDate

public AbsoluteDate getMinDate()
Return the lower date authorized to call getPVCoordinates.

Returns:
minimum ephemeris date

getMaxDate

public AbsoluteDate getMaxDate()
Return the higher date authorized to call getPVCoordinates.

Returns:
maximum ephemeris date


Copyright © 2017 CNES. All Rights Reserved.