Example usage for org.apache.commons.math.geometry Vector3D PLUS_J

List of usage examples for org.apache.commons.math.geometry Vector3D PLUS_J

Introduction

In this page you can find the example usage for org.apache.commons.math.geometry Vector3D PLUS_J.

Prototype

Vector3D PLUS_J

To view the source code for org.apache.commons.math.geometry Vector3D PLUS_J.

Click Source Link

Document

Second canonical vector (coordinates: 0, 1, 0).

Usage

From source file:org.orekit.frames.EME2000Frame.java

/** Simple constructor.
 * @param name name of the frame/*from ww  w  .  ja  va  2s  .  c  o m*/
 */
protected EME2000Frame(final String name) {

    super(FramesFactory.getGCRF(), null, name, true);

    // build the bias transform
    final Rotation r1 = new Rotation(Vector3D.PLUS_I, D_EPSILON_B);
    final Rotation r2 = new Rotation(Vector3D.PLUS_J, -D_PSI_B * Math.sin(EPSILON_0));
    final Rotation r3 = new Rotation(Vector3D.PLUS_K, -ALPHA_0);
    final Rotation bias = r1.applyTo(r2.applyTo(r3));

    // store the bias transform
    setTransform(new Transform(bias));

}

From source file:org.orekit.frames.ITRF2005Frame.java

/** Update the frame to the given date.
 * <p>The update considers the pole motion from IERS data.</p>
 * @param date new value of the date/*from  w  w  w  . ja  v a 2 s  .  c  o m*/
 * @exception OrekitException if the nutation model data embedded in the
 * library cannot be read
 */
protected void updateFrame(final AbsoluteDate date) throws OrekitException {

    if ((cachedDate == null) || !cachedDate.equals(date)) {

        // offset from J2000 epoch in julian centuries
        final double tts = date.durationFrom(AbsoluteDate.J2000_EPOCH);
        final double ttc = tts / Constants.JULIAN_CENTURY;

        // pole correction parameters
        final PoleCorrection pCorr = ((TIRF2000Frame) getParent()).getPoleCorrection(date);
        final PoleCorrection nCorr = nutationCorrection(date);

        // elementary rotations due to pole motion in terrestrial frame
        final Rotation r1 = new Rotation(Vector3D.PLUS_I, -(pCorr.getYp() + nCorr.getYp()));
        final Rotation r2 = new Rotation(Vector3D.PLUS_J, -(pCorr.getXp() + nCorr.getXp()));
        final Rotation r3 = new Rotation(Vector3D.PLUS_K, S_PRIME_RATE * ttc);

        // complete pole motion in terrestrial frame
        final Rotation wRot = r3.applyTo(r2.applyTo(r1));

        // combined effects
        final Rotation combined = wRot.revert();

        // set up the transform from parent TIRF
        setTransform(new Transform(combined, Vector3D.ZERO));
        cachedDate = date;

    }
}

From source file:org.orekit.frames.MEMEFrame.java

/** Update the frame to the given date.
 * <p>The update considers the precession effects.</p>
 * @param date new value of the date//from  ww w.  j a  va 2 s .  c  o  m
 */
protected void updateFrame(final AbsoluteDate date) {

    if ((cachedDate == null) || !cachedDate.equals(date)) {

        // offset from J2000 epoch in julian centuries
        final double tts = date.durationFrom(AbsoluteDate.J2000_EPOCH);
        final double ttc = tts / Constants.JULIAN_CENTURY;

        // compute the zeta precession angle
        final double zeta = ((ZETA_3 * ttc + ZETA_2) * ttc + ZETA_1) * ttc;

        // compute the theta precession angle
        final double theta = ((THETA_3 * ttc + THETA_2) * ttc + THETA_1) * ttc;

        // compute the z precession angle
        final double z = ((Z_3 * ttc + Z_2) * ttc + Z_1) * ttc;

        // elementary rotations for precession
        final Rotation r1 = new Rotation(Vector3D.PLUS_K, z);
        final Rotation r2 = new Rotation(Vector3D.PLUS_J, -theta);
        final Rotation r3 = new Rotation(Vector3D.PLUS_K, zeta);

        // complete precession
        final Rotation precession = r1.applyTo(r2.applyTo(r3));

        // set up the transform from parent GCRF
        setTransform(new Transform(precession));

        cachedDate = date;
    }

}