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