From fe0a871353d1b3eef0fc8902d101d8f817163478 Mon Sep 17 00:00:00 2001 From: Maxime Journot Date: Wed, 4 Sep 2024 16:03:29 +0200 Subject: [PATCH] Fixed compiler and Javadoc warnings. --- .../sequential/KalmanEstimationCommon.java | 70 ++++++++++++++++--- .../orekit/frames/FixedTransformProvider.java | 3 +- .../java/org/orekit/frames/MODProvider.java | 4 +- .../hansen/FieldHansenTesseralLinear.java | 2 +- 4 files changed, 67 insertions(+), 12 deletions(-) diff --git a/src/main/java/org/orekit/estimation/sequential/KalmanEstimationCommon.java b/src/main/java/org/orekit/estimation/sequential/KalmanEstimationCommon.java index a0ee0909b0..6da3867cc2 100644 --- a/src/main/java/org/orekit/estimation/sequential/KalmanEstimationCommon.java +++ b/src/main/java/org/orekit/estimation/sequential/KalmanEstimationCommon.java @@ -16,6 +16,13 @@ */ package org.orekit.estimation.sequential; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import org.hipparchus.filtering.kalman.ProcessEstimate; import org.hipparchus.linear.ArrayRealVector; import org.hipparchus.linear.MatrixUtils; @@ -30,13 +37,6 @@ import org.orekit.utils.ParameterDriversList; import org.orekit.utils.ParameterDriversList.DelegatingDriver; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Comparator; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - /** Class defining the process model dynamics to use with a {@link KalmanEstimator}. * @author Romain Gerbaud * @author Maxime Journot @@ -473,6 +473,11 @@ public Propagator[] getEstimatedPropagators() { return propagators; } + /** Get the normalized process noise matrix. + * + * @param stateDimension state dimension + * @return the normalized process noise matrix + */ protected RealMatrix getNormalizedProcessNoise(final int stateDimension) { final RealMatrix physicalProcessNoise = MatrixUtils.createRealMatrix(stateDimension, stateDimension); for (int k = 0; k < covarianceMatricesProviders.size(); ++k) { @@ -519,67 +524,116 @@ protected RealMatrix getNormalizedProcessNoise(final int stateDimension) { return KalmanEstimatorUtil.normalizeCovarianceMatrix(physicalProcessNoise, scale); } - + /** Getter for the orbitsStartColumns. + * @return the orbitsStartColumns + */ protected int[] getOrbitsStartColumns() { return orbitsStartColumns; } + /** Getter for the propagationParameterColumns. + * @return the propagationParameterColumns + */ protected Map getPropagationParameterColumns() { return propagationParameterColumns; } + /** Getter for the measurementParameterColumns. + * @return the measurementParameterColumns + */ protected Map getMeasurementParameterColumns() { return measurementParameterColumns; } + /** Getter for the estimatedPropagationParameters. + * @return the estimatedPropagationParameters + */ protected ParameterDriversList[] getEstimatedPropagationParametersArray() { return estimatedPropagationParameters; } + /** Getter for the estimatedOrbitalParameters. + * @return the estimatedOrbitalParameters + */ protected ParameterDriversList[] getEstimatedOrbitalParametersArray() { return estimatedOrbitalParameters; } + /** Getter for the covarianceIndirection. + * @return the covarianceIndirection + */ protected int[][] getCovarianceIndirection() { return covarianceIndirection; } + /** Getter for the scale. + * @return the scale + */ protected double[] getScale() { return scale; } + /** Getter for the correctedEstimate. + * @return the correctedEstimate + */ protected ProcessEstimate getCorrectedEstimate() { return correctedEstimate; } + /** Setter for the correctedEstimate. + * @param correctedEstimate the correctedEstimate + */ protected void setCorrectedEstimate(final ProcessEstimate correctedEstimate) { this.correctedEstimate = correctedEstimate; } + /** Getter for the referenceDate. + * @return the referenceDate + */ protected AbsoluteDate getReferenceDate() { return referenceDate; } + /** Increment current measurement number. */ protected void incrementCurrentMeasurementNumber() { currentMeasurementNumber += 1; } + /** Setter for the currentDate. + * @param currentDate the currentDate + */ public void setCurrentDate(final AbsoluteDate currentDate) { this.currentDate = currentDate; } + /** Set correctedSpacecraftState at index. + * + * @param correctedSpacecraftState corrected S/C state o set + * @param index index where to set in the array + */ protected void setCorrectedSpacecraftState(final SpacecraftState correctedSpacecraftState, final int index) { this.correctedSpacecraftStates[index] = correctedSpacecraftState; } + /** Set predictedSpacecraftState at index. + * + * @param predictedSpacecraftState predicted S/C state o set + * @param index index where to set in the array + */ protected void setPredictedSpacecraftState(final SpacecraftState predictedSpacecraftState, final int index) { this.predictedSpacecraftStates[index] = predictedSpacecraftState; } + /** Setter for the predictedMeasurement. + * @param predictedMeasurement the predictedMeasurement + */ protected void setPredictedMeasurement(final EstimatedMeasurement predictedMeasurement) { this.predictedMeasurement = predictedMeasurement; } + /** Setter for the correctedMeasurement. + * @param correctedMeasurement the correctedMeasurement + */ protected void setCorrectedMeasurement(final EstimatedMeasurement correctedMeasurement) { this.correctedMeasurement = correctedMeasurement; } diff --git a/src/main/java/org/orekit/frames/FixedTransformProvider.java b/src/main/java/org/orekit/frames/FixedTransformProvider.java index 125bfd9991..65fd8a7de5 100644 --- a/src/main/java/org/orekit/frames/FixedTransformProvider.java +++ b/src/main/java/org/orekit/frames/FixedTransformProvider.java @@ -21,8 +21,8 @@ import java.util.HashMap; import java.util.Map; -import org.hipparchus.Field; import org.hipparchus.CalculusFieldElement; +import org.hipparchus.Field; import org.orekit.time.AbsoluteDate; import org.orekit.time.FieldAbsoluteDate; @@ -55,6 +55,7 @@ public Transform getTransform(final AbsoluteDate date) { } /** {@inheritDoc} */ + @SuppressWarnings("unchecked") @Override public > FieldTransform getTransform(final FieldAbsoluteDate date) { synchronized (cached) { diff --git a/src/main/java/org/orekit/frames/MODProvider.java b/src/main/java/org/orekit/frames/MODProvider.java index 7658ca25dc..ef3201bcba 100644 --- a/src/main/java/org/orekit/frames/MODProvider.java +++ b/src/main/java/org/orekit/frames/MODProvider.java @@ -20,8 +20,8 @@ import java.util.HashMap; import java.util.Map; -import org.hipparchus.Field; import org.hipparchus.CalculusFieldElement; +import org.hipparchus.Field; import org.hipparchus.geometry.euclidean.threed.FieldRotation; import org.hipparchus.geometry.euclidean.threed.Rotation; import org.hipparchus.geometry.euclidean.threed.RotationConvention; @@ -94,13 +94,13 @@ public Transform getTransform(final AbsoluteDate date) { } /** {@inheritDoc} */ + @SuppressWarnings("unchecked") @Override public > FieldTransform getTransform(final FieldAbsoluteDate date) { // compute the precession angles phiA, omegaA, chiA final T[] angles = precessionFunction.value(date); - @SuppressWarnings("unchecked") final FieldRotation fR4; synchronized (fieldR4) { fR4 = (FieldRotation) fieldR4.computeIfAbsent(date.getField(), diff --git a/src/main/java/org/orekit/propagation/semianalytical/dsst/utilities/hansen/FieldHansenTesseralLinear.java b/src/main/java/org/orekit/propagation/semianalytical/dsst/utilities/hansen/FieldHansenTesseralLinear.java index b1365fd255..1995bdf2df 100644 --- a/src/main/java/org/orekit/propagation/semianalytical/dsst/utilities/hansen/FieldHansenTesseralLinear.java +++ b/src/main/java/org/orekit/propagation/semianalytical/dsst/utilities/hansen/FieldHansenTesseralLinear.java @@ -303,7 +303,7 @@ private FieldGradient getValueGradient(final T e2, final T chi, final T chi2) final T coef = zero.subtract(mnm1 + 1.5); final T derivative = coef.multiply(chi2).multiply(value). add(FastMath.pow(chi2, -mnm1 - 1).multiply(serie.getPartialDerivative(0)).divide(chi)); - return new FieldGradient<>(value, derivative); + return new FieldGradient(value, derivative); } /** Generate the serie expansion in e².