1 /* Copyright 2022-2025 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 org.orekit.files.ccsds.definitions.FrameFacade;
21 import org.orekit.files.ccsds.section.CommentsContainer;
22
23 /** Metadata for covariance history.
24 * <p>
25 * Beware that the Orekit getters and setters all rely on SI units. The parsers
26 * and writers take care of converting these SI units into CCSDS mandatory units.
27 * The {@link org.orekit.utils.units.Unit Unit} class provides useful
28 * {@link org.orekit.utils.units.Unit#fromSI(double) fromSi} and
29 * {@link org.orekit.utils.units.Unit#toSI(double) toSI} methods in case the callers
30 * already use CCSDS units instead of the API SI units. The general-purpose
31 * {@link org.orekit.utils.units.Unit Unit} class (without an 's') and the
32 * CCSDS-specific {@link org.orekit.files.ccsds.definitions.Units Units} class
33 * (with an 's') also provide some predefined units. These predefined units and the
34 * {@link org.orekit.utils.units.Unit#fromSI(double) fromSi} and
35 * {@link org.orekit.utils.units.Unit#toSI(double) toSI} conversion methods are indeed
36 * what the parsers and writers use for the conversions.
37 * </p>
38 * @author Luc Maisonobe
39 * @since 12.0
40 */
41 public class AttitudeCovarianceHistoryMetadata extends CommentsContainer {
42
43 /** Covariance identification number. */
44 private String covID;
45
46 /** Identification number of previous covariance. */
47 private String covPrevID;
48
49 /** Basis of this covariance time history data. */
50 private String covBasis;
51
52 /** Identification number of the covariance determination or simulation upon which this covariance is based. */
53 private String covBasisID;
54
55 /** Reference frame of the covariance. */
56 private FrameFacade covReferenceFrame;
57
58 /** Covariance element set type. */
59 private AttitudeCovarianceType covType;
60
61 /** Empty constructor.
62 * <p>
63 * This constructor is not strictly necessary, but it prevents spurious
64 * javadoc warnings with JDK 18 and later.
65 * </p>
66 * @since 12.0
67 */
68 public AttitudeCovarianceHistoryMetadata() {
69 // nothing to do
70 }
71
72 /** {@inheritDoc} */
73 @Override
74 public void validate(final double version) {
75 super.validate(version);
76 checkNotNull(covType, AttitudeCovarianceHistoryMetadataKey.COV_TYPE.name());
77 }
78
79 /** Get covariance identification number.
80 * @return covariance identification number
81 */
82 public String getCovID() {
83 return covID;
84 }
85
86 /** Set covariance identification number.
87 * @param covID covariance identification number
88 */
89 public void setCovID(final String covID) {
90 refuseFurtherComments();
91 this.covID = covID;
92 }
93
94 /** Get identification number of previous covariance.
95 * @return identification number of previous covariance
96 */
97 public String getCovPrevID() {
98 return covPrevID;
99 }
100
101 /** Set identification number of previous covariance.
102 * @param covPrevID identification number of previous covariance
103 */
104 public void setCovPrevID(final String covPrevID) {
105 refuseFurtherComments();
106 this.covPrevID = covPrevID;
107 }
108
109 /** Get basis of this covariance time history data.
110 * @return basis of this covariance time history data
111 */
112 public String getCovBasis() {
113 return covBasis;
114 }
115
116 /** Set basis of this covariance time history data.
117 * @param covBasis basis of this covariance time history data
118 */
119 public void setCovBasis(final String covBasis) {
120 refuseFurtherComments();
121 this.covBasis = covBasis;
122 }
123
124 /** Get identification number of the orbit determination or simulation upon which this covariance is based.
125 * @return identification number of the orbit determination or simulation upon which this covariance is based
126 */
127 public String getCovBasisID() {
128 return covBasisID;
129 }
130
131 /** Set identification number of the orbit determination or simulation upon which this covariance is based.
132 * @param covBasisID identification number of the orbit determination or simulation upon which this covariance is based
133 */
134 public void setCovBasisID(final String covBasisID) {
135 refuseFurtherComments();
136 this.covBasisID = covBasisID;
137 }
138
139 /** Get reference frame of the covariance.
140 * @return reference frame of the covariance
141 */
142 public FrameFacade getCovReferenceFrame() {
143 return covReferenceFrame;
144 }
145
146 /** Set reference frame of the covariance.
147 * @param covReferenceFrame the reference frame to be set
148 */
149 public void setCovReferenceFrame(final FrameFacade covReferenceFrame) {
150 refuseFurtherComments();
151 this.covReferenceFrame = covReferenceFrame;
152 }
153
154 /** Get covariance element set type.
155 * @return covariance element set type
156 */
157 public AttitudeCovarianceType getCovType() {
158 return covType;
159 }
160
161 /** Set covariance element set type.
162 * @param covType covariance element set type
163 */
164 public void setCovType(final AttitudeCovarianceType covType) {
165 refuseFurtherComments();
166 this.covType = covType;
167 }
168
169 }