Class StateCovariance

    • Field Detail

      • STATE_DIMENSION

        public static final int STATE_DIMENSION
        State dimension.
        See Also:
        Constant Field Values
    • Constructor Detail

      • StateCovariance

        public StateCovariance​(RealMatrix orbitalCovariance,
                               AbsoluteDate epoch,
                               LOF lof)
        Constructor.
        Parameters:
        orbitalCovariance - 6x6 orbital parameters covariance
        epoch - epoch of the covariance
        lof - covariance LOF type
      • StateCovariance

        public StateCovariance​(RealMatrix orbitalCovariance,
                               AbsoluteDate epoch,
                               Frame covarianceFrame,
                               OrbitType orbitType,
                               PositionAngleType angleType)
        Constructor.
        Parameters:
        orbitalCovariance - 6x6 orbital parameters covariance
        epoch - epoch of the covariance
        covarianceFrame - covariance frame (inertial or Earth fixed)
        orbitType - orbit type of the covariance (CARTESIAN if covarianceFrame is not pseudo-inertial)
        angleType - position angle type of the covariance (not used if orbitType is CARTESIAN)
    • Method Detail

      • checkFrameAndOrbitTypeConsistency

        public static void checkFrameAndOrbitTypeConsistency​(Frame covarianceFrame,
                                                             OrbitType inputType)
        Check constructor's inputs consistency.
        Parameters:
        covarianceFrame - covariance frame (inertial or Earth fixed)
        inputType - orbit type of the covariance
        Throws:
        OrekitException - if input frame is not pseudo-inertial AND the orbit type is not Cartesian
      • inputAndOutputAreIdentical

        public static boolean inputAndOutputAreIdentical​(OrbitType inOrbitType,
                                                         PositionAngleType inAngleType,
                                                         OrbitType outOrbitType,
                                                         PositionAngleType outAngleType)
        Checks if input/output orbit and angle types are identical.
        Parameters:
        inOrbitType - input orbit type
        inAngleType - input angle type
        outOrbitType - output orbit type
        outAngleType - output angle type
        Returns:
        flag defining if input/output orbit and angle types are identical
      • inputAndOutputOrbitTypesAreCartesian

        public static boolean inputAndOutputOrbitTypesAreCartesian​(OrbitType inOrbitType,
                                                                   OrbitType outOrbitType)
        Checks if input and output orbit types are both OrbitType.CARTESIAN.
        Parameters:
        inOrbitType - input orbit type
        outOrbitType - output orbit type
        Returns:
        flag defining if input and output orbit types are both OrbitType.CARTESIAN
      • getMatrix

        public RealMatrix getMatrix()
        Get the covariance matrix.
        Returns:
        the covariance matrix
      • getOrbitType

        public OrbitType getOrbitType()
        Get the covariance orbit type.
        Returns:
        the covariance orbit type
      • getPositionAngleType

        public PositionAngleType getPositionAngleType()
        Get the covariance angle type.
        Returns:
        the covariance angle type
      • getFrame

        public Frame getFrame()
        Get the covariance frame.
        Returns:
        the covariance frame (can be null)
        See Also:
        getLOF()
      • getLOF

        public LOF getLOF()
        Get the covariance LOF type.
        Returns:
        the covariance LOF type (can be null)
        See Also:
        getFrame()
      • changeCovarianceType

        public StateCovariance changeCovarianceType​(Orbit orbit,
                                                    OrbitType outOrbitType,
                                                    PositionAngleType outAngleType)
        Get the covariance matrix in another orbit type.

        The covariance orbit type cannot be changed if the covariance matrix is expressed in a local orbital frame or a non-pseudo inertial frame.

        As this type change uses the jacobian matrix of the transformation, it introduces a linear approximation. Hence, the current covariance matrix will not exactly match the new linearized case and the distribution will not follow a generalized Gaussian distribution anymore.

        This is based on equation (1) to (6) from "Vallado, D. A. (2004). Covariance transformations for satellite flight dynamics operations."

        Parameters:
        orbit - orbit to which the covariance matrix should correspond
        outOrbitType - target orbit type of the state covariance matrix
        outAngleType - target position angle type of the state covariance matrix
        Returns:
        a new covariance state, expressed in the target orbit type with the target position angle
        See Also:
        changeCovarianceFrame(Orbit, Frame)
      • changeCovarianceFrame

        public StateCovariance changeCovarianceFrame​(Orbit orbit,
                                                     LOF lofOut)
        Get the covariance in a given local orbital frame.

        Changing the covariance frame is a linear process, this method does not introduce approximation unless a change in covariance orbit type is required.

        This is based on equation (18) to (20) "from Vallado, D. A. (2004). Covariance transformations for satellite flight dynamics operations."

        Parameters:
        orbit - orbit to which the covariance matrix should correspond
        lofOut - output local orbital frame
        Returns:
        a new covariance state, expressed in the output local orbital frame
      • changeCovarianceFrame

        public StateCovariance changeCovarianceFrame​(Orbit orbit,
                                                     Frame frameOut)
        Get the covariance in the output frame.

        Changing the covariance frame is a linear process, this method does not introduce approximation unless a change in covariance orbit type is required.

        This is based on equation (18) to (20) "from Vallado, D. A. (2004). Covariance transformations for satellite flight dynamics operations."

        Parameters:
        orbit - orbit to which the covariance matrix should correspond
        frameOut - output frame
        Returns:
        a new covariance state, expressed in the output frame
      • shiftedBy

        public StateCovariance shiftedBy​(Orbit orbit,
                                         double dt)
        Get a time-shifted covariance matrix.

        The shifting model is a linearized, Keplerian one. In other words, it is based on a state transition matrix that is computed assuming Keplerian motion.

        Shifting is not intended as a replacement for proper covariance propagation, but should be sufficient for small time shifts or coarse accuracy.

        Parameters:
        orbit - orbit to which the covariance matrix should correspond
        dt - time shift in seconds
        Returns:
        a new covariance state, shifted with respect to the instance
      • getStm

        public static RealMatrix getStm​(Orbit initialOrbit,
                                        double dt)
        Get the state transition matrix considering Keplerian contribution only.
        Parameters:
        initialOrbit - orbit to which the initial covariance matrix should correspond
        dt - time difference between the two orbits
        Returns:
        the state transition matrix used to shift the covariance matrix