1   /* Copyright 2002-2026 CS GROUP
2    * Licensed to CS GROUP (CS) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * CS licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *   http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.orekit.estimation.sequential;
18  
19  import org.hipparchus.linear.RealMatrix;
20  import org.orekit.orbits.OrbitalStateFactory;
21  import org.orekit.propagation.SpacecraftState;
22  
23  /** Provider for process noise matrices.
24   * @author Luc Maisonobe
25   * @since 9.2
26   */
27  public interface CovarianceMatrixProvider {
28  
29      /** Get the initial covariance matrix.
30       * <p>
31       * The initial covariance matrix is a covariance matrix corresponding to the
32       * parameters managed by the {@link KalmanEstimator Kalman estimator}.
33       * The number of rows/columns and their order are as follows:
34       * </p>
35       * <ul>
36       *   <li>The first 6 components correspond to the 6 orbital parameters
37       *   of the associated propagator. All 6 parameters must always be present,
38       *   regardless of the fact they are estimated or not.</li>
39       *   <li>The following components correspond to the subset of propagation
40       *   parameters of the associated propagator that are estimated.</li>
41       *   <li>The remaining components correspond to the subset of measurements
42       *   parameters that are estimated, considering all measurements, even
43       *   the ones that correspond to spacecrafts not related to the
44       *   associated propagator</li>
45       * </ul>
46       * <p>
47       * In most cases, the initial covariance matrix will be the output matrix
48       * of a previous run of the Kalman filter.
49       * </p>
50       * @param initial initial state
51       * @return physical (i.e. non normalized) initial covariance matrix
52       * @see org.orekit.propagation.conversion.PropagatorBuilder#getOrbitalStateFactory()
53       * @see OrbitalStateFactory#getOrbitalParametersDrivers()
54       * @see org.orekit.propagation.conversion.PropagatorBuilder#getPropagationParametersDrivers()
55       */
56      RealMatrix getInitialCovarianceMatrix(SpacecraftState initial);
57  
58      /** Get the process noise matrix between previous and current states.
59       * <p>
60       * The process noise matrix is a covariance matrix corresponding to the
61       * parameters managed by the {@link KalmanEstimator Kalman estimator}.
62       * The number of rows/columns and their order are as follows:
63       * </p>
64       * <ul>
65       *   <li>The first 6 components correspond to the 6 orbital parameters
66       *   of the associated propagator. All 6 parameters must always be present,
67       *   regardless of the fact they are estimated or not.</li>
68       *   <li>The following components correspond to the subset of propagation
69       *   parameters of the associated propagator that are estimated.</li>
70       *   <li>The remaining components correspond to the subset of measurements
71       *   parameters that are estimated, considering all measurements, even
72       *   the ones that correspond to spacecrafts not related to the
73       *   associated propagator</li>
74       * </ul>
75       * <p>
76       * In most cases, the process noise for the part corresponding to measurements
77       * (the final rows and columns) will be set to 0 for the process noise corresponding
78       * to the evolution between a non-null previous and current state.
79       * </p>
80       * @param previous previous state
81       * @param current current state
82       * @return physical (i.e. non normalized) process noise matrix between
83       * previous and current states
84       * @see org.orekit.propagation.conversion.PropagatorBuilder#getOrbitalStateFactory()
85       * @see OrbitalStateFactory#getOrbitalParametersDrivers()
86       * @see org.orekit.propagation.conversion.PropagatorBuilder#getPropagationParametersDrivers()
87       */
88      RealMatrix getProcessNoiseMatrix(SpacecraftState previous, SpacecraftState current);
89  
90  }