Class KalmanEstimatorUtil


  • public class KalmanEstimatorUtil
    extends Object
    Utility class for Kalman Filter.

    This class includes common methods used by the different Kalman models in Orekit (i.e., Extended, Unscented, and Semi-analytical)

    Since:
    11.3
    • Method Detail

      • decorate

        public static MeasurementDecorator decorate​(ObservedMeasurement<?> observedMeasurement,
                                                    AbsoluteDate referenceDate)
        Decorate an observed measurement.

        The "physical" measurement noise matrix is the covariance matrix of the measurement. Normalizing it consists in applying the following equation: Rn[i,j] = R[i,j]/σ[i]/σ[j] Thus the normalized measurement noise matrix is the matrix of the correlation coefficients between the different components of the measurement.

        Parameters:
        observedMeasurement - the measurement
        referenceDate - reference date
        Returns:
        decorated measurement
      • decorateUnscented

        public static MeasurementDecorator decorateUnscented​(ObservedMeasurement<?> observedMeasurement,
                                                             AbsoluteDate referenceDate)
        Decorate an observed measurement for an Unscented Kalman Filter.

        This method uses directly the measurement's covariance matrix, without any normalization.

        Parameters:
        observedMeasurement - the measurement
        referenceDate - reference date
        Returns:
        decorated measurement
        Since:
        11.3.2
      • checkDimension

        public static void checkDimension​(int dimension,
                                          ParameterDriversList orbitalParameters,
                                          ParameterDriversList propagationParameters,
                                          ParameterDriversList measurementParameters)
        Check dimension.
        Parameters:
        dimension - dimension to check
        orbitalParameters - orbital parameters
        propagationParameters - propagation parameters
        measurementParameters - measurements parameters
      • filterRelevant

        public static SpacecraftState[] filterRelevant​(ObservedMeasurement<?> observedMeasurement,
                                                       SpacecraftState[] allStates)
        Filter relevant states for a measurement.
        Parameters:
        observedMeasurement - measurement to consider
        allStates - all states
        Returns:
        array containing only the states relevant to the measurement
      • applyDynamicOutlierFilter

        public static <T extends ObservedMeasurement<T>> void applyDynamicOutlierFilter​(EstimatedMeasurement<T> measurement,
                                                                                        RealMatrix innovationCovarianceMatrix)
        Set and apply a dynamic outlier filter on a measurement.

        Loop on the modifiers to see if a dynamic outlier filter needs to be applied.

        Compute the sigma array using the matrix in input and set the filter.

        Apply the filter by calling the modify method on the estimated measurement.

        Reset the filter.

        Type Parameters:
        T - the type of measurement
        Parameters:
        measurement - measurement to filter
        innovationCovarianceMatrix - So called innovation covariance matrix S, with:

        S = H.Ppred.Ht + R

        Where:

        - H is the normalized measurement matrix (Ht its transpose)

        - Ppred is the normalized predicted covariance matrix

        - R is the normalized measurement noise matrix

      • computeInnovationVector

        public static RealVector computeInnovationVector​(EstimatedMeasurement<?> predicted)
        Compute the unnormalized innovation vector from the given predicted measurement.
        Parameters:
        predicted - predicted measurement
        Returns:
        the innovation vector
      • computeInnovationVector

        public static RealVector computeInnovationVector​(EstimatedMeasurement<?> predicted,
                                                         double[] sigma)
        Compute the normalized innovation vector from the given predicted measurement.
        Parameters:
        predicted - predicted measurement
        sigma - measurement standard deviation
        Returns:
        the innovation vector
      • normalizeCovarianceMatrix

        public static RealMatrix normalizeCovarianceMatrix​(RealMatrix physicalP,
                                                           double[] parameterScales)
        Normalize a covariance matrix.
        Parameters:
        physicalP - "physical" covariance matrix in input
        parameterScales - scale factor of estimated parameters
        Returns:
        the normalized covariance matrix
      • unnormalizeCovarianceMatrix

        public static RealMatrix unnormalizeCovarianceMatrix​(RealMatrix normalizedP,
                                                             double[] parameterScales)
        Un-nomalized the covariance matrix.
        Parameters:
        normalizedP - normalized covariance matrix
        parameterScales - scale factor of estimated parameters
        Returns:
        the un-normalized covariance matrix
      • unnormalizeStateTransitionMatrix

        public static RealMatrix unnormalizeStateTransitionMatrix​(RealMatrix normalizedSTM,
                                                                  double[] parameterScales)
        Un-nomalized the state transition matrix.
        Parameters:
        normalizedSTM - normalized state transition matrix
        parameterScales - scale factor of estimated parameters
        Returns:
        the un-normalized state transition matrix
      • unnormalizeMeasurementJacobian

        public static RealMatrix unnormalizeMeasurementJacobian​(RealMatrix normalizedH,
                                                                double[] parameterScales,
                                                                double[] sigmas)
        Un-normalize the measurement matrix.
        Parameters:
        normalizedH - normalized measurement matrix
        parameterScales - scale factor of estimated parameters
        sigmas - measurement theoretical standard deviation
        Returns:
        the un-normalized measurement matrix
      • unnormalizeInnovationCovarianceMatrix

        public static RealMatrix unnormalizeInnovationCovarianceMatrix​(RealMatrix normalizedS,
                                                                       double[] sigmas)
        Un-normalize the innovation covariance matrix.
        Parameters:
        normalizedS - normalized innovation covariance matrix
        sigmas - measurement theoretical standard deviation
        Returns:
        the un-normalized innovation covariance matrix
      • unnormalizeKalmanGainMatrix

        public static RealMatrix unnormalizeKalmanGainMatrix​(RealMatrix normalizedK,
                                                             double[] parameterScales,
                                                             double[] sigmas)
        Un-normalize the Kalman gain matrix.
        Parameters:
        normalizedK - normalized Kalman gain matrix
        parameterScales - scale factor of estimated parameters
        sigmas - measurement theoretical standard deviation
        Returns:
        the un-normalized Kalman gain matrix