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