Search in sources :

Example 26 with Rotation

use of org.hipparchus.geometry.euclidean.threed.Rotation in project Orekit by CS-SI.

the class Transform method compositeTranslation.

/**
 * Compute a composite translation.
 * @param first first applied transform
 * @param second second applied transform
 * @return translation part of the composite transform
 */
private static Vector3D compositeTranslation(final Transform first, final Transform second) {
    final Vector3D p1 = first.cartesian.getPosition();
    final Rotation r1 = first.angular.getRotation();
    final Vector3D p2 = second.cartesian.getPosition();
    return p1.add(r1.applyInverseTo(p2));
}
Also used : FieldVector3D(org.hipparchus.geometry.euclidean.threed.FieldVector3D) Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) FieldRotation(org.hipparchus.geometry.euclidean.threed.FieldRotation) Rotation(org.hipparchus.geometry.euclidean.threed.Rotation)

Example 27 with Rotation

use of org.hipparchus.geometry.euclidean.threed.Rotation in project Orekit by CS-SI.

the class Transform method compositeRotationRate.

/**
 * Compute a composite rotation rate.
 * @param first first applied transform
 * @param second second applied transform
 * @return rotation rate part of the composite transform
 */
private static Vector3D compositeRotationRate(final Transform first, final Transform second) {
    final Vector3D o1 = first.angular.getRotationRate();
    final Rotation r2 = second.angular.getRotation();
    final Vector3D o2 = second.angular.getRotationRate();
    return o2.add(r2.applyTo(o1));
}
Also used : FieldVector3D(org.hipparchus.geometry.euclidean.threed.FieldVector3D) Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) FieldRotation(org.hipparchus.geometry.euclidean.threed.FieldRotation) Rotation(org.hipparchus.geometry.euclidean.threed.Rotation)

Example 28 with Rotation

use of org.hipparchus.geometry.euclidean.threed.Rotation in project Orekit by CS-SI.

the class Transform method compositeRotationAcceleration.

/**
 * Compute a composite rotation acceleration.
 * @param first first applied transform
 * @param second second applied transform
 * @return rotation acceleration part of the composite transform
 */
private static Vector3D compositeRotationAcceleration(final Transform first, final Transform second) {
    final Vector3D o1 = first.angular.getRotationRate();
    final Vector3D oDot1 = first.angular.getRotationAcceleration();
    final Rotation r2 = second.angular.getRotation();
    final Vector3D o2 = second.angular.getRotationRate();
    final Vector3D oDot2 = second.angular.getRotationAcceleration();
    return new Vector3D(1, oDot2, 1, r2.applyTo(oDot1), -1, Vector3D.crossProduct(o2, r2.applyTo(o1)));
}
Also used : FieldVector3D(org.hipparchus.geometry.euclidean.threed.FieldVector3D) Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) FieldRotation(org.hipparchus.geometry.euclidean.threed.FieldRotation) Rotation(org.hipparchus.geometry.euclidean.threed.Rotation)

Example 29 with Rotation

use of org.hipparchus.geometry.euclidean.threed.Rotation in project Orekit by CS-SI.

the class L1TransformProvider method getTransform.

/**
 * {@inheritDoc}
 */
@Override
public Transform getTransform(final AbsoluteDate date) throws OrekitException {
    final PVCoordinates pv21 = secondaryBody.getPVCoordinates(date, frame);
    final Vector3D translation = getL1(pv21.getPosition()).negate();
    final Rotation rotation = new Rotation(pv21.getPosition(), pv21.getVelocity(), Vector3D.PLUS_I, Vector3D.PLUS_J);
    return new Transform(date, new Transform(date, translation), new Transform(date, rotation));
}
Also used : Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) FieldVector3D(org.hipparchus.geometry.euclidean.threed.FieldVector3D) FieldPVCoordinates(org.orekit.utils.FieldPVCoordinates) PVCoordinates(org.orekit.utils.PVCoordinates) FieldRotation(org.hipparchus.geometry.euclidean.threed.FieldRotation) Rotation(org.hipparchus.geometry.euclidean.threed.Rotation)

Example 30 with Rotation

use of org.hipparchus.geometry.euclidean.threed.Rotation in project Orekit by CS-SI.

the class L2TransformProvider method getTransform.

/**
 * {@inheritDoc}
 */
@Override
public Transform getTransform(final AbsoluteDate date) throws OrekitException {
    final PVCoordinates pv21 = secondaryBody.getPVCoordinates(date, frame);
    final Vector3D translation = getL2(pv21.getPosition()).negate();
    final Rotation rotation = new Rotation(pv21.getPosition(), pv21.getVelocity(), Vector3D.PLUS_I, Vector3D.PLUS_J);
    return new Transform(date, new Transform(date, translation), new Transform(date, rotation));
}
Also used : Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) FieldVector3D(org.hipparchus.geometry.euclidean.threed.FieldVector3D) FieldPVCoordinates(org.orekit.utils.FieldPVCoordinates) PVCoordinates(org.orekit.utils.PVCoordinates) FieldRotation(org.hipparchus.geometry.euclidean.threed.FieldRotation) Rotation(org.hipparchus.geometry.euclidean.threed.Rotation)

Aggregations

Rotation (org.hipparchus.geometry.euclidean.threed.Rotation)145 Vector3D (org.hipparchus.geometry.euclidean.threed.Vector3D)116 Test (org.junit.Test)100 AbsoluteDate (org.orekit.time.AbsoluteDate)55 FieldVector3D (org.hipparchus.geometry.euclidean.threed.FieldVector3D)53 FieldRotation (org.hipparchus.geometry.euclidean.threed.FieldRotation)43 FieldAbsoluteDate (org.orekit.time.FieldAbsoluteDate)38 PVCoordinates (org.orekit.utils.PVCoordinates)30 SpacecraftState (org.orekit.propagation.SpacecraftState)26 DateComponents (org.orekit.time.DateComponents)22 Frame (org.orekit.frames.Frame)21 KeplerianOrbit (org.orekit.orbits.KeplerianOrbit)21 RandomGenerator (org.hipparchus.random.RandomGenerator)19 Transform (org.orekit.frames.Transform)19 FieldPVCoordinates (org.orekit.utils.FieldPVCoordinates)19 CircularOrbit (org.orekit.orbits.CircularOrbit)18 TimeComponents (org.orekit.time.TimeComponents)17 TimeStampedPVCoordinates (org.orekit.utils.TimeStampedPVCoordinates)16 GeodeticPoint (org.orekit.bodies.GeodeticPoint)15 OneAxisEllipsoid (org.orekit.bodies.OneAxisEllipsoid)14