Commit 55afe64d authored by Bryan Cazabonne's avatar Bryan Cazabonne

Replaced deprecated methods in Kalman orbit determination tutorials.

parent ce010d1c
......@@ -731,11 +731,15 @@ public abstract class AbstractOrbitDetermination<T extends IntegratedPropagatorB
// Build the full covariance matrix and process noise matrix
final int nbPropag = (propagationP != null) ? propagationP.getRowDimension() : 0;
final int nbMeas = (measurementP != null) ? measurementP.getRowDimension() : 0;
final RealMatrix initialP = MatrixUtils.createRealMatrix(6 + nbPropag + nbMeas,
6 + nbPropag + nbMeas);
final RealMatrix Q = MatrixUtils.createRealMatrix(6 + nbPropag + nbMeas,
6 + nbPropag + nbMeas);
final RealMatrix initialP = MatrixUtils.createRealMatrix(6 + nbPropag,
6 + nbPropag);
final RealMatrix Q = MatrixUtils.createRealMatrix(6 + nbPropag,
6 + nbPropag);
// Orbital part
initialP.setSubMatrix(orbitalP.getData(), 0, 0);
Q.setSubMatrix(orbitalQ.getData(), 0, 0);
// Orbital part
initialP.setSubMatrix(orbitalP.getData(), 0, 0);
Q.setSubMatrix(orbitalQ.getData(), 0, 0);
......@@ -746,17 +750,14 @@ public abstract class AbstractOrbitDetermination<T extends IntegratedPropagatorB
Q.setSubMatrix(propagationQ.getData(), 6, 6);
}
// Measurement part
// Build the Kalman
final KalmanEstimatorBuilder kalmanBuilder = new KalmanEstimatorBuilder().
addPropagationConfiguration(propagatorBuilder, new ConstantProcessNoise(initialP, Q));
if (measurementP != null) {
initialP.setSubMatrix(measurementP.getData(), 6 + nbPropag, 6 + nbPropag);
Q.setSubMatrix(measurementQ.getData(), 6 + nbPropag, 6 + nbPropag);
// Measurement part
kalmanBuilder.estimatedMeasurementsParameters(estimatedMeasurementsParameters, new ConstantProcessNoise(measurementP, measurementQ));
}
// Build the Kalman
final KalmanEstimator kalman = new KalmanEstimatorBuilder().
addPropagationConfiguration(propagatorBuilder, new ConstantProcessNoise(initialP, Q)).
estimatedMeasurementsParameters(estimatedMeasurementsParameters).
build();
final KalmanEstimator kalman = kalmanBuilder.build();
kalman.setObserver(new KalmanOrbitDeterminationObserver(logStream, rangeLog, rangeRateLog,
azimuthLog, elevationLog, positionLog,
velocityLog));
......
......@@ -705,11 +705,14 @@ public abstract class AbstractOrbitDeterminationEngine<T extends IntegratedPropa
// Build the full covariance matrix and process noise matrix
final int nbPropag = (propagationP != null) ? propagationP.getRowDimension() : 0;
final int nbMeas = (measurementP != null) ? measurementP.getRowDimension() : 0;
final RealMatrix initialP = MatrixUtils.createRealMatrix(6 + nbPropag + nbMeas,
6 + nbPropag + nbMeas);
final RealMatrix Q = MatrixUtils.createRealMatrix(6 + nbPropag + nbMeas,
6 + nbPropag + nbMeas);
final RealMatrix initialP = MatrixUtils.createRealMatrix(6 + nbPropag,
6 + nbPropag);
final RealMatrix Q = MatrixUtils.createRealMatrix(6 + nbPropag,
6 + nbPropag);
// Orbital part
initialP.setSubMatrix(orbitalP.getData(), 0, 0);
Q.setSubMatrix(orbitalQ.getData(), 0, 0);
// Orbital part
initialP.setSubMatrix(orbitalP.getData(), 0, 0);
Q.setSubMatrix(orbitalQ.getData(), 0, 0);
......@@ -720,17 +723,14 @@ public abstract class AbstractOrbitDeterminationEngine<T extends IntegratedPropa
Q.setSubMatrix(propagationQ.getData(), 6, 6);
}
// Measurement part
// Build the Kalman
final KalmanEstimatorBuilder kalmanBuilder = new KalmanEstimatorBuilder().
addPropagationConfiguration(propagatorBuilder, new ConstantProcessNoise(initialP, Q));
if (measurementP != null) {
initialP.setSubMatrix(measurementP.getData(), 6 + nbPropag, 6 + nbPropag);
Q.setSubMatrix(measurementQ.getData(), 6 + nbPropag, 6 + nbPropag);
// Measurement part
kalmanBuilder.estimatedMeasurementsParameters(estimatedMeasurementsParameters, new ConstantProcessNoise(measurementP, measurementQ));
}
// Build the Kalman
final KalmanEstimator kalman = new KalmanEstimatorBuilder().
addPropagationConfiguration(propagatorBuilder, new ConstantProcessNoise(initialP, Q)).
estimatedMeasurementsParameters(estimatedMeasurementsParameters).
build();
final KalmanEstimator kalman = kalmanBuilder.build();
kalman.setObserver(new KalmanOrbitDeterminationObserver(logStream, rangeLog, rangeRateLog,
azimuthLog, elevationLog, positionLog,
velocityLog));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment