1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.orekit.files.ccsds;
18
19 import org.orekit.bodies.CelestialBodyFactory;
20 import org.orekit.errors.OrekitException;
21 import org.orekit.errors.OrekitMessages;
22 import org.orekit.frames.Frame;
23 import org.orekit.frames.FramesFactory;
24 import org.orekit.frames.ITRFVersion;
25 import org.orekit.frames.LOFType;
26 import org.orekit.utils.IERSConventions;
27
28
29
30
31
32 public enum CCSDSFrame {
33
34
35 EME2000(null) {
36
37
38 @Override
39 public Frame getFrame(final IERSConventions conventions, final boolean simpleEOP) {
40 return FramesFactory.getEME2000();
41 }
42
43 },
44
45
46 GCRF(null) {
47
48
49 @Override
50 public Frame getFrame(final IERSConventions conventions, final boolean simpleEOP) {
51 return FramesFactory.getGCRF();
52 }
53
54 },
55
56
57 GRC(null) {
58
59
60 @Override
61 public Frame getFrame(final IERSConventions conventions, final boolean simpleEOP) {
62 if (conventions == null) {
63 throw new OrekitException(OrekitMessages.CCSDS_UNKNOWN_CONVENTIONS);
64 }
65 return FramesFactory.getITRFEquinox(conventions, simpleEOP);
66 }
67
68 },
69
70
71 ICRF(null) {
72
73
74 @Override
75 public Frame getFrame(final IERSConventions conventions, final boolean simpleEOP) {
76 return FramesFactory.getICRF();
77 }
78
79 },
80
81
82 ITRF2014(null) {
83
84
85 @Override
86 public Frame getFrame(final IERSConventions conventions, final boolean simpleEOP) {
87 if (conventions == null) {
88 throw new OrekitException(OrekitMessages.CCSDS_UNKNOWN_CONVENTIONS);
89 }
90 return FramesFactory.getITRF(ITRFVersion.ITRF_2014, conventions, simpleEOP);
91 }
92
93 },
94
95
96 ITRF2008(null) {
97
98
99 @Override
100 public Frame getFrame(final IERSConventions conventions, final boolean simpleEOP) {
101 if (conventions == null) {
102 throw new OrekitException(OrekitMessages.CCSDS_UNKNOWN_CONVENTIONS);
103 }
104 return FramesFactory.getITRF(ITRFVersion.ITRF_2008, conventions, simpleEOP);
105 }
106
107 },
108
109
110 ITRF2005(null) {
111
112
113 @Override
114 public Frame getFrame(final IERSConventions conventions, final boolean simpleEOP) {
115 if (conventions == null) {
116 throw new OrekitException(OrekitMessages.CCSDS_UNKNOWN_CONVENTIONS);
117 }
118 return FramesFactory.getITRF(ITRFVersion.ITRF_2005, conventions, simpleEOP);
119 }
120
121 },
122
123
124 ITRF2000(null) {
125
126
127 @Override
128 public Frame getFrame(final IERSConventions conventions, final boolean simpleEOP) {
129 if (conventions == null) {
130 throw new OrekitException(OrekitMessages.CCSDS_UNKNOWN_CONVENTIONS);
131 }
132 return FramesFactory.getITRF(ITRFVersion.ITRF_2000, conventions, simpleEOP);
133 }
134
135 },
136
137
138 ITRF93(null) {
139
140
141 @Override
142 public Frame getFrame(final IERSConventions conventions, final boolean simpleEOP) {
143 if (conventions == null) {
144 throw new OrekitException(OrekitMessages.CCSDS_UNKNOWN_CONVENTIONS);
145 }
146 return FramesFactory.getITRF(ITRFVersion.ITRF_93, conventions, simpleEOP);
147 }
148
149 },
150
151
152 ITRF97(null) {
153
154
155 @Override
156 public Frame getFrame(final IERSConventions conventions, final boolean simpleEOP) {
157 if (conventions == null) {
158 throw new OrekitException(OrekitMessages.CCSDS_UNKNOWN_CONVENTIONS);
159 }
160 return FramesFactory.getITRF(ITRFVersion.ITRF_97, conventions, simpleEOP);
161 }
162
163 },
164
165
166 MCI(null) {
167
168
169 @Override
170 public Frame getFrame(final IERSConventions conventions, final boolean simpleEOP) {
171 return CelestialBodyFactory.getMars().getInertiallyOrientedFrame();
172 }
173
174 },
175
176
177 TDR(null) {
178
179
180 @Override
181 public Frame getFrame(final IERSConventions conventions, final boolean simpleEOP) {
182 if (conventions == null) {
183 throw new OrekitException(OrekitMessages.CCSDS_UNKNOWN_CONVENTIONS);
184 }
185 return FramesFactory.getGTOD(conventions, simpleEOP);
186 }
187
188 },
189
190
191
192
193
194
195 TEME(null) {
196
197
198 @Override
199 public Frame getFrame(final IERSConventions conventions, final boolean simpleEOP) {
200 return FramesFactory.getTEME();
201 }
202
203 },
204
205
206 TOD(null) {
207
208
209 @Override
210 public Frame getFrame(final IERSConventions conventions, final boolean simpleEOP) {
211 if (conventions == null) {
212 throw new OrekitException(OrekitMessages.CCSDS_UNKNOWN_CONVENTIONS);
213 }
214 return FramesFactory.getTOD(conventions, simpleEOP);
215 }
216
217 },
218
219
220 RTN(LOFType.QSW),
221
222
223 RSW(LOFType.QSW),
224
225
226
227 TNW(LOFType.TNW);
228
229
230 private final LOFType lofType;
231
232
233
234
235 CCSDSFrame(final LOFType lofType) {
236 this.lofType = lofType;
237 }
238
239
240
241
242 public boolean isLof() {
243 return lofType != null;
244 }
245
246
247
248
249
250
251
252
253
254
255 public LOFType getLofType() {
256 return lofType;
257 }
258
259
260
261
262
263
264
265
266 public Frame getFrame(final IERSConventions conventions, final boolean simpleEOP) {
267 throw new OrekitException(OrekitMessages.CCSDS_INVALID_FRAME, toString());
268 }
269
270 }