1 /* Copyright 2022-2026 Luc Maisonobe
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
18 package org.orekit.files.ccsds.ndm.adm.acm;
19
20 import java.util.List;
21
22 import org.orekit.files.ccsds.definitions.CcsdsFrameMapper;
23 import org.orekit.files.ccsds.ndm.adm.AdmMetadata;
24 import org.orekit.files.ccsds.ndm.adm.AdmMetadataKey;
25 import org.orekit.files.ccsds.section.MetadataKey;
26 import org.orekit.frames.Frame;
27 import org.orekit.time.AbsoluteDate;
28
29 /** Meta-data for {@link AcmMetadata Attitude Comprehensive Message}.
30 * @since 12.0
31 */
32 public class AcmMetadata extends AdmMetadata {
33
34 /** Specification of satellite catalog source. */
35 private String catalogName;
36
37 /** Unique satellite identification designator for the object. */
38 private String objectDesignator;
39
40 /** Programmatic Point Of Contact at originator. */
41 private String originatorPOC;
42
43 /** Position of Programmatic Point Of Contact at originator. */
44 private String originatorPosition;
45
46 /** Phone number of Programmatic Point Of Contact at originator. */
47 private String originatorPhone;
48
49 /** Email address of Programmatic Point Of Contact at originator. */
50 private String originatorEmail;
51
52 /** Address of Programmatic Point Of Contact at originator. */
53 private String originatorAddress;
54
55 /** Unique identifier of Orbit Data Message linked to this Orbit Data Message. */
56 private String odmMessageLink;
57
58 /** Epoch to which <em>all</em> relative times are referenced in data blocks;
59 * unless overridden by block-specific {@code EPOCH_TZERO} values. */
60 private AbsoluteDate epochT0;
61
62 /** List of elements of information data blocks included in this message. */
63 private List<AcmElements> acmDataElements;
64
65 /** Time of the earliest data contained in the OCM. */
66 private AbsoluteDate startTime;
67
68 /** Time of the latest data contained in the OCM. */
69 private AbsoluteDate stopTime;
70
71 /** Difference (TAI – UTC) in seconds at epoch {@link #epochT0}. */
72 private double taimutcT0;
73
74 /** Epoch of next leap second. */
75 private AbsoluteDate nextLeapEpoch;
76
77 /** Difference (TAI – UTC) in seconds incorporated at {@link #nextLeapEpoch}. */
78 private double nextLeapTaimutc;
79
80 /**
81 * Create a new meta-data.
82 *
83 * @param frameMapper for creating an Orekit {@link Frame}.
84 * @since 13.1.5
85 */
86 public AcmMetadata(final CcsdsFrameMapper frameMapper) {
87 super(frameMapper);
88
89 // set up the few fields that have default values as per CCSDS standard
90 taimutcT0 = Double.NaN;
91 nextLeapTaimutc = Double.NaN;
92
93 }
94
95 /** {@inheritDoc} */
96 @Override
97 public void validate(final double version) {
98 // we don't call super.checkMandatoryEntries() because
99 // all of the parameters considered mandatory at ADM level
100 // for APM and AEM are in fact optional in ACM
101 // only OBJECT_NAME, TIME_SYSTEM and EPOCH_TZERO are mandatory
102 checkNotNull(getObjectName(), AdmMetadataKey.OBJECT_NAME.name());
103 checkNotNull(getTimeSystem(), MetadataKey.TIME_SYSTEM.name());
104 checkNotNull(epochT0, AcmMetadataKey.EPOCH_TZERO.name());
105 if (nextLeapEpoch != null) {
106 checkNotNaN(nextLeapTaimutc, AcmMetadataKey.NEXT_LEAP_TAIMUTC.name());
107 }
108 }
109
110 /** Get the international designator for the object.
111 * @return international designator for the object
112 */
113 public String getInternationalDesignator() {
114 return getObjectID();
115 }
116
117 /** Set the international designator for the object.
118 * @param internationalDesignator international designator for the object
119 */
120 public void setInternationalDesignator(final String internationalDesignator) {
121 setObjectID(internationalDesignator);
122 }
123
124 /** Get the specification of satellite catalog source.
125 * @return specification of satellite catalog source
126 */
127 public String getCatalogName() {
128 return catalogName;
129 }
130
131 /** Set the specification of satellite catalog source.
132 * @param catalogName specification of satellite catalog source
133 */
134 public void setCatalogName(final String catalogName) {
135 refuseFurtherComments();
136 this.catalogName = catalogName;
137 }
138
139 /** Get the unique satellite identification designator for the object.
140 * @return unique satellite identification designator for the object.
141 */
142 public String getObjectDesignator() {
143 return objectDesignator;
144 }
145
146 /** Set the unique satellite identification designator for the object.
147 * @param objectDesignator unique satellite identification designator for the object
148 */
149 public void setObjectDesignator(final String objectDesignator) {
150 refuseFurtherComments();
151 this.objectDesignator = objectDesignator;
152 }
153
154 /** Get the programmatic Point Of Contact at originator.
155 * @return programmatic Point Of Contact at originator
156 */
157 public String getOriginatorPOC() {
158 return originatorPOC;
159 }
160
161 /** Set the programmatic Point Of Contact at originator.
162 * @param originatorPOC programmatic Point Of Contact at originator
163 */
164 public void setOriginatorPOC(final String originatorPOC) {
165 refuseFurtherComments();
166 this.originatorPOC = originatorPOC;
167 }
168
169 /** Get the position of Programmatic Point Of Contact at originator.
170 * @return position of Programmatic Point Of Contact at originator
171 */
172 public String getOriginatorPosition() {
173 return originatorPosition;
174 }
175
176 /** Set the position of Programmatic Point Of Contact at originator.
177 * @param originatorPosition position of Programmatic Point Of Contact at originator
178 */
179 public void setOriginatorPosition(final String originatorPosition) {
180 refuseFurtherComments();
181 this.originatorPosition = originatorPosition;
182 }
183
184 /** Get the phone number of Programmatic Point Of Contact at originator.
185 * @return phone number of Programmatic Point Of Contact at originator
186 */
187 public String getOriginatorPhone() {
188 return originatorPhone;
189 }
190
191 /** Set the phone number of Programmatic Point Of Contact at originator.
192 * @param originatorPhone phone number of Programmatic Point Of Contact at originator
193 */
194 public void setOriginatorPhone(final String originatorPhone) {
195 refuseFurtherComments();
196 this.originatorPhone = originatorPhone;
197 }
198
199 /** Get the email address of Programmatic Point Of Contact at originator.
200 * @return email address of Programmatic Point Of Contact at originator
201 */
202 public String getOriginatorEmail() {
203 return originatorEmail;
204 }
205
206 /** Set the email address of Programmatic Point Of Contact at originator.
207 * @param originatorEmail email address of Programmatic Point Of Contact at originator
208 */
209 public void setOriginatorEmail(final String originatorEmail) {
210 refuseFurtherComments();
211 this.originatorEmail = originatorEmail;
212 }
213
214 /** Get the address of Programmatic Point Of Contact at originator.
215 * @return address of Programmatic Point Of Contact at originator
216 */
217 public String getOriginatorAddress() {
218 return originatorAddress;
219 }
220
221 /** Set the address of Programmatic Point Of Contact at originator.
222 * @param originatorAddress address of Programmatic Point Of Contact at originator
223 */
224 public void setOriginatorAddress(final String originatorAddress) {
225 refuseFurtherComments();
226 this.originatorAddress = originatorAddress;
227 }
228
229 /** Get the Unique identifier of Orbit Data Message linked to this Attitude Data Message.
230 * @return Unique identifier of Orbit Data Message linked to this Attitude Data Message
231 */
232 public String getOdmMessageLink() {
233 return odmMessageLink;
234 }
235
236 /** Set the Unique identifier of Orbit Data Message linked to this Attitude Data Message.
237 * @param odmMessageLink Unique identifier of Orbit Data Message linked to this Attitude Data Message
238 */
239 public void setOdmMessageLink(final String odmMessageLink) {
240 refuseFurtherComments();
241 this.odmMessageLink = odmMessageLink;
242 }
243
244 /** Get the epoch to which <em>all</em> relative times are referenced in data blocks.
245 * @return epoch to which <em>all</em> relative times are referenced in data blocks
246 */
247 public AbsoluteDate getEpochT0() {
248 return epochT0;
249 }
250
251 /** Set the epoch to which <em>all</em> relative times are referenced in data blocks.
252 * @param epochT0 epoch to which <em>all</em> relative times are referenced in data blocks
253 */
254 public void setEpochT0(final AbsoluteDate epochT0) {
255 refuseFurtherComments();
256 this.epochT0 = epochT0;
257 }
258
259 /** Get the list of elements of information data blocks included in this message.
260 * @return list of elements of information data blocks included in this message
261 */
262 public List<AcmElements> getAcmDataElements() {
263 return acmDataElements;
264 }
265
266 /** Set the list of elements of information data blocks included in this message.
267 * @param acmDataElements list of elements of information data blocks included in this message
268 */
269 public void setAcmDataElements(final List<AcmElements> acmDataElements) {
270 refuseFurtherComments();
271 this.acmDataElements = acmDataElements;
272 }
273
274 /** Get the time of the earliest data contained in the OCM.
275 * @return time of the earliest data contained in the OCM
276 */
277 public AbsoluteDate getStartTime() {
278 return startTime;
279 }
280
281 /** Set the time of the earliest data contained in the OCM.
282 * @param startTime time of the earliest data contained in the OCM
283 */
284 public void setStartTime(final AbsoluteDate startTime) {
285 refuseFurtherComments();
286 this.startTime = startTime;
287 }
288
289 /** Get the time of the latest data contained in the OCM.
290 * @return time of the latest data contained in the OCM
291 */
292 public AbsoluteDate getStopTime() {
293 return stopTime;
294 }
295
296 /** Set the time of the latest data contained in the OCM.
297 * @param stopTime time of the latest data contained in the OCM
298 */
299 public void setStopTime(final AbsoluteDate stopTime) {
300 refuseFurtherComments();
301 this.stopTime = stopTime;
302 }
303
304 /** Get the difference (TAI – UTC) in seconds at epoch {@link #getEpochT0()}.
305 * @return difference (TAI – UTC) in seconds at epoch {@link #getEpochT0()}
306 */
307 public double getTaimutcT0() {
308 return taimutcT0;
309 }
310
311 /** Set the difference (TAI – UTC) in seconds at epoch {@link #getEpochT0()}.
312 * @param taimutcT0 difference (TAI – UTC) in seconds at epoch {@link #getEpochT0()}
313 */
314 public void setTaimutcT0(final double taimutcT0) {
315 refuseFurtherComments();
316 this.taimutcT0 = taimutcT0;
317 }
318
319 /** Get the epoch of next leap second.
320 * @return epoch of next leap second
321 */
322 public AbsoluteDate getNextLeapEpoch() {
323 return nextLeapEpoch;
324 }
325
326 /** Set the epoch of next leap second.
327 * @param nextLeapEpoch epoch of next leap second
328 */
329 public void setNextLeapEpoch(final AbsoluteDate nextLeapEpoch) {
330 refuseFurtherComments();
331 this.nextLeapEpoch = nextLeapEpoch;
332 }
333
334 /** Get the difference (TAI – UTC) in seconds incorporated at epoch {@link #getNextLeapEpoch()}.
335 * @return difference (TAI – UTC) in seconds incorporated at epoch {@link #getNextLeapEpoch()}
336 */
337 public double getNextLeapTaimutc() {
338 return nextLeapTaimutc;
339 }
340
341 /** Set the difference (TAI – UTC) in seconds incorporated at epoch {@link #getNextLeapEpoch()}.
342 * @param nextLeapTaimutc difference (TAI – UTC) in seconds incorporated at epoch {@link #getNextLeapEpoch()}
343 */
344 public void setNextLeapTaimutc(final double nextLeapTaimutc) {
345 refuseFurtherComments();
346 this.nextLeapTaimutc = nextLeapTaimutc;
347 }
348
349 }