Skip to content

Commit

Permalink
Fixed compiler and Javadoc warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximeJo committed Sep 4, 2024
1 parent 0fcf60b commit fe0a871
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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<String, Integer> getPropagationParameterColumns() {
return propagationParameterColumns;
}

/** Getter for the measurementParameterColumns.
* @return the measurementParameterColumns
*/
protected Map<String, Integer> 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;
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/orekit/frames/FixedTransformProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -55,6 +55,7 @@ public Transform getTransform(final AbsoluteDate date) {
}

/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override
public <T extends CalculusFieldElement<T>> FieldTransform<T> getTransform(final FieldAbsoluteDate<T> date) {
synchronized (cached) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/orekit/frames/MODProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -94,13 +94,13 @@ public Transform getTransform(final AbsoluteDate date) {
}

/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override
public <T extends CalculusFieldElement<T>> FieldTransform<T> getTransform(final FieldAbsoluteDate<T> date) {

// compute the precession angles phiA, omegaA, chiA
final T[] angles = precessionFunction.value(date);

@SuppressWarnings("unchecked")
final FieldRotation<T> fR4;
synchronized (fieldR4) {
fR4 = (FieldRotation<T>) fieldR4.computeIfAbsent(date.getField(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ private FieldGradient<T> 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<T>(value, derivative);
}

/** Generate the serie expansion in e².
Expand Down

0 comments on commit fe0a871

Please sign in to comment.