use of org.hipparchus.random.Well1024a in project Orekit by CS-SI.
the class AngularCoordinatesTest method testDerivativesStructures2.
@Test
public void testDerivativesStructures2() throws OrekitException {
RandomGenerator random = new Well1024a(0x1633878dddac047dl);
Rotation r = randomRotation(random);
Vector3D o = randomVector(random, 1.0e-2);
Vector3D oDot = randomVector(random, 1.0e-2);
AngularCoordinates ac = new AngularCoordinates(r, o, oDot);
AngularCoordinates rebuilt = new AngularCoordinates(ac.toDerivativeStructureRotation(2));
Assert.assertEquals(0.0, Rotation.distance(ac.getRotation(), rebuilt.getRotation()), 1.0e-15);
Assert.assertEquals(0.0, Vector3D.distance(ac.getRotationRate(), rebuilt.getRotationRate()), 1.0e-15);
Assert.assertEquals(0.0, Vector3D.distance(ac.getRotationAcceleration(), rebuilt.getRotationAcceleration()), 1.0e-15);
}
use of org.hipparchus.random.Well1024a in project Orekit by CS-SI.
the class AngularCoordinatesTest method testReverseOffset.
@Test
public void testReverseOffset() {
RandomGenerator random = new Well1024a(0x4ecca9d57a8f1611l);
for (int i = 0; i < 100; ++i) {
Rotation r = randomRotation(random);
Vector3D o = randomVector(random, 1.0e-3);
AngularCoordinates ac = new AngularCoordinates(r, o);
AngularCoordinates sum = ac.addOffset(ac.revert());
Assert.assertEquals(0.0, sum.getRotation().getAngle(), 1.0e-15);
Assert.assertEquals(0.0, sum.getRotationRate().getNorm(), 1.0e-15);
Assert.assertEquals(0.0, sum.getRotationAcceleration().getNorm(), 1.0e-15);
}
}
use of org.hipparchus.random.Well1024a in project Orekit by CS-SI.
the class AngularCoordinatesTest method testDerivativesStructures1.
@Test
public void testDerivativesStructures1() throws OrekitException {
RandomGenerator random = new Well1024a(0x8f8fc6d27bbdc46dl);
Rotation r = randomRotation(random);
Vector3D o = randomVector(random, 1.0e-2);
Vector3D oDot = randomVector(random, 1.0e-2);
AngularCoordinates ac = new AngularCoordinates(r, o, oDot);
AngularCoordinates rebuilt = new AngularCoordinates(ac.toDerivativeStructureRotation(1));
Assert.assertEquals(0.0, Rotation.distance(ac.getRotation(), rebuilt.getRotation()), 1.0e-15);
Assert.assertEquals(0.0, Vector3D.distance(ac.getRotationRate(), rebuilt.getRotationRate()), 1.0e-15);
Assert.assertEquals(0.0, rebuilt.getRotationAcceleration().getNorm(), 1.0e-15);
}
Aggregations