fr.cnes.sirius.patrius.stela.propagation
Class StelaBasicInterpolator

java.lang.Object
  extended by fr.cnes.sirius.patrius.stela.propagation.StelaBasicInterpolator
All Implemented Interfaces:
Serializable, OrekitStepInterpolator

public class StelaBasicInterpolator
extends Object
implements OrekitStepInterpolator

Basic Linear Step Interpolator for StelaAbstractPropagator. Does not interpolate the attitude of the spacecraft at the moment.

Since:
1.3
Version:
1.3
Author:
Cedric Dental
See Also:
Serialized Form
Concurrency :
not thread-safe

Constructor Summary
StelaBasicInterpolator()
          Build a new instance from a basic propagator.
 
Method Summary
 AbsoluteDate getCurrentDate()
          Get the current grid date.
 SpacecraftState getInitialState()
           
 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.
 double linearInterpolation(double linearCoeff, double before, double after)
          Interpolates lineary
 void setAdditionalStateProviders(List<AdditionalStateProvider> additionalStateProvidersIn)
          sets the additionalStateProviders
 void setInterpolatedDate(AbsoluteDate interpolatedDate)
          Set the interpolated date.
 void storeSC(SpacecraftState initialStateIn, SpacecraftState targetState)
          Store the current dates and spacecraft states.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StelaBasicInterpolator

public StelaBasicInterpolator()
Build a new instance from a basic propagator.

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

setAdditionalStateProviders

public void setAdditionalStateProviders(List<AdditionalStateProvider> additionalStateProvidersIn)
sets the additionalStateProviders

Parameters:
additionalStateProvidersIn - the list of additional State providers

setInterpolatedDate

public void setInterpolatedDate(AbsoluteDate interpolatedDate)
                         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:
interpolatedDate - interpolated date to set
Throws:
PropagationException - if underlying interpolator cannot handle the date
See Also:
OrekitStepInterpolator.getInterpolatedDate(), OrekitStepInterpolator.getInterpolatedState()

linearInterpolation

public double linearInterpolation(double linearCoeff,
                                  double before,
                                  double after)
Interpolates lineary

Parameters:
linearCoeff - the linear coefficient
before - the previous state
after - the current state
Returns:
inter the interpolated value

storeSC

public void storeSC(SpacecraftState initialStateIn,
                    SpacecraftState targetState)
             throws PropagationException
Store the current dates and spacecraft states.

Parameters:
initialStateIn - the initial state
targetState - the target state
Throws:
PropagationException - if the state cannot be propagated at specified date

getInitialState

public SpacecraftState getInitialState()
Returns:
the initialState


Copyright © 2016 CNES. All Rights Reserved.