Search in sources :

Example 31 with Rotation

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

the class GTODProvider method getTransform.

/**
 * {@inheritDoc}
 */
@Override
public Transform getTransform(final AbsoluteDate date) throws OrekitException {
    // compute Greenwich apparent sidereal time, in radians
    final double gast = gastFunction.value(date);
    // compute true angular rotation of Earth, in rad/s
    final double lod = (eopHistory == null) ? 0.0 : eopHistory.getLOD(date);
    final double omp = AVE * (1 - lod / Constants.JULIAN_DAY);
    final Vector3D rotationRate = new Vector3D(omp, Vector3D.PLUS_K);
    // set up the transform from parent TOD
    return new Transform(date, new Rotation(Vector3D.PLUS_K, gast, RotationConvention.FRAME_TRANSFORM), rotationRate);
}
Also used : Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) FieldVector3D(org.hipparchus.geometry.euclidean.threed.FieldVector3D) FieldRotation(org.hipparchus.geometry.euclidean.threed.FieldRotation) Rotation(org.hipparchus.geometry.euclidean.threed.Rotation)

Example 32 with Rotation

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

the class MODProvider method getTransform.

/**
 * {@inheritDoc}
 */
@Override
public Transform getTransform(final AbsoluteDate date) {
    // compute the precession angles phiA, omegaA, chiA
    final double[] angles = precessionFunction.value(date);
    // complete precession
    final Rotation precession = r4.compose(new Rotation(RotationOrder.ZXZ, RotationConvention.FRAME_TRANSFORM, -angles[0], -angles[1], angles[2]), RotationConvention.FRAME_TRANSFORM);
    // set up the transform from parent GCRF
    return new Transform(date, precession);
}
Also used : FieldRotation(org.hipparchus.geometry.euclidean.threed.FieldRotation) Rotation(org.hipparchus.geometry.euclidean.threed.Rotation)

Example 33 with Rotation

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

the class TIRFProvider method getTransform.

/**
 * {@inheritDoc}
 */
@Override
public Transform getTransform(final AbsoluteDate date) throws OrekitException {
    // compute proper rotation
    final double correctedERA = era.value(date);
    // compute true angular rotation of Earth, in rad/s
    final double lod = (eopHistory == null) ? 0.0 : eopHistory.getLOD(date);
    final double omp = AVE * (1 - lod / Constants.JULIAN_DAY);
    final Vector3D rotationRate = new Vector3D(omp, Vector3D.PLUS_K);
    // set up the transform from parent CIRF
    final Rotation rotation = new Rotation(Vector3D.PLUS_K, correctedERA, RotationConvention.FRAME_TRANSFORM);
    return new Transform(date, rotation, rotationRate);
}
Also used : Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) FieldVector3D(org.hipparchus.geometry.euclidean.threed.FieldVector3D) FieldRotation(org.hipparchus.geometry.euclidean.threed.FieldRotation) Rotation(org.hipparchus.geometry.euclidean.threed.Rotation)

Example 34 with Rotation

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

the class VEISProvider method getTransform.

/**
 * {@inheritDoc}
 */
@Override
public Transform getTransform(final AbsoluteDate date) throws OrekitException {
    // offset from FIFTIES epoch (UT1 scale)
    final double dtai = date.durationFrom(VST_REFERENCE);
    final double dutc = TimeScalesFactory.getUTC().offsetFromTAI(date);
    // fixed at 0 since Veis parent is GTOD frame WITHOUT EOP corrections
    final double dut1 = 0.0;
    final double tut1 = dtai + dutc + dut1;
    final double ttd = tut1 / Constants.JULIAN_DAY;
    final double rdtt = ttd - (int) ttd;
    // compute Veis sidereal time, in radians
    final double vst = (VST0 + VST1 * ttd + MathUtils.TWO_PI * rdtt) % MathUtils.TWO_PI;
    // compute angular rotation of Earth, in rad/s
    final Vector3D rotationRate = new Vector3D(-VSTD, Vector3D.PLUS_K);
    // set up the transform from parent GTOD
    return new Transform(date, new Rotation(Vector3D.PLUS_K, vst, RotationConvention.VECTOR_OPERATOR), rotationRate);
}
Also used : Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) FieldVector3D(org.hipparchus.geometry.euclidean.threed.FieldVector3D) FieldRotation(org.hipparchus.geometry.euclidean.threed.FieldRotation) Rotation(org.hipparchus.geometry.euclidean.threed.Rotation)

Example 35 with Rotation

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

the class FieldOfView method buildDihedra.

/**
 * Build a dihedra.
 * @param factory factory for regions
 * @param tolerance tolerance below which points are considered equal
 * @param center Direction of the FOV center, in spacecraft frame
 * @param axis FOV dihedral axis, in spacecraft frame
 * @param halfAperture FOV dihedral half aperture angle,
 * must be less than π/2, i.e. full dihedra must be smaller then
 * an hemisphere
 * @return dihedra
 * @exception OrekitException if half aperture is larger than π/2
 */
private Region<Sphere2D> buildDihedra(final RegionFactory<Sphere2D> factory, final double tolerance, final Vector3D center, final Vector3D axis, final double halfAperture) throws OrekitException {
    if (halfAperture > 0.5 * FastMath.PI) {
        throw new OrekitException(LocalizedCoreFormats.OUT_OF_RANGE_SIMPLE, halfAperture, 0.0, 0.5 * FastMath.PI);
    }
    final Rotation r = new Rotation(axis, halfAperture, RotationConvention.VECTOR_OPERATOR);
    final Vector3D normalCenterPlane = Vector3D.crossProduct(axis, center);
    final Vector3D normalSidePlus = r.applyInverseTo(normalCenterPlane);
    final Vector3D normalSideMinus = r.applyTo(normalCenterPlane.negate());
    return factory.intersection(new SphericalPolygonsSet(normalSidePlus, tolerance), new SphericalPolygonsSet(normalSideMinus, tolerance));
}
Also used : Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) OrekitException(org.orekit.errors.OrekitException) SphericalPolygonsSet(org.hipparchus.geometry.spherical.twod.SphericalPolygonsSet) 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