Class KalmanEstimatorUtil
- java.lang.Object
-
- org.orekit.estimation.sequential.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 Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends ObservedMeasurement<T>>
voidapplyDynamicOutlierFilter(EstimatedMeasurement<T> measurement, RealMatrix innovationCovarianceMatrix)
Set and apply a dynamic outlier filter on a measurement.static void
checkDimension(int dimension, ParameterDriversList orbitalParameters, ParameterDriversList propagationParameters, ParameterDriversList measurementParameters)
Check dimension.static RealVector
computeInnovationVector(EstimatedMeasurement<?> predicted)
Compute the unnormalized innovation vector from the given predicted measurement.static RealVector
computeInnovationVector(EstimatedMeasurement<?> predicted, double[] sigma)
Compute the normalized innovation vector from the given predicted measurement.static MeasurementDecorator
decorate(ObservedMeasurement<?> observedMeasurement, AbsoluteDate referenceDate)
Decorate an observed measurement.static MeasurementDecorator
decorateUnscented(ObservedMeasurement<?> observedMeasurement, AbsoluteDate referenceDate)
Decorate an observed measurement for an Unscented Kalman Filter.static SpacecraftState[]
filterRelevant(ObservedMeasurement<?> observedMeasurement, SpacecraftState[] allStates)
Filter relevant states for a measurement.static RealMatrix
normalizeCovarianceMatrix(RealMatrix physicalP, double[] parameterScales)
Normalize a covariance matrix.static RealMatrix
unnormalizeCovarianceMatrix(RealMatrix normalizedP, double[] parameterScales)
Un-nomalized the covariance matrix.static RealMatrix
unnormalizeInnovationCovarianceMatrix(RealMatrix normalizedS, double[] sigmas)
Un-normalize the innovation covariance matrix.static RealMatrix
unnormalizeKalmanGainMatrix(RealMatrix normalizedK, double[] parameterScales, double[] sigmas)
Un-normalize the Kalman gain matrix.static RealMatrix
unnormalizeMeasurementJacobian(RealMatrix normalizedH, double[] parameterScales, double[] sigmas)
Un-normalize the measurement matrix.static RealMatrix
unnormalizeStateTransitionMatrix(RealMatrix normalizedSTM, double[] parameterScales)
Un-nomalized the state transition matrix.
-
-
-
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 measurementreferenceDate
- 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 measurementreferenceDate
- 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 checkorbitalParameters
- orbital parameterspropagationParameters
- propagation parametersmeasurementParameters
- measurements parameters
-
filterRelevant
public static SpacecraftState[] filterRelevant(ObservedMeasurement<?> observedMeasurement, SpacecraftState[] allStates)
Filter relevant states for a measurement.- Parameters:
observedMeasurement
- measurement to considerallStates
- 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 filterinnovationCovarianceMatrix
- 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 measurementsigma
- 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 inputparameterScales
- 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 matrixparameterScales
- 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 matrixparameterScales
- 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 matrixparameterScales
- scale factor of estimated parameterssigmas
- 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 matrixsigmas
- 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 matrixparameterScales
- scale factor of estimated parameterssigmas
- measurement theoretical standard deviation- Returns:
- the un-normalized Kalman gain matrix
-
-