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
19 import java.io.Serializable;
20
21 import org.orekit.errors.OrekitException;
22 import org.orekit.time.AbsoluteDate;
23 import org.orekit.time.TimeScalesFactory;
24 import org.orekit.time.TimeStamped;
25
26 /** This class holds an Earth Orientation Parameters entry.
27 * @author Luc Maisonobe
28 */
29 public class EOPEntry implements TimeStamped, Serializable {
30
31 /** Serializable UID. */
32 private static final long serialVersionUID = 20130924L;
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 /** Correction for nutation in longitude. */
53 private final double ddPsi;
54
55 /** Correction for nutation in obliquity. */
56 private final double ddEps;
57
58 /** Correction for nutation in Celestial Intermediate Pole (CIP) coordinates. */
59 private final double dx;
60
61 /** Correction for nutation in Celestial Intermediate Pole (CIP) coordinates. */
62 private final double dy;
63
64 /** Simple constructor.
65 * @param mjd entry date (modified Julian day, 00h00 UTC scale)
66 * @param dt UT1-UTC in seconds
67 * @param lod length of day
68 * @param x X component of pole motion
69 * @param y Y component of pole motion
70 * @param ddPsi correction for nutation in longitude δΔΨ
71 * @param ddEps correction for nutation in obliquity δΔε
72 * @param dx correction for Celestial Intermediate Pole (CIP) coordinates
73 * @param dy correction for Celestial Intermediate Pole (CIP) coordinates
74 * @exception OrekitException if UTC time scale cannot be retrieved
75 */
76 public EOPEntry(final int mjd, final double dt, final double lod,
77 final double x, final double y,
78 final double ddPsi, final double ddEps,
79 final double dx, final double dy)
80 throws OrekitException {
81
82 this.mjd = mjd;
83 this.date = AbsoluteDate.createMJDDate(mjd, 0.0, TimeScalesFactory.getUTC());
84 this.dt = dt;
85 this.lod = lod;
86 this.x = x;
87 this.y = y;
88 this.ddPsi = ddPsi;
89 this.ddEps = ddEps;
90 this.dx = dx;
91 this.dy = dy;
92
93 }
94
95 /** Get the entry date (modified julian day, 00h00 UTC scale).
96 * @return entry date
97 * @see #getDate()
98 */
99 public int getMjd() {
100 return mjd;
101 }
102
103 /** {@inheritDoc} */
104 public AbsoluteDate getDate() {
105 return date;
106 }
107
108 /** Get the UT1-UTC value.
109 * @return UT1-UTC in seconds
110 */
111 public double getUT1MinusUTC() {
112 return dt;
113 }
114
115 /** Get the LoD (Length of Day) value.
116 * @return LoD in seconds
117 */
118 public double getLOD() {
119 return lod;
120 }
121
122 /** Get the X component of the pole motion.
123 * @return X component of pole motion
124 */
125 public double getX() {
126 return x;
127 }
128
129 /** Get the Y component of the pole motion.
130 * @return Y component of pole motion
131 */
132 public double getY() {
133 return y;
134 }
135
136 /** Get the correction for nutation in longitude δΔΨ.
137 * @return correction for nutation in longitude δΔΨ
138 */
139 public double getDdPsi() {
140 return ddPsi;
141 }
142
143 /** Get the correction for nutation in obliquity δΔε.
144 * @return correction for nutation in obliquity δΔε
145 */
146 public double getDdEps() {
147 return ddEps;
148 }
149
150 /** Get the correction for Celestial Intermediate Pole (CIP) coordinates.
151 * @return correction for Celestial Intermediate Pole (CIP) coordinates
152 */
153 public double getDx() {
154 return dx;
155 }
156
157 /** Get the correction for Celestial Intermediate Pole (CIP) coordinates.
158 * @return correction for Celestial Intermediate Pole (CIP) coordinates
159 */
160 public double getDy() {
161 return dy;
162 }
163
164 }