org.orekit.propagation.sampling
Class BasicStepInterpolator

java.lang.Object
  extended by org.orekit.propagation.sampling.BasicStepInterpolator
All Implemented Interfaces:
Serializable, OrekitStepInterpolator

public class BasicStepInterpolator
extends Object
implements OrekitStepInterpolator

Implementation of the OrekitStepInterpolator interface based on a Propagator.

Author:
Luc Maisonobe
See Also:
Serialized Form

Constructor Summary
BasicStepInterpolator(Propagator propagator)
          Build a new instance from a basic propagator.
 
Method Summary
 AbsoluteDate getCurrentDate()
          Get the current grid date.
 AbsoluteDate getInterpolatedDate()
          Get the interpolated date.
 SpacecraftState getInterpolatedState()
          Get the interpolated state.
 AbsoluteDate getPreviousDate()
          Get the previous grid date.
 boolean isForward()
          Check is integration direction is forward in date.
 void setInterpolatedDate(AbsoluteDate date)
          Set the interpolated date.
 void shift()
          Shift one step forward.
 void storeDate(AbsoluteDate date)
          Store the current step date.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicStepInterpolator

public BasicStepInterpolator(Propagator propagator)
Build a new instance from a basic propagator.

Parameters:
propagator - underlying propagator to use
Method Detail

getCurrentDate

public AbsoluteDate getCurrentDate()
Get the current grid date.

Specified by:
getCurrentDate in interface OrekitStepInterpolator
Returns:
current grid date

getInterpolatedDate

public AbsoluteDate getInterpolatedDate()
Get the interpolated date.

If setInterpolatedDate has not been called, the date returned is the same as getCurrentDate.

Specified by:
getInterpolatedDate in interface OrekitStepInterpolator
Returns:
interpolated date
See Also:
OrekitStepInterpolator.setInterpolatedDate(AbsoluteDate), OrekitStepInterpolator.getInterpolatedState()

getInterpolatedState

public SpacecraftState getInterpolatedState()
                                     throws OrekitException
Get the interpolated state.

Specified by:
getInterpolatedState in interface OrekitStepInterpolator
Returns:
interpolated state at the current interpolation date
Throws:
OrekitException - if state cannot be interpolated or converted
See Also:
OrekitStepInterpolator.getInterpolatedDate(), OrekitStepInterpolator.setInterpolatedDate(AbsoluteDate)

getPreviousDate

public AbsoluteDate getPreviousDate()
Get the previous grid date.

Specified by:
getPreviousDate in interface OrekitStepInterpolator
Returns:
previous grid date

isForward

public boolean isForward()
Check is integration direction is forward in date.

Specified by:
isForward in interface OrekitStepInterpolator
Returns:
true if integration is forward in date

setInterpolatedDate

public void setInterpolatedDate(AbsoluteDate date)
                         throws PropagationException
Set the interpolated date.

It is possible to set the interpolation date outside of the current step range, but accuracy will decrease as date is farther.

Specified by:
setInterpolatedDate in interface OrekitStepInterpolator
Parameters:
date - interpolated date to set
Throws:
PropagationException - if underlying interpolator cannot handle the date
See Also:
OrekitStepInterpolator.getInterpolatedDate(), OrekitStepInterpolator.getInterpolatedState()

shift

public void shift()
Shift one step forward. Copy the current date into the previous date, hence preparing the interpolator for future calls to storeDate


storeDate

public void storeDate(AbsoluteDate date)
               throws PropagationException
Store the current step date.

Parameters:
date - current date
Throws:
PropagationException - if the state cannot be propagated at specified date


Copyright © 2017 CNES. All Rights Reserved.