public class StateCovarianceMatrixProvider extends Object implements AdditionalStateProvider
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
method getStateCovariance(SpacecraftState)
Constructor and Description |
---|
StateCovarianceMatrixProvider(String additionalName,
String stmName,
MatricesHarvester harvester,
StateCovariance covInit)
Constructor.
|
Modifier and Type | Method and 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.
|
public StateCovarianceMatrixProvider(String additionalName, String stmName, MatricesHarvester harvester, StateCovariance covInit)
additionalName
- name of the additional statestmName
- name of the state for State Transition Matrixharvester
- matrix harvester as returned by
propagator.setupMatricesComputation(stmName, null, null)
covInit
- initial state covariancepublic String getName()
getName
in interface AdditionalStateProvider
public void init(SpacecraftState initialState, AbsoluteDate target)
init
in interface AdditionalStateProvider
initialState
- initial state information at the start of propagationtarget
- date of propagationpublic boolean yields(SpacecraftState state)
Decision to yield is often based on an additional state being already available
in the provided state
(but it could theoretically also depend on
an additional state derivative being already 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 be
generated
immediately.
The covariance matrix can be computed only if the State Transition Matrix state is available.
yields
in interface AdditionalStateProvider
state
- state to handlepublic double[] getAdditionalState(SpacecraftState state)
getAdditionalState
in interface AdditionalStateProvider
state
- spacecraft state to which additional state should correspondpublic OrbitType getCovarianceOrbitType()
public StateCovariance getStateCovariance(SpacecraftState state)
state
- spacecraft state to which the covariance matrix should correspondgetStateCovariance(SpacecraftState, Frame)
,
getStateCovariance(SpacecraftState, OrbitType, PositionAngleType)
public StateCovariance getStateCovariance(SpacecraftState state, Frame frame)
The output covariance matrix is expressed in the same orbit type as getCovarianceOrbitType()
.
state
- spacecraft state to which the covariance matrix should correspondframe
- output frame for which the output covariance matrix must be expressed (must be inertial)frame
getStateCovariance(SpacecraftState)
,
getStateCovariance(SpacecraftState, OrbitType, PositionAngleType)
public StateCovariance getStateCovariance(SpacecraftState state, OrbitType orbitType, PositionAngleType angleType)
state
- spacecraft state to which the covariance matrix should correspondorbitType
- output orbit typeangleType
- output position angle (not used if orbitType equals CARTESIAN
)orbitType
and angleType
getStateCovariance(SpacecraftState)
,
getStateCovariance(SpacecraftState, Frame)
Copyright © 2002-2023 CS GROUP. All rights reserved.