1 /* Copyright 2002-2022 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 = 20180330L;
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 /** Correction for nutation in longitude. */
51 private final double ddPsi;
52
53 /** Correction for nutation in obliquity. */
54 private final double ddEps;
55
56 /** Correction for nutation in Celestial Intermediate Pole (CIP) coordinates. */
57 private final double dx;
58
59 /** Correction for nutation in Celestial Intermediate Pole (CIP) coordinates. */
60 private final double dy;
61
62 /** ITRF version this entry defines. */
63 private final ITRFVersion itrfType;
64
65 /** Simple constructor.
66 * @param mjd entry date (modified Julian day, 00h00 UTC scale)
67 * @param dt UT1-UTC in seconds
68 * @param lod length of day
69 * @param x X component of pole motion
70 * @param y Y component of pole motion
71 * @param ddPsi correction for nutation in longitude δΔΨ
72 * @param ddEps correction for nutation in obliquity δΔε
73 * @param dx correction for Celestial Intermediate Pole (CIP) coordinates
74 * @param dy correction for Celestial Intermediate Pole (CIP) coordinates
75 * @param itrfType ITRF version this entry defines
76 * @param date corresponding to {@code mjd}.
77 * @since 10.1
78 */
79 public EOPEntry(final int mjd, final double dt, final double lod,
80 final double x, final double y,
81 final double ddPsi, final double ddEps,
82 final double dx, final double dy,
83 final ITRFVersion itrfType, final AbsoluteDate date) {
84
85 this.mjd = mjd;
86 this.date = date;
87 this.dt = dt;
88 this.lod = lod;
89 this.x = x;
90 this.y = y;
91 this.ddPsi = ddPsi;
92 this.ddEps = ddEps;
93 this.dx = dx;
94 this.dy = dy;
95 this.itrfType = itrfType;
96
97 }
98
99 /** Get the entry date (modified julian day, 00h00 UTC scale).
100 * @return entry date
101 * @see #getDate()
102 */
103 public int getMjd() {
104 return mjd;
105 }
106
107 /** {@inheritDoc} */
108 public AbsoluteDate getDate() {
109 return date;
110 }
111
112 /** Get the UT1-UTC value.
113 * @return UT1-UTC in seconds
114 */
115 public double getUT1MinusUTC() {
116 return dt;
117 }
118
119 /** Get the LoD (Length of Day) value.
120 * @return LoD in seconds
121 */
122 public double getLOD() {
123 return lod;
124 }
125
126 /** Get the X component of the pole motion.
127 * @return X component of pole motion
128 */
129 public double getX() {
130 return x;
131 }
132
133 /** Get the Y component of the pole motion.
134 * @return Y component of pole motion
135 */
136 public double getY() {
137 return y;
138 }
139
140 /** Get the correction for nutation in longitude δΔΨ.
141 * @return correction for nutation in longitude δΔΨ
142 */
143 public double getDdPsi() {
144 return ddPsi;
145 }
146
147 /** Get the correction for nutation in obliquity δΔε.
148 * @return correction for nutation in obliquity δΔε
149 */
150 public double getDdEps() {
151 return ddEps;
152 }
153
154 /** Get the correction for Celestial Intermediate Pole (CIP) coordinates.
155 * @return correction for Celestial Intermediate Pole (CIP) coordinates
156 */
157 public double getDx() {
158 return dx;
159 }
160
161 /** Get the correction for Celestial Intermediate Pole (CIP) coordinates.
162 * @return correction for Celestial Intermediate Pole (CIP) coordinates
163 */
164 public double getDy() {
165 return dy;
166 }
167
168 /** Get the ITRF version this entry defines.
169 * @return ITRF version this entry defines
170 * @since 9.2
171 */
172 public ITRFVersion getITRFType() {
173 return itrfType;
174 }
175
176 }