1   /* Copyright 2002-2023 CS GROUP
2    * Licensed to CS GROUP (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  
19  import java.io.Serializable;
20  
21  import org.orekit.time.AbsoluteDate;
22  import org.orekit.time.TimeStamped;
23  
24  /** This class holds an Earth Orientation Parameters entry.
25   * @author Luc Maisonobe
26   */
27  public class EOPEntry implements TimeStamped, Serializable {
28  
29      /** Serializable UID. */
30      private static final long serialVersionUID = 20231017L;
31  
32      /** Entry date (modified julian day, 00h00 UTC scale). */
33      private final int mjd;
34  
35      /** Entry date (absolute date). */
36      private final AbsoluteDate date;
37  
38      /** UT1-UTC. */
39      private final double dt;
40  
41      /** Length of day. */
42      private final double lod;
43  
44      /** X component of pole motion. */
45      private final double x;
46  
47      /** Y component of pole motion. */
48      private final double y;
49  
50      /** X component of pole motion rate.
51       * @since 12.0
52       */
53      private final double xRate;
54  
55      /** Y component of pole motion rate.
56       * @since 12.0
57       */
58      private final double yRate;
59  
60      /** Correction for nutation in longitude. */
61      private final double ddPsi;
62  
63      /** Correction for nutation in obliquity. */
64      private final double ddEps;
65  
66      /** Correction for nutation in Celestial Intermediate Pole (CIP) coordinates. */
67      private final double dx;
68  
69      /** Correction for nutation in Celestial Intermediate Pole (CIP) coordinates. */
70      private final double dy;
71  
72      /** ITRF version this entry defines. */
73      private final ITRFVersion itrfType;
74  
75      /** Simple constructor.
76       * @param mjd entry date (modified Julian day, 00h00 UTC scale)
77       * @param dt UT1-UTC in seconds
78       * @param lod length of day
79       * @param x X component of pole motion
80       * @param y Y component of pole motion
81       * @param xRate X component of pole motion rate (NaN if absent)
82       * @param yRate Y component of pole motion rate (NaN if absent)
83       * @param ddPsi correction for nutation in longitude δΔΨ
84       * @param ddEps correction for nutation in obliquity δΔε
85       * @param dx correction for Celestial Intermediate Pole (CIP) coordinates
86       * @param dy correction for Celestial Intermediate Pole (CIP) coordinates
87       * @param itrfType ITRF version this entry defines
88       * @param date corresponding to {@code mjd}.
89       * @since 12.0
90       */
91      public EOPEntry(final int mjd, final double dt, final double lod,
92                      final double x, final double y, final double xRate, final double yRate,
93                      final double ddPsi, final double ddEps,
94                      final double dx, final double dy,
95                      final ITRFVersion itrfType, final AbsoluteDate date) {
96  
97          this.mjd      = mjd;
98          this.date     = date;
99          this.dt       = dt;
100         this.lod      = lod;
101         this.x        = x;
102         this.y        = y;
103         this.xRate    = xRate;
104         this.yRate    = yRate;
105         this.ddPsi    = ddPsi;
106         this.ddEps    = ddEps;
107         this.dx       = dx;
108         this.dy       = dy;
109         this.itrfType = itrfType;
110 
111     }
112 
113     /** Get the entry date (modified julian day, 00h00 UTC scale).
114      * @return entry date
115      * @see #getDate()
116      */
117     public int getMjd() {
118         return mjd;
119     }
120 
121     /** {@inheritDoc} */
122     public AbsoluteDate getDate() {
123         return date;
124     }
125 
126     /** Get the UT1-UTC value.
127      * @return UT1-UTC in seconds
128      */
129     public double getUT1MinusUTC() {
130         return dt;
131     }
132 
133     /** Get the LoD (Length of Day) value.
134      * @return LoD in seconds
135      */
136     public double getLOD() {
137         return lod;
138     }
139 
140     /** Get the X component of the pole motion.
141      * @return X component of pole motion
142      */
143     public double getX() {
144         return x;
145     }
146 
147     /** Get the Y component of the pole motion.
148      * @return Y component of pole motion
149      */
150     public double getY() {
151         return y;
152     }
153 
154     /** Get the X component of the pole motion rate.
155      * @return X component of pole motion rate
156      * @since 12.0
157      */
158     public double getXRate() {
159         return xRate;
160     }
161 
162     /** Get the Y component of the pole motion rate.
163      * @return Y component of pole motion rate
164      * @since 12.0
165      */
166     public double getYRate() {
167         return yRate;
168     }
169 
170     /** Get the correction for nutation in longitude δΔΨ.
171      * @return correction for nutation in longitude  δΔΨ
172      */
173     public double getDdPsi() {
174         return ddPsi;
175     }
176 
177     /** Get the correction for nutation in obliquity δΔε.
178      * @return correction for nutation in obliquity δΔε
179      */
180     public double getDdEps() {
181         return ddEps;
182     }
183 
184     /** Get the correction for Celestial Intermediate Pole (CIP) coordinates.
185      * @return correction for Celestial Intermediate Pole (CIP) coordinates
186      */
187     public double getDx() {
188         return dx;
189     }
190 
191     /** Get the correction for Celestial Intermediate Pole (CIP) coordinates.
192      * @return correction for Celestial Intermediate Pole (CIP) coordinates
193      */
194     public double getDy() {
195         return dy;
196     }
197 
198     /** Get the ITRF version this entry defines.
199      * @return ITRF version this entry defines
200      * @since 9.2
201      */
202     public ITRFVersion getITRFType() {
203         return itrfType;
204     }
205 
206 }