Commit 36ade41a authored by Bryan Cazabonne's avatar Bryan Cazabonne
Browse files

Fixed code smells.

parent 0c80ce7b
......@@ -659,9 +659,9 @@ public abstract class AbstractGaussianContribution implements DSSTForceModel {
this.meanMode = meanMode;
this.j = j;
this.parameters = parameters;
this.parameters = parameters.clone();
this.auxiliaryElements = new FieldAuxiliaryElements<>(state.getOrbit(), I);
this.context = new FieldAbstractGaussianContributionContext<>(auxiliaryElements, parameters);
this.context = new FieldAbstractGaussianContributionContext<>(auxiliaryElements, this.parameters);
// remove derivatives from state
final T[] stateVector = MathArrays.buildArray(field, 6);
OrbitType.EQUINOCTIAL.mapOrbitToArray(state.getOrbit(), PositionAngle.TRUE, stateVector, null);
......@@ -936,9 +936,9 @@ public abstract class AbstractGaussianContribution implements DSSTForceModel {
this.meanMode = meanMode;
this.j = j;
this.parameters = parameters;
this.parameters = parameters.clone();
this.auxiliaryElements = new AuxiliaryElements(state.getOrbit(), I);
this.context = new AbstractGaussianContributionContext(auxiliaryElements, parameters);
this.context = new AbstractGaussianContributionContext(auxiliaryElements, this.parameters);
// remove derivatives from state
final double[] stateVector = new double[6];
OrbitType.EQUINOCTIAL.mapOrbitToArray(state.getOrbit(), PositionAngle.TRUE, stateVector, null);
......
......@@ -383,7 +383,7 @@ public class DSSTThirdBodyContext extends ForceModelContext {
* @return aoR3Pow
*/
public double[] getAoR3Pow() {
return aoR3Pow;
return aoR3Pow.clone();
}
/** Get the value of max frequency of F.
......@@ -406,7 +406,7 @@ public class DSSTThirdBodyContext extends ForceModelContext {
* @return Qns
*/
public double[][] getQns() {
return Qns;
return Qns.clone();
}
}
......@@ -389,7 +389,7 @@ public class FieldDSSTThirdBodyContext<T extends RealFieldElement <T>> extends F
* @return aoR3Pow
*/
public T[] getAoR3Pow() {
return aoR3Pow;
return aoR3Pow.clone();
}
/** Get the value of max frequency of F.
......@@ -412,7 +412,7 @@ public class FieldDSSTThirdBodyContext<T extends RealFieldElement <T>> extends F
* @return Qns
*/
public T[][] getQns() {
return Qns;
return Qns.clone();
}
}
Supports Markdown
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