Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Orekit
Orekit
Commits
fba4d1bb
Commit
fba4d1bb
authored
Jan 15, 2023
by
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
Changes
127
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/test/java/org/orekit/attitudes/AggregateBoundedAttitudeProviderTest.java
View file @
fba4d1bb
...
...
@@ -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.
Decimal
64Field
;
import
org.hipparchus.util.
Binary
64Field
;
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
(
Decimal
64Field
.
getInstance
());
doTestFieldAEM
(
Binary
64Field
.
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
(
Decimal
64Field
.
getInstance
());
doTestFieldOutsideBounds
(
Binary
64Field
.
getInstance
());
}
private
<
T
extends
CalculusFieldElement
<
T
>>
void
doTestFieldOutsideBounds
(
final
Field
<
T
>
field
)
throws
Exception
{
...
...
src/test/java/org/orekit/attitudes/AttitudesSequenceTest.java
View file @
fba4d1bb
...
...
@@ -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.
Decimal
64Field
;
import
org.hipparchus.util.
Binary
64Field
;
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
(
Decimal
64Field
.
getInstance
());
doTestDayNightSwitchField
(
Binary
64Field
.
getInstance
());
}
private
<
T
extends
CalculusFieldElement
<
T
>>
void
doTestDayNightSwitchField
(
final
Field
<
T
>
field
)
...
...
src/test/java/org/orekit/attitudes/BodyCenterPointingTest.java
View file @
fba4d1bb
...
...
@@ -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.
Decimal
64Field
;
import
org.hipparchus.util.
Binary
64Field
;
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
(
Decimal
64Field
.
getInstance
());
doTestTarget
(
Binary
64Field
.
getInstance
());
}
@Test
public
void
doxBodyCenterInPointingDirectionTest
()
{
doTestBodyCenterInPointingDirection
(
Decimal
64Field
.
getInstance
());
doTestBodyCenterInPointingDirection
(
Binary
64Field
.
getInstance
());
}
@Test
public
void
testQDotField
()
{
doTestQDot
(
Decimal
64Field
.
getInstance
());
doTestQDot
(
Binary
64Field
.
getInstance
());
}
@Test
public
void
testSpinField
()
{
doTestSpin
(
Decimal
64Field
.
getInstance
());
doTestSpin
(
Binary
64Field
.
getInstance
());
}
private
<
T
extends
CalculusFieldElement
<
T
>>
void
doTestTarget
(
final
Field
<
T
>
field
)
{
...
...
src/test/java/org/orekit/attitudes/CelestialBodyPointingTest.java
View file @
fba4d1bb
...
...
@@ -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.
Decimal
64Field
;
import
org.hipparchus.util.
Binary
64Field
;
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
(
Decimal
64Field
.
getInstance
(),
sunPointing
,
orbit
,
date
,
frame
);
checkField
(
Binary
64Field
.
getInstance
(),
sunPointing
,
orbit
,
date
,
frame
);
Vector3D
xDirection
=
attitude
.
getRotation
().
applyInverseTo
(
Vector3D
.
PLUS_I
);
Vector3D
zDirection
=
attitude
.
getRotation
().
applyInverseTo
(
Vector3D
.
PLUS_K
);
...
...
src/test/java/org/orekit/attitudes/FieldAttitudeTest.java
View file @
fba4d1bb
...
...
@@ -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.
Decimal
64Field
;
import
org.hipparchus.util.
Binary
64Field
;
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
(
Decimal
64Field
.
getInstance
());
doTestShift
(
Binary
64Field
.
getInstance
());
}
@Test
public
void
testSpin
()
{
doTestSpin
(
Decimal
64Field
.
getInstance
());
doTestSpin
(
Binary
64Field
.
getInstance
());
}
@Test
public
void
testInterpolation
()
{
doTestInterpolation
(
Decimal
64Field
.
getInstance
());
doTestInterpolation
(
Binary
64Field
.
getInstance
());
}
private
<
T
extends
CalculusFieldElement
<
T
>>
void
doTestShift
(
final
Field
<
T
>
field
){
...
...
src/test/java/org/orekit/attitudes/FixedRateTest.java
View file @
fba4d1bb
...
...
@@ -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.
Decimal
64Field
;
import
org.hipparchus.util.
Binary
64Field
;
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
(
Decimal
64Field
.
getInstance
());
doTestZeroRate
(
Binary
64Field
.
getInstance
());
}
private
<
T
extends
CalculusFieldElement
<
T
>>
void
doTestZeroRate
(
final
Field
<
T
>
field
)
...
...
@@ -184,7 +184,7 @@ public class FixedRateTest {
@Test
public
void
testNonZeroRateField
()
{
doTestNonZeroRate
(
Decimal
64Field
.
getInstance
());
doTestNonZeroRate
(
Binary
64Field
.
getInstance
());
}
private
<
T
extends
CalculusFieldElement
<
T
>>
void
doTestNonZeroRate
(
final
Field
<
T
>
field
)
{
...
...
@@ -217,7 +217,7 @@ public class FixedRateTest {
@Test
public
void
testSpinField
()
{
doTestSpin
(
Decimal
64Field
.
getInstance
());
doTestSpin
(
Binary
64Field
.
getInstance
());
}
private
<
T
extends
CalculusFieldElement
<
T
>>
void
doTestSpin
(
final
Field
<
T
>
field
)
{
...
...
src/test/java/org/orekit/attitudes/InertialAttitudeTest.java
View file @
fba4d1bb
...
...
@@ -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.
Decimal
64
;
import
org.hipparchus.util.
Decimal
64Field
;
import
org.hipparchus.util.
Binary
64
;
import
org.hipparchus.util.
Binary
64Field
;
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
(
Decimal
64Field
.
getInstance
(),
law
,
state
.
getOrbit
(),
state
.
getDate
(),
state
.
getFrame
());
checkField
(
Binary
64Field
.
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
);
Decimal
64
one
=
Decimal
64
.
ONE
;
FieldAbsoluteDate
<
Decimal
64
>
date
=
new
FieldAbsoluteDate
<>(
one
.
getField
(),
t0
);
FieldOrbit
<
Decimal
64
>
orbit
=
new
FieldCartesianOrbit
<>(
Binary
64
one
=
Binary
64
.
ONE
;
FieldAbsoluteDate
<
Binary
64
>
date
=
new
FieldAbsoluteDate
<>(
one
.
getField
(),
t0
);
FieldOrbit
<
Binary
64
>
orbit
=
new
FieldCartesianOrbit
<>(
new
FieldPVCoordinates
<>(
one
,
this
.
orbit0
.
getPVCoordinates
()),
eci
,
date
,
one
.
multiply
(
orbit0
.
getMu
()));
// action + verify
FieldAttitude
<
Decimal
64
>
actual
=
law
.
getAttitude
(
orbit
,
date
,
eci
);
FieldAttitude
<
Binary
64
>
actual
=
law
.
getAttitude
(
orbit
,
date
,
eci
);
MatcherAssert
.
assertThat
(
actual
.
getReferenceFrame
(),
is
(
eci
));
MatcherAssert
.
assertThat
(
actual
.
toAttitude
(),
attitudeIs
(
expected
));
actual
=
law
.
getAttitude
(
orbit
.
shiftedBy
(
1
e3
),
date
.
shiftedBy
(
1
e3
),
eci
);
...
...
src/test/java/org/orekit/attitudes/LofOffsetPointingTest.java
View file @
fba4d1bb
...
...
@@ -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.
Decimal
64Field
;
import
org.hipparchus.util.
Binary
64Field
;
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
(
Decimal
64Field
.
getInstance
(),
lop
,
orbit
,
date
,
orbit
.
getFrame
());
checkField
(
Binary
64Field
.
getInstance
(),
lop
,
orbit
,
date
,
orbit
.
getFrame
());
}
}
...
...
src/test/java/org/orekit/attitudes/LofOffsetTest.java
View file @
fba4d1bb
...
...
@@ -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.
Decimal
64Field
;
import
org.hipparchus.util.
Binary
64Field
;
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
(
Decimal
64Field
.
getInstance
(),
law
,
orbit
,
date
,
orbit
.
getFrame
());
checkField
(
Binary
64Field
.
getInstance
(),
law
,
orbit
,
date
,
orbit
.
getFrame
());
}
}
...
...
src/test/java/org/orekit/attitudes/NadirPointingTest.java
View file @
fba4d1bb
...
...
@@ -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.
Decimal
64Field
;
import
org.hipparchus.util.
Binary
64Field
;
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
(
Decimal
64Field
.
getInstance
(),
nadirAttitudeLaw
,
kep
,
kep
.
getDate
(),
kep
.
getFrame
());
checkField
(
Binary
64Field
.
getInstance
(),
nadirAttitudeLaw
,
kep
,
kep
.
getDate
(),
kep
.
getFrame
());
// Get earth center attitude
Rotation
rotCenter
=
earthCenterAttitudeLaw
.
getAttitude
(
kep
,
date
,
kep
.
getFrame
()).
getRotation
();
...
...
src/test/java/org/orekit/attitudes/SpinStabilizedTest.java
View file @
fba4d1bb
...
...
@@ -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.
Decimal
64Field
;
import
org.hipparchus.util.
Binary
64Field
;
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
(
Decimal
64Field
.
getInstance
(),
bbq
,
kep
,
kep
.
getDate
(),
kep
.
getFrame
());
checkField
(
Binary
64Field
.
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
())),
...
...
src/test/java/org/orekit/attitudes/TabulatedLofOffsetTest.java
View file @
fba4d1bb
...
...
@@ -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.
Decimal
64Field
;
import
org.hipparchus.util.
Binary
64Field
;
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.0
e
-
6
);
checkField
(
Decimal
64Field
.
getInstance
(),
tabulated
,
checkField
(
Binary
64Field
.
getInstance
(),
tabulated
,
currentState
.
getOrbit
(),
currentState
.
getDate
(),
currentState
.
getFrame
());
});
rebuildingPropagator
.
propagate
(
orbit
.
getDate
().
shiftedBy
(
50
),
orbit
.
getDate
().
shiftedBy
(
1950
));
...
...
src/test/java/org/orekit/attitudes/TabulatedProviderTest.java
View file @
fba4d1bb
...
...
@@ -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.
Decimal
64
;
import
org.hipparchus.util.
Decimal
64Field
;
import
org.hipparchus.util.
Binary
64
;
import
org.hipparchus.util.
Binary
64Field
;
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.0
e
-
14
);
FieldAttitude
<
Decimal
64
>
attG64
=
FieldAttitude
<
Binary
64
>
attG64
=
provider
.
getAttitude
((
date
,
frame
)
->
new
TimeStampedFieldPVCoordinates
<>(
date
,
FieldPVCoordinates
.
getZero
(
Decimal
64Field
.
getInstance
())),
new
FieldAbsoluteDate
<>(
Decimal
64Field
.
getInstance
(),
date
),
FieldPVCoordinates
.
getZero
(
Binary
64Field
.
getInstance
())),
new
FieldAbsoluteDate
<>(
Binary
64Field
.
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.3
e
-
9
);
checkField
(
Decimal
64Field
.
getInstance
(),
provider
,
circOrbit
,
circOrbit
.
getDate
(),
circOrbit
.
getFrame
());
checkField
(
Binary
64Field
.
getInstance
(),
provider
,
circOrbit
,
circOrbit
.
getDate
(),
circOrbit
.
getFrame
());
}
private
List
<
TimeStampedAngularCoordinates
>
createSample
(
double
samplingRate
,
AttitudeProvider
referenceProvider
)
{
...
...
src/test/java/org/orekit/attitudes/TargetPointingTest.java
View file @
fba4d1bb
...
...
@@ -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.
Decimal
64Field
;
import
org.hipparchus.util.
Binary
64Field
;
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
(
Decimal
64Field
.
getInstance
(),
targetLaw
,
circ
,
circ
.
getDate
(),
circ
.
getFrame
());
checkField
(
Binary
64Field
.
getInstance
(),
targetLaw
,
circ
,
circ
.
getDate
(),
circ
.
getFrame
());
// Compute difference between both attitude providers
// *********************************************
...
...
src/test/java/org/orekit/attitudes/YawCompensationTest.java
View file @
fba4d1bb
...
...
@@ -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.
Decimal
64Field
;
import
org.hipparchus.util.
Binary
64Field
;
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
(
Decimal
64Field
.
getInstance
(),
yawCompensLaw
,
circOrbit
,
circOrbit
.
getDate
(),
circOrbit
.
getFrame
());
checkField
(
Binary
64Field
.
getInstance
(),
yawCompensLaw
,
circOrbit
,
circOrbit
.
getDate
(),
circOrbit
.
getFrame
());
// Compose rotations composition
Rotation
compoRot
=
rotYaw
.
compose
(
rotNoYaw
.
revert
(),
RotationConvention
.
VECTOR_OPERATOR
);
...
...
src/test/java/org/orekit/attitudes/YawSteeringTest.java
View file @
fba4d1bb
...
...
@@ -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.
Decimal
64Field
;
import
org.hipparchus.util.
Binary
64Field
;
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
(
Decimal
64Field
.
getInstance
(),
yawCompensLaw
,
circOrbit
,
circOrbit
.
getDate
(),
circOrbit
.
getFrame
());
checkField
(
Binary
64Field
.
getInstance
(),
yawCompensLaw
,
circOrbit
,
circOrbit
.
getDate
(),
circOrbit
.
getFrame
());
// Compose rotations composition
Rotation
compoRot
=
rotYaw
.
compose
(
rotNoYaw
.
revert
(),
RotationConvention
.
VECTOR_OPERATOR
);
...
...
src/test/java/org/orekit/bodies/EllipsoidTest.java
View file @
fba4d1bb
...
...
@@ -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.
Decimal
64Field
;
import
org.hipparchus.util.
Binary
64Field
;
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
(
Decimal
64Field
.
getInstance
());
doTestFieldPrincipalPlanesIntersections
(
Binary
64Field
.
getInstance
());
}
private
<
T
extends
CalculusFieldElement
<
T
>>
void
doTestFieldPrincipalPlanesIntersections
(
final
Field
<
T
>
field
)
{
...
...
@@ -145,7 +145,7 @@ public class EllipsoidTest {
@Test
public
void
testFieldNoIntersections
()
{
doTestFieldNoIntersections
(
Decimal
64Field
.
getInstance
());
doTestFieldNoIntersections
(
Binary
64Field
.
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
(
Decimal
64Field
.
getInstance
());
doTestFieldSinglePoint
(
Binary
64Field
.
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
(
Decimal
64Field
.
getInstance
());
doTestFieldRandomNormalSections
(
Binary
64Field
.
getInstance
());
}
private
<
T
extends
CalculusFieldElement
<
T
>>
void
doTestFieldRandomNormalSections
(
final
Field
<
T
>
field
)
{
...
...
@@ -286,7 +286,7 @@ public class EllipsoidTest {
@Test
public
void
testFieldInside
()
{
doTestFieldInside
(
Decimal
64Field
.
getInstance
());
doTestFieldInside
(
Binary
64Field
.
getInstance
());
}
private
<
T
extends
CalculusFieldElement
<
T
>>
void
doTestFieldInside
(
final
Field
<
T
>
field
)
{
...
...
@@ -328,7 +328,7 @@ public class EllipsoidTest {
@Test
public
void
testFieldLimb
()
{
doTestFieldLimb
(
Decimal
64Field
.
getInstance
());
doTestFieldLimb
(
Binary
64Field
.
getInstance
());
}
private
<
T
extends
CalculusFieldElement
<
T
>>
void
doTestFieldLimb
(
final
Field
<
T
>
field
)
{
...
...
@@ -376,7 +376,7 @@ public class EllipsoidTest {
@Test
public
void
testFieldIssue639
()
{
doTestFieldIssue639
(
Decimal
64Field
.
getInstance
());
doTestFieldIssue639
(
Binary
64Field
.
getInstance
());
}
private
<
T
extends
CalculusFieldElement
<
T
>>
void
doTestFieldIssue639
(
final
Field
<
T
>
field
)
{
...
...
src/test/java/org/orekit/bodies/FieldEllipseTest.java
View file @
fba4d1bb
...
...
@@ -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.
Decimal
64Field
;
import
org.hipparchus.util.
Binary
64Field
;
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
(
Decimal
64Field
.
getInstance
());
doTestMeridianShape
(
Binary
64Field
.
getInstance
());
}
@Test
public
void
testEquatorialShape
()
{
doTestEquatorialShape
(
Decimal
64Field
.
getInstance
());
doTestEquatorialShape
(
Binary
64Field
.
getInstance
());
}
@Test
public
void
testProjectionDerivatives
()
{
doTestProjectionDerivatives
(
Decimal
64Field
.
getInstance
());
doTestProjectionDerivatives
(
Binary
64Field
.
getInstance
());
}
@Test
public
void
testMinRadiusOfCurvature
()
{
doTestMinRadiusOfCurvature
(
Decimal
64Field
.
getInstance
());
doTestMinRadiusOfCurvature
(
Binary
64Field
.
getInstance
());
}
@Test
public
void
testMaxRadiusOfCurvature
()
{
doTestMaxRadiusOfCurvature
(
Decimal
64Field
.
getInstance
());
doTestMaxRadiusOfCurvature
(
Binary
64Field
.
getInstance
());
}
@Test
public
void
testFlatEllipse
()
{
doTestFlatEllipse
(
Decimal
64Field
.
getInstance
());
doTestFlatEllipse
(
Binary
64Field
.
getInstance
());
}
private
<
T
extends
CalculusFieldElement
<
T
>>
void
doTestMeridianShape
(
final
Field
<
T
>
field
)
{
...
...
src/test/java/org/orekit/bodies/FieldGeodeticPointTest.java
View file @
fba4d1bb
...
...
@@ -18,7 +18,7 @@ package org.orekit.bodies;
import
org.hipparchus.CalculusFieldElement
;
import
org.hipparchus.geometry.euclidean.threed.Vector3D
;
import
org.hipparchus.util.
Decimal
64
;
import
org.hipparchus.util.
Binary
64
;
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
<
Decimal
64
>
point
=
new
FieldGeodeticPoint
<
Decimal
64
>(
new
Decimal
64
(
FastMath
.
toRadians
(
135
)),
new
Decimal
64
(
FastMath
.
toRadians
(
90
-
360
)),
new
Decimal
64
(
0
));
FieldGeodeticPoint
<
Binary
64
>
point
=
new
FieldGeodeticPoint
<
Binary
64
>(
new
Binary
64
(
FastMath
.
toRadians
(
135
)),
new
Binary
64
(
FastMath
.
toRadians
(
90
-
360
)),
new
Binary
64
(
0
));
// verify
Assertions
.
assertEquals
(
FastMath
.
toRadians
(
45
),
point
.
getLatitude
().
getReal
(),
1.0
e
-
15
);
...
...
@@ -80,10 +80,10 @@ public class FieldGeodeticPointTest {
for
(
double
[]
point
:
points
)
{
// action
FieldGeodeticPoint
<
Decimal
64
>
gp
=
new
FieldGeodeticPoint
<
Decimal
64
>(
new
Decimal
64
(
point
[
0
]),
new
Decimal
64
(
point
[
1
]),
Decimal
64
.
ZERO
);
FieldGeodeticPoint
<
Binary
64
>
gp
=
new
FieldGeodeticPoint
<
Binary
64
>(
new
Binary
64
(
point
[
0
]),
new
Binary
64
(
point
[
1
]),
Binary
64
.
ZERO
);
Assertions
.
assertEquals
(
0
,
gp
.
getEast
().
crossProduct
(
gp
.
getNorth
()).
distance
(
gp
.
getZenith
()).
getReal
(),
1.0
e
-
15
);
Assertions
.
assertEquals
(
0
,
gp
.
getNorth
().
crossProduct
(
gp
.
getWest
()).
distance
(
gp
.
getZenith
()).
getReal
(),
1.0
e
-
15
);
Assertions
.
assertEquals
(
0
,
gp
.
getSouth
().
crossProduct
(
gp
.
getWest
()).
distance
(
gp
.
getNadir
()).
getReal
(),
1.0
e
-
15
);
...
...
@@ -103,33 +103,33 @@ public class FieldGeodeticPointTest {
@Test
public
void
testEquals
()
{
// setup
FieldGeodeticPoint
<
Decimal
64
>
point
=
new
FieldGeodeticPoint
<
Decimal
64
>(
new
Decimal
64
(
1
),
new
Decimal
64
(
2
),
new
Decimal
64
(
3
));
FieldGeodeticPoint
<
Binary
64
>
point
=
new
FieldGeodeticPoint
<
Binary
64
>(
new
Binary
64
(
1
),
new
Binary
64
(
2
),
new
Binary
64
(
3
));
// actions + verify
Assertions
.
assertEquals
(
point
,
new
FieldGeodeticPoint
<
Decimal
64
>(
new
Decimal
64
(
1
),
new
Decimal
64
(
2
),
new
Decimal
64
(
3
)));
Assertions
.
assertFalse
(
point
.
equals
(
new
FieldGeodeticPoint
<
Decimal
64
>(
new
Decimal
64
(
0
),
new
Decimal
64
(
2
),
new
Decimal
64
(
3
))));
Assertions
.
assertFalse
(
point
.
equals
(
new
FieldGeodeticPoint
<
Decimal
64
>(
new
Decimal
64
(
1
),
new
Decimal
64
(
0
),
new
Decimal
64
(
3
))));
Assertions
.
assertFalse
(
point
.
equals
(
new
FieldGeodeticPoint
<
Decimal
64
>(
new
Decimal
64
(
1
),
new
Decimal
64
(
2
),
new
Decimal
64
(
0
))));
Assertions
.
assertEquals
(
point
,
new
FieldGeodeticPoint
<
Binary
64
>(
new
Binary
64
(
1
),
new
Binary
64
(
2
),
new
Binary
64
(
3
)));
Assertions
.
assertFalse
(
point
.
equals
(
new
FieldGeodeticPoint
<
Binary
64
>(
new
Binary
64
(
0
),
new
Binary
64
(
2
),
new
Binary
64
(
3
))));