EOPEntry.java

  1. /* Copyright 2002-2013 CS Systèmes d'Information
  2.  * Licensed to CS Systèmes d'Information (CS) under one or more
  3.  * contributor license agreements.  See the NOTICE file distributed with
  4.  * this work for additional information regarding copyright ownership.
  5.  * CS licenses this file to You under the Apache License, Version 2.0
  6.  * (the "License"); you may not use this file except in compliance with
  7.  * the License.  You may obtain a copy of the License at
  8.  *
  9.  *   http://www.apache.org/licenses/LICENSE-2.0
  10.  *
  11.  * Unless required by applicable law or agreed to in writing, software
  12.  * distributed under the License is distributed on an "AS IS" BASIS,
  13.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.  * See the License for the specific language governing permissions and
  15.  * limitations under the License.
  16.  */
  17. package org.orekit.frames;

  18. import java.io.Serializable;

  19. import org.orekit.errors.OrekitException;
  20. import org.orekit.time.AbsoluteDate;
  21. import org.orekit.time.DateComponents;
  22. import org.orekit.time.TimeScalesFactory;
  23. import org.orekit.time.TimeStamped;

  24. /** This class holds an Earth Orientation Parameters entry.
  25.  * @author Luc Maisonobe
  26.  */
  27. public class EOPEntry implements TimeStamped, Serializable {

  28.     /** Serializable UID. */
  29.     private static final long serialVersionUID = 20130924L;

  30.     /** Entry date (modified julian day, 00h00 UTC scale). */
  31.     private final int mjd;

  32.     /** Entry date (absolute date). */
  33.     private final AbsoluteDate date;

  34.     /** UT1-UTC. */
  35.     private final double dt;

  36.     /** Length of day. */
  37.     private final double lod;

  38.     /** X component of pole motion. */
  39.     private final double x;

  40.     /** Y component of pole motion. */
  41.     private final double y;

  42.     /** Correction for nutation in longitude. */
  43.     private final double ddPsi;

  44.     /** Correction for nutation in obliquity. */
  45.     private final double ddEps;

  46.     /** Correction for nutation in Celestial Intermediate Pole (CIP) coordinates. */
  47.     private final double dx;

  48.     /** Correction for nutation in Celestial Intermediate Pole (CIP) coordinates. */
  49.     private final double dy;

  50.    /** Simple constructor.
  51.     * @param mjd entry date (modified julian day, 00h00 UTC scale)
  52.     * @param dt UT1-UTC in seconds
  53.     * @param lod length of day
  54.     * @param x X component of pole motion
  55.     * @param y Y component of pole motion
  56.     * @param ddPsi correction for nutation in longitude δΔΨ
  57.     * @param ddEps correction for nutation in obliquity δΔε
  58.     * @param dx correction for Celestial Intermediate Pole (CIP) coordinates
  59.     * @param dy correction for Celestial Intermediate Pole (CIP) coordinates
  60.     * @exception OrekitException if UTC time scale cannot be retrieved
  61.     */
  62.     public EOPEntry(final int mjd, final double dt, final double lod,
  63.                     final double x, final double y,
  64.                     final double ddPsi, final double ddEps,
  65.                     final double dx, final double dy)
  66.         throws OrekitException {

  67.         this.mjd   = mjd;
  68.         this.date  = new AbsoluteDate(new DateComponents(DateComponents.MODIFIED_JULIAN_EPOCH, mjd),
  69.                                       TimeScalesFactory.getUTC());
  70.         this.dt    = dt;
  71.         this.lod   = lod;
  72.         this.x     = x;
  73.         this.y     = y;
  74.         this.ddPsi = ddPsi;
  75.         this.ddEps = ddEps;
  76.         this.dx    = dx;
  77.         this.dy    = dy;

  78.     }

  79.     /** Get the entry date (modified julian day, 00h00 UTC scale).
  80.      * @return entry date
  81.      * @see #getDate()
  82.      */
  83.     public int getMjd() {
  84.         return mjd;
  85.     }

  86.     /** {@inheritDoc} */
  87.     public AbsoluteDate getDate() {
  88.         return date;
  89.     }

  90.     /** Get the UT1-UTC value.
  91.      * @return UT1-UTC in seconds
  92.      */
  93.     public double getUT1MinusUTC() {
  94.         return dt;
  95.     }

  96.     /** Get the LoD (Length of Day) value.
  97.      * @return LoD in seconds
  98.      */
  99.     public double getLOD() {
  100.         return lod;
  101.     }

  102.     /** Get the X component of the pole motion.
  103.      * @return X component of pole motion
  104.      */
  105.     public double getX() {
  106.         return x;
  107.     }

  108.     /** Get the Y component of the pole motion.
  109.      * @return Y component of pole motion
  110.      */
  111.     public double getY() {
  112.         return y;
  113.     }

  114.     /** Get the correction for nutation in longitude δΔΨ.
  115.      * @return correction for nutation in longitude  δΔΨ
  116.      */
  117.     public double getDdPsi() {
  118.         return ddPsi;
  119.     }

  120.     /** Get the correction for nutation in obliquity δΔε.
  121.      * @return correction for nutation in obliquity δΔε
  122.      */
  123.     public double getDdEps() {
  124.         return ddEps;
  125.     }

  126.     /** Get the correction for Celestial Intermediate Pole (CIP) coordinates.
  127.      * @return correction for Celestial Intermediate Pole (CIP) coordinates
  128.      */
  129.     public double getDx() {
  130.         return dx;
  131.     }

  132.     /** Get the correction for Celestial Intermediate Pole (CIP) coordinates.
  133.      * @return correction for Celestial Intermediate Pole (CIP) coordinates
  134.      */
  135.     public double getDy() {
  136.         return dy;
  137.     }

  138. }