Class StateCovarianceMatrixProvider
 java.lang.Object

 org.orekit.propagation.StateCovarianceMatrixProvider

 All Implemented Interfaces:
AdditionalStateProvider
public class StateCovarianceMatrixProvider extends Object implements AdditionalStateProvider
Additional state provider for state covariance matrix.This additional state provider allows computing a propagated covariance matrix based on a user defined input state covariance matrix. The computation of the propagated covariance matrix uses the State Transition Matrix between the propagated spacecraft state and the initial state. As a result, the user must define the name
of the provider for the State Transition Matrix
.As the State Transition Matrix and the input state covariance matrix can be expressed in different orbit types, the user must specify both orbit types when building the covariance provider. In addition, the position angle used in both matrices must also be specified.
In order to add this additional state provider to an orbit propagator, user must use the
Propagator.addAdditionalStateProvider(AdditionalStateProvider)
method.For a given propagated spacecraft
state
, the propagated state covariance matrix is accessible through the methodgetStateCovariance(SpacecraftState)
 Since:
 11.3
 Author:
 Bryan Cazabonne, Vincent Cucchietti


Constructor Summary
Constructors Constructor Description StateCovarianceMatrixProvider(String additionalName, String stmName, MatricesHarvester harvester, StateCovariance covInit)
Constructor.

Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]
getAdditionalState(SpacecraftState state)
Get the additional state.OrbitType
getCovarianceOrbitType()
Get the orbit type in which the covariance matrix is expressed.String
getName()
Get the name of the additional state.StateCovariance
getStateCovariance(SpacecraftState state)
Get the state covariance in the same frame/local orbital frame, orbit type and position angle as the initial covariance.StateCovariance
getStateCovariance(SpacecraftState state, Frame frame)
Get the state covariance expressed in a given frame.StateCovariance
getStateCovariance(SpacecraftState state, OrbitType orbitType, PositionAngleType angleType)
Get the state covariance expressed in a given orbit type.void
init(SpacecraftState initialState, AbsoluteDate target)
Initialize the additional state provider at the start of propagation.boolean
yields(SpacecraftState state)
Check if this provider should yield so another provider has an opportunity to add missing parts.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface org.orekit.propagation.AdditionalStateProvider
update




Constructor Detail

StateCovarianceMatrixProvider
public StateCovarianceMatrixProvider(String additionalName, String stmName, MatricesHarvester harvester, StateCovariance covInit)
Constructor. Parameters:
additionalName
 name of the additional statestmName
 name of the state for State Transition Matrixharvester
 matrix harvester as returned bypropagator.setupMatricesComputation(stmName, null, null)
covInit
 initial state covariance


Method Detail

getName
public String getName()
Get the name of the additional state.If a provider just modifies one of the basic elements (orbit, attitude or mass) without adding any new state, it should return the empty string as its name.
 Specified by:
getName
in interfaceAdditionalStateProvider
 Returns:
 name of the additional state (names containing "orekit" with any case are reserved for the library internal use)

init
public void init(SpacecraftState initialState, AbsoluteDate target)
Initialize the additional state provider at the start of propagation. Specified by:
init
in interfaceAdditionalStateProvider
 Parameters:
initialState
 initial state information at the start of propagationtarget
 date of propagation

yields
public boolean yields(SpacecraftState state)
Check if this provider should yield so another provider has an opportunity to add missing parts.Decision to yield is often based on an additional state being
already available
in the providedstate
(but it could theoretically also depend on an additional state derivative beingalready available
, or any other criterion). If for example a provider needs the state transition matrix, it could implement this method as:public boolean yields(final SpacecraftState state) { return !state.getAdditionalStates().containsKey("STM"); }
The default implementation returns
false
, meaning that state data can begenerated
immediately.The covariance matrix can be computed only if the State Transition Matrix state is available.
 Specified by:
yields
in interfaceAdditionalStateProvider
 Parameters:
state
 state to handle Returns:
 true if this provider should yield so another provider has an opportunity to add missing parts as the state is incrementally built up

getAdditionalState
public double[] getAdditionalState(SpacecraftState state)
Get the additional state. Specified by:
getAdditionalState
in interfaceAdditionalStateProvider
 Parameters:
state
 spacecraft state to which additional state should correspond Returns:
 additional state corresponding to spacecraft state

getCovarianceOrbitType
public OrbitType getCovarianceOrbitType()
Get the orbit type in which the covariance matrix is expressed. Returns:
 the orbit type

getStateCovariance
public StateCovariance getStateCovariance(SpacecraftState state)
Get the state covariance in the same frame/local orbital frame, orbit type and position angle as the initial covariance. Parameters:
state
 spacecraft state to which the covariance matrix should correspond Returns:
 the state covariance
 See Also:
getStateCovariance(SpacecraftState, Frame)
,getStateCovariance(SpacecraftState, OrbitType, PositionAngleType)

getStateCovariance
public StateCovariance getStateCovariance(SpacecraftState state, Frame frame)
Get the state covariance expressed in a given frame.The output covariance matrix is expressed in the same orbit type as
getCovarianceOrbitType()
. Parameters:
state
 spacecraft state to which the covariance matrix should correspondframe
 output frame for which the output covariance matrix must be expressed (must be inertial) Returns:
 the state covariance expressed in
frame
 See Also:
getStateCovariance(SpacecraftState)
,getStateCovariance(SpacecraftState, OrbitType, PositionAngleType)

getStateCovariance
public StateCovariance getStateCovariance(SpacecraftState state, OrbitType orbitType, PositionAngleType angleType)
Get the state covariance expressed in a given orbit type. Parameters:
state
 spacecraft state to which the covariance matrix should correspondorbitType
 output orbit typeangleType
 output position angle (not used if orbitType equalsCARTESIAN
) Returns:
 the state covariance in
orbitType
andangleType
 See Also:
getStateCovariance(SpacecraftState)
,getStateCovariance(SpacecraftState, Frame)

