EOPEntry.java

  1. /* Copyright 2002-2017 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.TimeScalesFactory;
  22. import org.orekit.time.TimeStamped;

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

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

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

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

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

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

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

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

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

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

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

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

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

  66.         this.mjd   = mjd;
  67.         this.date  = AbsoluteDate.createMJDDate(mjd, 0.0, TimeScalesFactory.getUTC());
  68.         this.dt    = dt;
  69.         this.lod   = lod;
  70.         this.x     = x;
  71.         this.y     = y;
  72.         this.ddPsi = ddPsi;
  73.         this.ddEps = ddEps;
  74.         this.dx    = dx;
  75.         this.dy    = dy;

  76.     }

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

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

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

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

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

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

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

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

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

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

  136. }