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