Class StateCovarianceMatrixProvider

java.lang.Object
org.orekit.propagation.covariance.StateCovarianceMatrixProvider
All Implemented Interfaces:
AdditionalDataProvider<RealMatrix>

public class StateCovarianceMatrixProvider extends Object implements AdditionalDataProvider<RealMatrix>
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. The STM is assumed to be the identity at the covariance epoch, if it is not, results will not be consistent.

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.addAdditionalDataProvider(AdditionalDataProvider) method.

For a given propagated spacecraft state, the propagated state covariance matrix is accessible through the method getStateCovariance(SpacecraftState)

The provider must be initialized with the same epoch as the reference covariance. This means either that the very first propagation must start from this date or the init(SpacecraftState, AbsoluteDate) (SpacecraftState) must be called manually once before use. Failure to do so will result in an NullPointerException.

Since:
11.3
Author:
Bryan Cazabonne, Vincent Cucchietti
  • Constructor Details

    • StateCovarianceMatrixProvider

      public StateCovarianceMatrixProvider(String additionalName, String stmName, MatricesHarvester harvester, StateCovariance covRef)
      Constructor.
      Parameters:
      additionalName - name of the additional state
      stmName - name of the state for State Transition Matrix
      harvester - matrix harvester as returned by propagator.setupMatricesComputation(stmName, null, null)
      covRef - reference state covariance
  • Method Details

    • getName

      public String getName()
      Get the name of the additional data.

      If a provider just modifies one of the basic elements (orbit, attitude or mass) without adding any new data, it should return the empty string as its name.

      Specified by:
      getName in interface AdditionalDataProvider<RealMatrix>
      Returns:
      name of the additional data (names containing "orekit" with any case are reserved for the library internal use)
    • init

      public void init(SpacecraftState initialState, AbsoluteDate target)
      Initialize the additional data provider at the start of propagation.
      Specified by:
      init in interface AdditionalDataProvider<RealMatrix>
      Parameters:
      initialState - initial spacecraft state information at the start of propagation
      target - 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 data 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.hasAdditionalData("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.

      Specified by:
      yields in interface AdditionalDataProvider<RealMatrix>
      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
    • getAdditionalData

      public RealMatrix getAdditionalData(SpacecraftState state)
      Get the additional data.
      Specified by:
      getAdditionalData in interface AdditionalDataProvider<RealMatrix>
      Parameters:
      state - spacecraft state to which additional data 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 reference covariance.
      Parameters:
      state - spacecraft state to which the covariance matrix should correspond
      Returns:
      the state covariance
      See Also:
    • 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 correspond
      frame - output frame for which the output covariance matrix must be expressed (must be inertial)
      Returns:
      the state covariance expressed in frame
      See Also:
    • 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 correspond
      orbitType - output orbit type
      angleType - output position angle (not used if orbitType equals CARTESIAN)
      Returns:
      the state covariance in orbitType and angleType
      See Also: