Commit 0e605b97 authored by Pascal Parraud's avatar Pascal Parraud
Browse files

corrected LOF test

parent 891d5f9b
......@@ -60,6 +60,7 @@ public class LocalOrbitalFrameTest {
Vector3D zDirection = t.transformVector(Vector3D.PLUS_K);
Assert.assertEquals(0, Vector3D.angle(v2, xDirection), 1.0e-15);
Assert.assertEquals(0, Vector3D.angle(momentum, zDirection), 1.0e-15);
Assert.assertEquals(Math.PI, Vector3D.angle(t.getRotationRate(), zDirection), 1.0e-15);
Assert.assertTrue(Vector3D.dotProduct(yDirection, p2) < 0);
Assert.assertEquals(initialOrbit.getKeplerianMeanMotion(), t.getRotationRate().getNorm(), 1.0e-7);
......@@ -75,12 +76,12 @@ public class LocalOrbitalFrameTest {
FramesFactory.getGCRF(), initDate,
3.986004415e14);
Propagator propagator = new KeplerianPropagator(initialOrbit);
LocalOrbitalFrame tnw =
LocalOrbitalFrame qsw =
new LocalOrbitalFrame(FramesFactory.getGCRF(), LocalOrbitalFrame.LOFType.QSW,
propagator, "QSW");
AbsoluteDate date = initDate.shiftedBy(400);
Transform t = tnw.getTransformTo(FramesFactory.getGCRF(), date);
Transform t = qsw.getTransformTo(FramesFactory.getGCRF(), date);
PVCoordinates pv1 = t.transformPVCoordinates(PVCoordinates.ZERO);
Vector3D p1 = pv1.getPosition();
Vector3D v1 = pv1.getVelocity();
......@@ -97,6 +98,7 @@ public class LocalOrbitalFrameTest {
Vector3D zDirection = t.transformVector(Vector3D.PLUS_K);
Assert.assertEquals(0, Vector3D.angle(p2, xDirection), 1.0e-15);
Assert.assertEquals(0, Vector3D.angle(momentum, zDirection), 1.0e-15);
Assert.assertEquals(Math.PI, Vector3D.angle(t.getRotationRate(), zDirection), 1.0e-15);
Assert.assertTrue(Vector3D.dotProduct(yDirection, v2) > 0);
Assert.assertEquals(initialOrbit.getKeplerianMeanMotion(), t.getRotationRate().getNorm(), 1.0e-7);
......
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