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));
}
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));
}
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)));
}
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));
}
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));
}
Aggregations