Commit fba4d1bb authored by Luc Maisonobe's avatar Luc Maisonobe
Browse files

Update after Hipparchus renaming Decimal64{Field} into Binary64{Field}.

parent eaa49433
Pipeline #2925 passed with stages
in 22 minutes and 41 seconds
......@@ -20,7 +20,7 @@ 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.util.Decimal64Field;
import org.hipparchus.util.Binary64Field;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
......@@ -81,7 +81,7 @@ public class AggregateBoundedAttitudeProviderTest {
@Test
public void testFieldAEM() {
doTestFieldAEM(Decimal64Field.getInstance());
doTestFieldAEM(Binary64Field.getInstance());
}
private <T extends CalculusFieldElement<T>> void doTestFieldAEM(final Field<T> field) {
......@@ -137,7 +137,7 @@ public class AggregateBoundedAttitudeProviderTest {
@Test
public void testFieldOutsideBounds() throws Exception {
doTestFieldOutsideBounds(Decimal64Field.getInstance());
doTestFieldOutsideBounds(Binary64Field.getInstance());
}
private <T extends CalculusFieldElement<T>> void doTestFieldOutsideBounds(final Field<T> field) throws Exception {
......
......@@ -28,7 +28,7 @@ import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.ode.events.Action;
import org.hipparchus.ode.nonstiff.AdaptiveStepsizeIntegrator;
import org.hipparchus.ode.nonstiff.DormandPrince853Integrator;
import org.hipparchus.util.Decimal64Field;
import org.hipparchus.util.Binary64Field;
import org.hipparchus.util.FastMath;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
......@@ -184,7 +184,7 @@ public class AttitudesSequenceTest {
@Test
public void testDayNightSwitchField() {
doTestDayNightSwitchField(Decimal64Field.getInstance());
doTestDayNightSwitchField(Binary64Field.getInstance());
}
private <T extends CalculusFieldElement<T>> void doTestDayNightSwitchField(final Field<T> field)
......
......@@ -25,7 +25,7 @@ import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
import org.hipparchus.geometry.euclidean.threed.Line;
import org.hipparchus.geometry.euclidean.threed.Rotation;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.Decimal64Field;
import org.hipparchus.util.Binary64Field;
import org.hipparchus.util.FastMath;
import org.hipparchus.util.MathArrays;
import org.junit.jupiter.api.AfterEach;
......@@ -238,21 +238,21 @@ public class BodyCenterPointingTest {
@Test
public void testTargetField() {
doTestTarget(Decimal64Field.getInstance());
doTestTarget(Binary64Field.getInstance());
}
@Test
public void doxBodyCenterInPointingDirectionTest() {
doTestBodyCenterInPointingDirection(Decimal64Field.getInstance());
doTestBodyCenterInPointingDirection(Binary64Field.getInstance());
}
@Test
public void testQDotField() {
doTestQDot(Decimal64Field.getInstance());
doTestQDot(Binary64Field.getInstance());
}
@Test
public void testSpinField() {
doTestSpin(Decimal64Field.getInstance());
doTestSpin(Binary64Field.getInstance());
}
private <T extends CalculusFieldElement<T>>void doTestTarget(final Field<T> field) {
......
......@@ -20,7 +20,7 @@ import org.hipparchus.CalculusFieldElement;
import org.hipparchus.Field;
import org.hipparchus.geometry.euclidean.threed.Rotation;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.Decimal64Field;
import org.hipparchus.util.Binary64Field;
import org.hipparchus.util.FastMath;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
......@@ -61,7 +61,7 @@ public class CelestialBodyPointingTest {
Orbit orbit = new KeplerianOrbit(pv, frame, date, 3.986004415e14);
Attitude attitude = sunPointing.getAttitude(orbit, date, frame);
checkField(Decimal64Field.getInstance(), sunPointing, orbit, date, frame);
checkField(Binary64Field.getInstance(), sunPointing, orbit, date, frame);
Vector3D xDirection = attitude.getRotation().applyInverseTo(Vector3D.PLUS_I);
Vector3D zDirection = attitude.getRotation().applyInverseTo(Vector3D.PLUS_K);
......
......@@ -21,7 +21,7 @@ import org.hipparchus.Field;
import org.hipparchus.geometry.euclidean.threed.FieldRotation;
import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.Decimal64Field;
import org.hipparchus.util.Binary64Field;
import org.hipparchus.util.FastMath;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
......@@ -43,17 +43,17 @@ public class FieldAttitudeTest {
@Test
public void testShift() {
doTestShift(Decimal64Field.getInstance());
doTestShift(Binary64Field.getInstance());
}
@Test
public void testSpin() {
doTestSpin(Decimal64Field.getInstance());
doTestSpin(Binary64Field.getInstance());
}
@Test
public void testInterpolation() {
doTestInterpolation(Decimal64Field.getInstance());
doTestInterpolation(Binary64Field.getInstance());
}
private <T extends CalculusFieldElement<T>> void doTestShift(final Field<T> field){
......
......@@ -22,7 +22,7 @@ import org.hipparchus.geometry.euclidean.threed.FieldRotation;
import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
import org.hipparchus.geometry.euclidean.threed.Rotation;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.Decimal64Field;
import org.hipparchus.util.Binary64Field;
import org.hipparchus.util.FastMath;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
......@@ -152,7 +152,7 @@ public class FixedRateTest {
@Test
public void testZeroRateField() {
doTestZeroRate(Decimal64Field.getInstance());
doTestZeroRate(Binary64Field.getInstance());
}
private <T extends CalculusFieldElement<T>> void doTestZeroRate(final Field<T> field)
......@@ -184,7 +184,7 @@ public class FixedRateTest {
@Test
public void testNonZeroRateField() {
doTestNonZeroRate(Decimal64Field.getInstance());
doTestNonZeroRate(Binary64Field.getInstance());
}
private <T extends CalculusFieldElement<T>> void doTestNonZeroRate(final Field<T> field) {
......@@ -217,7 +217,7 @@ public class FixedRateTest {
@Test
public void testSpinField() {
doTestSpin(Decimal64Field.getInstance());
doTestSpin(Binary64Field.getInstance());
}
private <T extends CalculusFieldElement<T>> void doTestSpin(final Field<T> field) {
......
......@@ -22,8 +22,8 @@ import org.hipparchus.Field;
import org.hipparchus.geometry.euclidean.threed.Rotation;
import org.hipparchus.geometry.euclidean.threed.RotationConvention;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.Decimal64;
import org.hipparchus.util.Decimal64Field;
import org.hipparchus.util.Binary64;
import org.hipparchus.util.Binary64Field;
import org.hipparchus.util.FastMath;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
......@@ -71,7 +71,7 @@ public class InertialAttitudeTest {
Attitude initial = propagator.propagate(t0).getAttitude();
for (double t = 0; t < 10000.0; t += 100) {
SpacecraftState state = propagator.propagate(t0.shiftedBy(t));
checkField(Decimal64Field.getInstance(), law, state.getOrbit(), state.getDate(), state.getFrame());
checkField(Binary64Field.getInstance(), law, state.getOrbit(), state.getDate(), state.getFrame());
Attitude attitude = state.getAttitude();
Rotation evolution = attitude.getRotation().compose(initial.getRotation().revert(),
RotationConvention.VECTOR_OPERATOR);
......@@ -201,16 +201,16 @@ public class InertialAttitudeTest {
Frame eci = orbit0.getFrame();
Attitude expected = new Attitude(t0, eci, AngularCoordinates.IDENTITY);
AttitudeProvider law = InertialProvider.of(eci);
Decimal64 one = Decimal64.ONE;
FieldAbsoluteDate<Decimal64> date = new FieldAbsoluteDate<>(one.getField(), t0);
FieldOrbit<Decimal64> orbit = new FieldCartesianOrbit<>(
Binary64 one = Binary64.ONE;
FieldAbsoluteDate<Binary64> date = new FieldAbsoluteDate<>(one.getField(), t0);
FieldOrbit<Binary64> orbit = new FieldCartesianOrbit<>(
new FieldPVCoordinates<>(one, this.orbit0.getPVCoordinates()),
eci,
date,
one.multiply(orbit0.getMu()));
// action + verify
FieldAttitude<Decimal64> actual = law.getAttitude(orbit, date, eci);
FieldAttitude<Binary64> actual = law.getAttitude(orbit, date, eci);
MatcherAssert.assertThat(actual.getReferenceFrame(), is(eci));
MatcherAssert.assertThat(actual.toAttitude(), attitudeIs(expected));
actual = law.getAttitude(orbit.shiftedBy(1e3), date.shiftedBy(1e3), eci);
......
......@@ -22,7 +22,7 @@ import org.hipparchus.geometry.euclidean.threed.Rotation;
import org.hipparchus.geometry.euclidean.threed.RotationConvention;
import org.hipparchus.geometry.euclidean.threed.RotationOrder;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.Decimal64Field;
import org.hipparchus.util.Binary64Field;
import org.hipparchus.util.FastMath;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
......@@ -205,7 +205,7 @@ public class LofOffsetPointingTest {
continue;
}
LofOffsetPointing lop = new LofOffsetPointing(orbit.getFrame(), earthSpheric, law, dir);
checkField(Decimal64Field.getInstance(), lop, orbit, date, orbit.getFrame());
checkField(Binary64Field.getInstance(), lop, orbit, date, orbit.getFrame());
}
}
......
......@@ -22,7 +22,7 @@ import org.hipparchus.geometry.euclidean.threed.Rotation;
import org.hipparchus.geometry.euclidean.threed.RotationConvention;
import org.hipparchus.geometry.euclidean.threed.RotationOrder;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.Decimal64Field;
import org.hipparchus.util.Binary64Field;
import org.hipparchus.util.FastMath;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
......@@ -291,7 +291,7 @@ public class LofOffsetTest {
double alpha2 = 0.456;
double alpha3 = 0.789;
LofOffset law = new LofOffset(orbit.getFrame(), type, order, alpha1, alpha2, alpha3);
checkField(Decimal64Field.getInstance(), law, orbit, date, orbit.getFrame());
checkField(Binary64Field.getInstance(), law, orbit, date, orbit.getFrame());
}
}
......
......@@ -21,7 +21,7 @@ import org.hipparchus.Field;
import org.hipparchus.geometry.euclidean.threed.Rotation;
import org.hipparchus.geometry.euclidean.threed.RotationConvention;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.Decimal64Field;
import org.hipparchus.util.Binary64Field;
import org.hipparchus.util.FastMath;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
......@@ -131,7 +131,7 @@ public class NadirPointingTest {
// Get nadir attitude
Rotation rotNadir = nadirAttitudeLaw.getAttitude(kep, date, kep.getFrame()).getRotation();
checkField(Decimal64Field.getInstance(), nadirAttitudeLaw, kep, kep.getDate(), kep.getFrame());
checkField(Binary64Field.getInstance(), nadirAttitudeLaw, kep, kep.getDate(), kep.getFrame());
// Get earth center attitude
Rotation rotCenter = earthCenterAttitudeLaw.getAttitude(kep, date, kep.getFrame()).getRotation();
......
......@@ -20,7 +20,7 @@ import org.hipparchus.CalculusFieldElement;
import org.hipparchus.Field;
import org.hipparchus.geometry.euclidean.threed.Rotation;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.Decimal64Field;
import org.hipparchus.util.Binary64Field;
import org.hipparchus.util.FastMath;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
......@@ -63,7 +63,7 @@ public class SpinStabilizedTest {
new Vector3D(0, 0, 3680.853673522056));
KeplerianOrbit kep = new KeplerianOrbit(pv, FramesFactory.getEME2000(), date, 3.986004415e14);
Attitude attitude = bbq.getAttitude(kep, date, kep.getFrame());
checkField(Decimal64Field.getInstance(), bbq, kep, kep.getDate(), kep.getFrame());
checkField(Binary64Field.getInstance(), bbq, kep, kep.getDate(), kep.getFrame());
Vector3D xDirection = attitude.getRotation().applyInverseTo(Vector3D.PLUS_I);
Assertions.assertEquals(FastMath.atan(1.0 / 5000.0),
Vector3D.angle(xDirection, sun.getPosition(date, FramesFactory.getEME2000())),
......
......@@ -24,7 +24,7 @@ import org.hipparchus.geometry.euclidean.threed.RotationOrder;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.random.RandomGenerator;
import org.hipparchus.random.Well19937a;
import org.hipparchus.util.Decimal64Field;
import org.hipparchus.util.Binary64Field;
import org.hipparchus.util.FastMath;
import org.hipparchus.util.MathUtils;
import org.junit.jupiter.api.AfterEach;
......@@ -151,7 +151,7 @@ public class TabulatedLofOffsetTest {
final Rotation r1 = currentState.getAttitude().getRotation();
final Rotation r2 = rebuilt.getAttitude().getRotation();
Assertions.assertEquals(0.0, Rotation.distance(r1, r2), 7.0e-6);
checkField(Decimal64Field.getInstance(), tabulated,
checkField(Binary64Field.getInstance(), tabulated,
currentState.getOrbit(), currentState.getDate(), currentState.getFrame());
});
rebuildingPropagator.propagate(orbit.getDate().shiftedBy(50), orbit.getDate().shiftedBy(1950));
......
......@@ -20,8 +20,8 @@ import org.hipparchus.CalculusFieldElement;
import org.hipparchus.Field;
import org.hipparchus.geometry.euclidean.threed.Rotation;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.Decimal64;
import org.hipparchus.util.Decimal64Field;
import org.hipparchus.util.Binary64;
import org.hipparchus.util.Binary64Field;
import org.hipparchus.util.FastMath;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
......@@ -95,10 +95,10 @@ public class TabulatedProviderTest {
Rotation.distance(attE.getRotation(), attG.getRotation()),
1.0e-14);
FieldAttitude<Decimal64> attG64 =
FieldAttitude<Binary64> attG64 =
provider.getAttitude((date, frame) -> new TimeStampedFieldPVCoordinates<>(date,
FieldPVCoordinates.getZero(Decimal64Field.getInstance())),
new FieldAbsoluteDate<>(Decimal64Field.getInstance(), date),
FieldPVCoordinates.getZero(Binary64Field.getInstance())),
new FieldAbsoluteDate<>(Binary64Field.getInstance(), date),
gcrf);
Assertions.assertEquals(gcrf.getName(), attG64.getReferenceFrame().getName());
......@@ -147,7 +147,7 @@ public class TabulatedProviderTest {
TabulatedProvider provider = new TabulatedProvider(circOrbit.getFrame(), sample, n,
AngularDerivativesFilter.USE_RRA);
Assertions.assertEquals(0.0, checkError(start, end, checkingRate, referenceProvider, provider), 4.3e-9);
checkField(Decimal64Field.getInstance(), provider, circOrbit, circOrbit.getDate(), circOrbit.getFrame());
checkField(Binary64Field.getInstance(), provider, circOrbit, circOrbit.getDate(), circOrbit.getFrame());
}
private List<TimeStampedAngularCoordinates> createSample(double samplingRate, AttitudeProvider referenceProvider) {
......
......@@ -22,7 +22,7 @@ import org.hipparchus.geometry.euclidean.threed.Line;
import org.hipparchus.geometry.euclidean.threed.Rotation;
import org.hipparchus.geometry.euclidean.threed.RotationConvention;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.Decimal64Field;
import org.hipparchus.util.Binary64Field;
import org.hipparchus.util.FastMath;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
......@@ -354,7 +354,7 @@ public class TargetPointingTest {
// Get attitude rotation
Rotation rotSatEME2000 = targetLaw.getAttitude(circ, date, circ.getFrame()).getRotation();
checkField(Decimal64Field.getInstance(), targetLaw, circ, circ.getDate(), circ.getFrame());
checkField(Binary64Field.getInstance(), targetLaw, circ, circ.getDate(), circ.getFrame());
// Compute difference between both attitude providers
// *********************************************
......
......@@ -22,7 +22,7 @@ import org.hipparchus.geometry.euclidean.threed.Line;
import org.hipparchus.geometry.euclidean.threed.Rotation;
import org.hipparchus.geometry.euclidean.threed.RotationConvention;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.Decimal64Field;
import org.hipparchus.util.Binary64Field;
import org.hipparchus.util.FastMath;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
......@@ -309,7 +309,7 @@ public class YawCompensationTest {
Rotation rotNoYaw = nadirLaw.getAttitude(circOrbit, date, circOrbit.getFrame()).getRotation();
Rotation rotYaw = yawCompensLaw.getAttitude(circOrbit, date, circOrbit.getFrame()).getRotation();
checkField(Decimal64Field.getInstance(), yawCompensLaw, circOrbit, circOrbit.getDate(), circOrbit.getFrame());
checkField(Binary64Field.getInstance(), yawCompensLaw, circOrbit, circOrbit.getDate(), circOrbit.getFrame());
// Compose rotations composition
Rotation compoRot = rotYaw.compose(rotNoYaw.revert(), RotationConvention.VECTOR_OPERATOR);
......
......@@ -21,7 +21,7 @@ import org.hipparchus.Field;
import org.hipparchus.geometry.euclidean.threed.Rotation;
import org.hipparchus.geometry.euclidean.threed.RotationConvention;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.Decimal64Field;
import org.hipparchus.util.Binary64Field;
import org.hipparchus.util.FastMath;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
......@@ -140,7 +140,7 @@ public class YawSteeringTest {
Rotation rotNoYaw = nadirLaw.getAttitude(circOrbit, date, circOrbit.getFrame()).getRotation();
Rotation rotYaw = yawCompensLaw.getAttitude(circOrbit, date, circOrbit.getFrame()).getRotation();
checkField(Decimal64Field.getInstance(), yawCompensLaw, circOrbit, circOrbit.getDate(), circOrbit.getFrame());
checkField(Binary64Field.getInstance(), yawCompensLaw, circOrbit, circOrbit.getDate(), circOrbit.getFrame());
// Compose rotations composition
Rotation compoRot = rotYaw.compose(rotNoYaw.revert(), RotationConvention.VECTOR_OPERATOR);
......
......@@ -25,7 +25,7 @@ import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.random.RandomGenerator;
import org.hipparchus.random.Well1024a;
import org.hipparchus.random.Well19937a;
import org.hipparchus.util.Decimal64Field;
import org.hipparchus.util.Binary64Field;
import org.hipparchus.util.FastMath;
import org.hipparchus.util.MathArrays;
import org.junit.jupiter.api.Assertions;
......@@ -91,7 +91,7 @@ public class EllipsoidTest {
@Test
public void testFieldPrincipalPlanesIntersections() {
doTestFieldPrincipalPlanesIntersections(Decimal64Field.getInstance());
doTestFieldPrincipalPlanesIntersections(Binary64Field.getInstance());
}
private <T extends CalculusFieldElement<T>> void doTestFieldPrincipalPlanesIntersections(final Field<T> field) {
......@@ -145,7 +145,7 @@ public class EllipsoidTest {
@Test
public void testFieldNoIntersections() {
doTestFieldNoIntersections(Decimal64Field.getInstance());
doTestFieldNoIntersections(Binary64Field.getInstance());
}
private <T extends CalculusFieldElement<T>> void doTestFieldNoIntersections(final Field<T> field) {
......@@ -169,7 +169,7 @@ public class EllipsoidTest {
@Test
public void testFieldSinglePoint() throws IOException {
doTestFieldSinglePoint(Decimal64Field.getInstance());
doTestFieldSinglePoint(Binary64Field.getInstance());
}
private <T extends CalculusFieldElement<T>> void doTestFieldSinglePoint(final Field<T> field) {
......@@ -228,7 +228,7 @@ public class EllipsoidTest {
@Test
public void testFieldRandomNormalSections() throws IOException {
doTestFieldRandomNormalSections(Decimal64Field.getInstance());
doTestFieldRandomNormalSections(Binary64Field.getInstance());
}
private <T extends CalculusFieldElement<T>> void doTestFieldRandomNormalSections(final Field<T> field) {
......@@ -286,7 +286,7 @@ public class EllipsoidTest {
@Test
public void testFieldInside() {
doTestFieldInside(Decimal64Field.getInstance());
doTestFieldInside(Binary64Field.getInstance());
}
private <T extends CalculusFieldElement<T>> void doTestFieldInside(final Field<T> field) {
......@@ -328,7 +328,7 @@ public class EllipsoidTest {
@Test
public void testFieldLimb() {
doTestFieldLimb(Decimal64Field.getInstance());
doTestFieldLimb(Binary64Field.getInstance());
}
private <T extends CalculusFieldElement<T>> void doTestFieldLimb(final Field<T> field) {
......@@ -376,7 +376,7 @@ public class EllipsoidTest {
@Test
public void testFieldIssue639() {
doTestFieldIssue639(Decimal64Field.getInstance());
doTestFieldIssue639(Binary64Field.getInstance());
}
private <T extends CalculusFieldElement<T>> void doTestFieldIssue639(final Field<T> field) {
......
......@@ -24,7 +24,7 @@ import org.hipparchus.Field;
import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.geometry.euclidean.twod.FieldVector2D;
import org.hipparchus.util.Decimal64Field;
import org.hipparchus.util.Binary64Field;
import org.hipparchus.util.FastMath;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
......@@ -42,32 +42,32 @@ public class FieldEllipseTest {
@Test
public void testMeridianShape() {
doTestMeridianShape(Decimal64Field.getInstance());
doTestMeridianShape(Binary64Field.getInstance());
}
@Test
public void testEquatorialShape() {
doTestEquatorialShape(Decimal64Field.getInstance());
doTestEquatorialShape(Binary64Field.getInstance());
}
@Test
public void testProjectionDerivatives() {
doTestProjectionDerivatives(Decimal64Field.getInstance());
doTestProjectionDerivatives(Binary64Field.getInstance());
}
@Test
public void testMinRadiusOfCurvature() {
doTestMinRadiusOfCurvature(Decimal64Field.getInstance());
doTestMinRadiusOfCurvature(Binary64Field.getInstance());
}
@Test
public void testMaxRadiusOfCurvature() {
doTestMaxRadiusOfCurvature(Decimal64Field.getInstance());
doTestMaxRadiusOfCurvature(Binary64Field.getInstance());
}
@Test
public void testFlatEllipse() {
doTestFlatEllipse(Decimal64Field.getInstance());
doTestFlatEllipse(Binary64Field.getInstance());
}
private <T extends CalculusFieldElement<T>> void doTestMeridianShape(final Field<T> field) {
......
......@@ -18,7 +18,7 @@ package org.orekit.bodies;
import org.hipparchus.CalculusFieldElement;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.Decimal64;
import org.hipparchus.util.Binary64;
import org.hipparchus.util.FastMath;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
......@@ -38,10 +38,10 @@ public class FieldGeodeticPointTest {
@Test
public void testGeodeticPointAngleNormalization() {
// action
FieldGeodeticPoint<Decimal64> point =
new FieldGeodeticPoint<Decimal64>(new Decimal64(FastMath.toRadians(135)),
new Decimal64(FastMath.toRadians(90 - 360)),
new Decimal64(0));
FieldGeodeticPoint<Binary64> point =
new FieldGeodeticPoint<Binary64>(new Binary64(FastMath.toRadians(135)),
new Binary64(FastMath.toRadians(90 - 360)),
new Binary64(0));
// verify
Assertions.assertEquals(FastMath.toRadians(45), point.getLatitude().getReal(), 1.0e-15);
......@@ -80,10 +80,10 @@ public class FieldGeodeticPointTest {
for (double[] point : points) {
// action
FieldGeodeticPoint<Decimal64> gp =
new FieldGeodeticPoint<Decimal64>(new Decimal64(point[0]),
new Decimal64(point[1]),
Decimal64.ZERO);
FieldGeodeticPoint<Binary64> gp =
new FieldGeodeticPoint<Binary64>(new Binary64(point[0]),
new Binary64(point[1]),
Binary64.ZERO);
Assertions.assertEquals(0, gp.getEast().crossProduct(gp.getNorth()).distance(gp.getZenith()).getReal(), 1.0e-15);
Assertions.assertEquals(0, gp.getNorth().crossProduct(gp.getWest()).distance(gp.getZenith()).getReal(), 1.0e-15);
Assertions.assertEquals(0, gp.getSouth().crossProduct(gp.getWest()).distance(gp.getNadir()).getReal(), 1.0e-15);
......@@ -103,33 +103,33 @@ public class FieldGeodeticPointTest {
@Test
public void testEquals() {
// setup
FieldGeodeticPoint<Decimal64> point =
new FieldGeodeticPoint<Decimal64>(new Decimal64(1),
new Decimal64(2),
new Decimal64(3));
FieldGeodeticPoint<Binary64> point =
new FieldGeodeticPoint<Binary64>(new Binary64(1),
new Binary64(2),
new Binary64(3));
// actions + verify
Assertions.assertEquals(point, new FieldGeodeticPoint<Decimal64>(new Decimal64(1),
new Decimal64(2),
new Decimal64(3)));
Assertions.assertFalse(point.equals(new FieldGeodeticPoint<Decimal64>(new Decimal64(0),
new Decimal64(2),
new Decimal64(3))));
Assertions.assertFalse(point.equals(new FieldGeodeticPoint<Decimal64>(new Decimal64(1),
new Decimal64(0),
new Decimal64(3))));
Assertions.assertFalse(point.equals(new FieldGeodeticPoint<Decimal64>(new Decimal64(1),
new Decimal64(2),
new Decimal64(0))));
Assertions.assertEquals(point, new FieldGeodeticPoint<Binary64>(new Binary64(1),
new Binary64(2),
new Binary64(3)));
Assertions.assertFalse(point.equals(new FieldGeodeticPoint<Binary64>(new Binary64(0),
new Binary64(2),
new Binary64(3))));