Commit d87024d2 authored by Bryan Cazabonne's avatar Bryan Cazabonne
Browse files

Updated RealField functions to CalculusField.

parent 24b73a4c
Pipeline #1092 passed with stages
in 27 minutes and 50 seconds
......@@ -18,7 +18,7 @@ package org.orekit.frames;
import org.hipparchus.Field;
import org.hipparchus.CalculusFieldElement;
import org.hipparchus.analysis.RealFieldUnivariateFunction;
import org.hipparchus.analysis.CalculusFieldUnivariateFunction;
import org.hipparchus.analysis.UnivariateFunction;
import org.hipparchus.analysis.solvers.AllowedSolution;
import org.hipparchus.analysis.solvers.BracketingNthOrderBrentSolver;
......@@ -158,7 +158,7 @@ public class L1TransformProvider implements TransformProvider {
final T baseR = bigR.multiply(1 - FastMath.cbrt(massRatio / 3));
// Accurate position of L1 point, by solving the L1 equilibrium equation
final RealFieldUnivariateFunction<T> l1Equation = r -> {
final CalculusFieldUnivariateFunction<T> l1Equation = r -> {
final T bigrminusR = bigR.subtract(r);
final T lhs = r.multiply(r).reciprocal();
final T rhs1 = bigrminusR.multiply(bigrminusR).reciprocal().multiply(massRatio);
......
......@@ -18,7 +18,7 @@ package org.orekit.frames;
import org.hipparchus.Field;
import org.hipparchus.CalculusFieldElement;
import org.hipparchus.analysis.RealFieldUnivariateFunction;
import org.hipparchus.analysis.CalculusFieldUnivariateFunction;
import org.hipparchus.analysis.UnivariateFunction;
import org.hipparchus.analysis.solvers.AllowedSolution;
import org.hipparchus.analysis.solvers.BracketingNthOrderBrentSolver;
......@@ -158,7 +158,7 @@ class L2TransformProvider implements TransformProvider {
final T baseR = bigR.multiply(FastMath.cbrt(massRatio / 3) + 1);
// Accurate position of L2 point, by solving the L2 equilibrium equation
final RealFieldUnivariateFunction<T> l2Equation = r -> {
final CalculusFieldUnivariateFunction<T> l2Equation = r -> {
final T rminusbigR = r.subtract(bigR);
final T lhs1 = r.multiply(r).reciprocal();
final T lhs2 = rminusbigR.multiply(rminusbigR).reciprocal().multiply(massRatio);
......
......@@ -18,7 +18,7 @@ package org.orekit.gnss.attitude;
import org.hipparchus.Field;
import org.hipparchus.CalculusFieldElement;
import org.hipparchus.analysis.RealFieldUnivariateFunction;
import org.hipparchus.analysis.CalculusFieldUnivariateFunction;
import org.hipparchus.analysis.UnivariateFunction;
import org.hipparchus.analysis.solvers.AllowedSolution;
import org.hipparchus.analysis.solvers.BracketingNthOrderBrentSolver;
......@@ -155,7 +155,7 @@ public class Glonass extends AbstractGNSSAttitudeProvider {
final T aNight = field.getZero().add(NIGHT_TURN_LIMIT);
T aNoon = FastMath.atan(muRate.divide(yawRate));
if (FastMath.abs(realBeta).getReal() < aNoon.getReal()) {
final RealFieldUnivariateFunction<T> f = yawEnd -> {
final CalculusFieldUnivariateFunction<T> f = yawEnd -> {
final T delta = muRate.multiply(yawEnd).divide(yawRate);
return yawEnd.subtract(FastMath.abs(context.computePhi(realBeta, delta).
subtract(context.computePhi(realBeta, delta.negate()))).
......
......@@ -18,7 +18,7 @@ package org.orekit.models.earth;
import org.hipparchus.Field;
import org.hipparchus.CalculusFieldElement;
import org.hipparchus.analysis.RealFieldUnivariateFunction;
import org.hipparchus.analysis.CalculusFieldUnivariateFunction;
import org.hipparchus.analysis.UnivariateFunction;
import org.hipparchus.analysis.solvers.AllowedSolution;
import org.hipparchus.analysis.solvers.BracketingNthOrderBrentSolver;
......@@ -505,7 +505,7 @@ public class Geoid implements EarthShape {
final T highPoint = maxAbscissa2.sqrt();
// line search function
final RealFieldUnivariateFunction<T> heightFunction = z -> {
final CalculusFieldUnivariateFunction<T> heightFunction = z -> {
try {
final FieldGeodeticPoint<T> geodetic =
transform(line.pointAt(z), bodyFrame, date);
......
......@@ -26,7 +26,7 @@ import java.util.Set;
import org.hipparchus.Field;
import org.hipparchus.CalculusFieldElement;
import org.hipparchus.analysis.RealFieldUnivariateVectorFunction;
import org.hipparchus.analysis.CalculusFieldUnivariateVectorFunction;
import org.hipparchus.analysis.UnivariateVectorFunction;
import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
......@@ -619,7 +619,7 @@ public abstract class AbstractGaussianContribution implements DSSTForceModel {
* </p>
*/
protected class FieldIntegrableFunction<T extends CalculusFieldElement<T>>
implements RealFieldUnivariateVectorFunction<T> {
implements CalculusFieldUnivariateVectorFunction<T> {
/** Current state. */
private final FieldSpacecraftState<T> state;
......@@ -1386,7 +1386,7 @@ public abstract class AbstractGaussianContribution implements DSSTForceModel {
* @param field field utilized by default
* @return the integral of the weighted function.
*/
public <T extends CalculusFieldElement<T>> T[] integrate(final RealFieldUnivariateVectorFunction<T> f,
public <T extends CalculusFieldElement<T>> T[] integrate(final CalculusFieldUnivariateVectorFunction<T> f,
final T lowerBound, final T upperBound, final Field<T> field) {
final T zero = field.getZero();
......@@ -1496,7 +1496,7 @@ public abstract class AbstractGaussianContribution implements DSSTForceModel {
* @param field field utilized by default
* @return the integral of the weighted function.
*/
private <T extends CalculusFieldElement<T>> T[] basicIntegrate(final RealFieldUnivariateVectorFunction<T> f,
private <T extends CalculusFieldElement<T>> T[] basicIntegrate(final CalculusFieldUnivariateVectorFunction<T> f,
final T[] points, final T[] weights, final Field<T> field) {
T x = points[0];
......
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