use of org.hipparchus.geometry.euclidean.threed.RotationOrder in project Orekit by CS-SI.
the class LofOffsetPointingTest method testTypesField.
@Test
public void testTypesField() throws OrekitException {
AbsoluteDate date = new AbsoluteDate(new DateComponents(1970, 01, 01), new TimeComponents(3, 25, 45.6789), TimeScalesFactory.getUTC());
KeplerianOrbit orbit = new KeplerianOrbit(7178000.0, 1.e-4, FastMath.toRadians(50.), FastMath.toRadians(10.), FastMath.toRadians(20.), FastMath.toRadians(30.), PositionAngle.MEAN, FramesFactory.getEME2000(), date, 3.986004415e14);
for (final LOFType type : LOFType.values()) {
RotationOrder order = RotationOrder.ZXY;
double alpha1 = 0.123;
double alpha2 = 0.456;
double alpha3 = 0.789;
LofOffset law = new LofOffset(orbit.getFrame(), type, order, alpha1, alpha2, alpha3);
final Vector3D dir;
switch(type) {
case TNW:
dir = Vector3D.PLUS_J;
break;
case QSW:
case LVLH:
dir = Vector3D.MINUS_I;
break;
case VVLH:
dir = Vector3D.PLUS_K;
break;
default:
// VNC
dir = Vector3D.MINUS_K;
}
LofOffsetPointing lop = new LofOffsetPointing(orbit.getFrame(), earthSpheric, law, dir);
checkField(Decimal64Field.getInstance(), lop, orbit, date, orbit.getFrame());
}
}
use of org.hipparchus.geometry.euclidean.threed.RotationOrder in project Orekit by CS-SI.
the class LofOffsetTest method testRetrieveAngles.
@Test
public void testRetrieveAngles() throws OrekitException {
AbsoluteDate date = new AbsoluteDate(new DateComponents(1970, 01, 01), new TimeComponents(3, 25, 45.6789), TimeScalesFactory.getUTC());
KeplerianOrbit orbit = new KeplerianOrbit(7178000.0, 1.e-4, FastMath.toRadians(50.), FastMath.toRadians(10.), FastMath.toRadians(20.), FastMath.toRadians(30.), PositionAngle.MEAN, FramesFactory.getEME2000(), date, 3.986004415e14);
RotationOrder order = RotationOrder.ZXY;
double alpha1 = 0.123;
double alpha2 = 0.456;
double alpha3 = 0.789;
LofOffset law = new LofOffset(orbit.getFrame(), LOFType.VVLH, order, alpha1, alpha2, alpha3);
Rotation offsetAtt = law.getAttitude(orbit, date, orbit.getFrame()).getRotation();
Rotation alignedAtt = new LofOffset(orbit.getFrame(), LOFType.VVLH).getAttitude(orbit, date, orbit.getFrame()).getRotation();
Rotation offsetProper = offsetAtt.compose(alignedAtt.revert(), RotationConvention.VECTOR_OPERATOR);
double[] anglesV = offsetProper.revert().getAngles(order, RotationConvention.VECTOR_OPERATOR);
Assert.assertEquals(alpha1, anglesV[0], 1.0e-11);
Assert.assertEquals(alpha2, anglesV[1], 1.0e-11);
Assert.assertEquals(alpha3, anglesV[2], 1.0e-11);
double[] anglesF = offsetProper.getAngles(order, RotationConvention.FRAME_TRANSFORM);
Assert.assertEquals(alpha1, anglesF[0], 1.0e-11);
Assert.assertEquals(alpha2, anglesF[1], 1.0e-11);
Assert.assertEquals(alpha3, anglesF[2], 1.0e-11);
}
use of org.hipparchus.geometry.euclidean.threed.RotationOrder in project Orekit by CS-SI.
the class LofOffsetTest method testTypesField.
@Test
public void testTypesField() throws OrekitException {
AbsoluteDate date = new AbsoluteDate(new DateComponents(1970, 01, 01), new TimeComponents(3, 25, 45.6789), TimeScalesFactory.getUTC());
KeplerianOrbit orbit = new KeplerianOrbit(7178000.0, 1.e-4, FastMath.toRadians(50.), FastMath.toRadians(10.), FastMath.toRadians(20.), FastMath.toRadians(30.), PositionAngle.MEAN, FramesFactory.getEME2000(), date, 3.986004415e14);
for (final LOFType type : LOFType.values()) {
RotationOrder order = RotationOrder.ZXY;
double alpha1 = 0.123;
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());
}
}
Aggregations