org.orekit.propagation.sampling
Class AdaptedStepHandler

java.lang.Object
  extended by org.orekit.propagation.sampling.AdaptedStepHandler
All Implemented Interfaces:
java.io.Serializable, org.apache.commons.math.ode.sampling.StepHandler, ModeHandler, OrekitStepInterpolator

public class AdaptedStepHandler
extends java.lang.Object
implements OrekitStepInterpolator, org.apache.commons.math.ode.sampling.StepHandler, ModeHandler, java.io.Serializable

Adapt an OrekitStepHandler to commons-math StepHandler interface.

Version:
$Revision: 3100 $ $Date: 2010-02-10 10:44:24 +0100 (mer. 10 févr. 2010) $
Author:
Luc Maisonobe
See Also:
Serialized Form

Constructor Summary
AdaptedStepHandler(OrekitStepHandler handler)
          Build an instance.
 
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.
 void handleStep(org.apache.commons.math.ode.sampling.StepInterpolator interpolator, boolean isLast)
          
 void initialize(AbsoluteDate reference, Frame frame, double mu, AttitudeLaw attitudeLaw)
          Initialize the mode handler.
 boolean isForward()
          Check is integration direction is forward in date.
 boolean requiresDenseOutput()
          
 void reset()
          
 void setInterpolatedDate(AbsoluteDate date)
          Set the interpolated date.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdaptedStepHandler

public AdaptedStepHandler(OrekitStepHandler handler)
Build an instance.

Parameters:
handler - underlying handler to wrap
Method Detail

initialize

public void initialize(AbsoluteDate reference,
                       Frame frame,
                       double mu,
                       AttitudeLaw attitudeLaw)
Initialize the mode handler.

Specified by:
initialize in interface ModeHandler
Parameters:
reference - reference date
frame - reference frame
mu - central body attraction coefficient
attitudeLaw - attitude law

requiresDenseOutput

public boolean requiresDenseOutput()

Specified by:
requiresDenseOutput in interface org.apache.commons.math.ode.sampling.StepHandler

reset

public void reset()

Specified by:
reset in interface org.apache.commons.math.ode.sampling.StepHandler

handleStep

public void handleStep(org.apache.commons.math.ode.sampling.StepInterpolator interpolator,
                       boolean isLast)
                throws org.apache.commons.math.ode.DerivativeException

Specified by:
handleStep in interface org.apache.commons.math.ode.sampling.StepHandler
Throws:
org.apache.commons.math.ode.DerivativeException

getCurrentDate

public AbsoluteDate getCurrentDate()
Get the current grid date.

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

getPreviousDate

public AbsoluteDate getPreviousDate()
Get the previous grid date.

Specified by:
getPreviousDate in interface OrekitStepInterpolator
Returns:
previous 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:
setInterpolatedDate(AbsoluteDate), getInterpolatedState()

setInterpolatedDate

public void setInterpolatedDate(AbsoluteDate date)
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
See Also:
getInterpolatedDate(), 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:
getInterpolatedDate(), setInterpolatedDate(AbsoluteDate)

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


Copyright © 2002-2010 CS Communication & Systèmes. All Rights Reserved.