1 /* Copyright 2002-2026 CS GROUP
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 package org.orekit.files.ccsds.ndm.cdm;
18
19 import java.util.Optional;
20
21 import org.orekit.annotation.Nullable;
22 import org.orekit.errors.OrekitException;
23 import org.orekit.errors.OrekitMessages;
24 import org.orekit.files.ccsds.definitions.CcsdsFrameMapper;
25 import org.orekit.files.ccsds.ndm.CommonPhysicalProperties;
26 import org.orekit.frames.Frame;
27
28 /**
29 * Container for additional parameters data block.
30 * @author Melina Vanel
31 * @since 11.2
32 */
33 public class AdditionalParameters extends CommonPhysicalProperties {
34
35 /** The actual area of the object. */
36 @Nullable
37 private Double areaPC;
38
39 /** The minimum area of the object to be used to compute the collision probability. */
40 @Nullable
41 private Double areaPCMin;
42
43 /** The maximum area of the object to be used to compute the collision probability. */
44 @Nullable
45 private Double areaPCMax;
46
47 /** The effective area of the object exposed to atmospheric drag. */
48 @Nullable
49 private Double areaDRG;
50
51 /** The effective area of the object exposed to solar radiation pressure. */
52 @Nullable
53 private Double areaSRP;
54
55 /** The object hard body radius. */
56 @Nullable
57 private Double hbr;
58
59 /** The mass of the object. */
60 @Nullable
61 private Double mass;
62
63 /** The object’s Cd x A/m used to propagate the state vector and covariance to TCA. */
64 @Nullable
65 private Double cdAreaOverMass;
66
67 /** The object’s Cr x A/m used to propagate the state vector and covariance to TCA. */
68 @Nullable
69 private Double crAreaOverMass;
70
71 /** The object’s acceleration due to in-track thrust used to propagate the state vector and covariance to TCA. */
72 @Nullable
73 private Double thrustAcceleration;
74
75 /** The amount of energy being removed from the object’s orbit by atmospheric drag. This value is an average calculated during the OD. */
76 @Nullable
77 private Double sedr;
78
79 /** The distance of the furthest point in the objects orbit above the equatorial radius of the central body. */
80 @Nullable
81 private Double apoapsisAltitude;
82
83 /** The distance of the closest point in the objects orbit above the equatorial radius of the central body . */
84 @Nullable
85 private Double periapsisAltitude;
86
87 /** The angle between the objects orbit plane and the orbit centers equatorial plane. */
88 @Nullable
89 private Double inclination;
90
91 /** A measure of the confidence in the covariance errors matching reality. */
92 @Nullable
93 private Double covConfidence;
94
95 /** The method used for the calculation of COV_CONFIDENCE. */
96 @Nullable
97 private String covConfidenceMethod;
98
99 /**
100 * Simple constructor.
101 *
102 * @param frameMapper for creating an Orekit {@link Frame}.
103 * @since 13.1.5
104 */
105 public AdditionalParameters(final CcsdsFrameMapper frameMapper) {
106 // Call to CommonPhysicalProperties constructor
107 super(null, frameMapper);
108 }
109
110 /**
111 * Get the actual area of the object.
112 * @return the object area (in m²)
113 */
114 public Optional<Double> getAreaPC() {
115 return Optional.ofNullable(areaPC);
116 }
117
118 /**
119 * Set the actual area of the object.
120 * @param areaPC area (in m²) value to be set
121 */
122 public void setAreaPC(final double areaPC) {
123 refuseFurtherComments();
124 this.areaPC = areaPC;
125 }
126
127 /**
128 * Get the effective area of the object exposed to atmospheric drag.
129 * @return the object area (in m²) exposed to atmospheric drag
130 */
131 public Optional<Double> getAreaDRG() {
132 return Optional.ofNullable(areaDRG);
133 }
134
135 /**
136 * Set the effective area of the object exposed to atmospheric drag.
137 * @param areaDRG area (in m²) value to be set
138 */
139 public void setAreaDRG(final double areaDRG) {
140 refuseFurtherComments();
141 this.areaDRG = areaDRG;
142 }
143
144 /**
145 * Get the effective area of the object exposed to solar radiation pressure.
146 * @return the object area (in m²) exposed to solar radiation pressure
147 */
148 public Optional<Double> getAreaSRP() {
149 return Optional.ofNullable(areaSRP);
150 }
151
152 /**
153 * Set the effective area of the object exposed to solar radiation pressure.
154 * @param areaSRP area (in m²) to be set
155 */
156 public void setAreaSRP(final double areaSRP) {
157 refuseFurtherComments();
158 this.areaSRP = areaSRP;
159 }
160
161 /**
162 * Get the mass of the object.
163 * @return the mass (in kg) of the object
164 */
165 public Optional<Double> getMass() {
166 return Optional.ofNullable(mass);
167 }
168
169 /**
170 * Set the mass of the object.
171 * @param mass mass (in kg) of the object to be set
172 */
173 public void setMass(final double mass) {
174 refuseFurtherComments();
175 this.mass = mass;
176 }
177
178 /**
179 * Get the object’s Cd x A/m used to propagate the state vector and covariance to TCA.
180 * @return the object’s Cd x A/m (in m²/kg)
181 */
182 public Optional<Double> getCDAreaOverMass() {
183 return Optional.ofNullable(cdAreaOverMass);
184 }
185
186 /**
187 * Set the object’s Cd x A/m used to propagate the state vector and covariance to TCA.
188 * @param CDAreaOverMass object’s Cd x A/m (in m²/kg) value to be set
189 */
190 public void setCDAreaOverMass(final double CDAreaOverMass) {
191 refuseFurtherComments();
192 this.cdAreaOverMass = CDAreaOverMass;
193 }
194
195 /**
196 * Get the object’s Cr x A/m used to propagate the state vector and covariance to TCA.
197 * @return the object’s Cr x A/m (in m²/kg)
198 */
199 public Optional<Double> getCRAreaOverMass() {
200 return Optional.ofNullable(crAreaOverMass);
201 }
202
203 /**
204 * Set the object’s Cr x A/m used to propagate the state vector and covariance to TCA.
205 * @param CRAreaOverMass object’s Cr x A/m (in m²/kg) value to be set
206 */
207 public void setCRAreaOverMass(final double CRAreaOverMass) {
208 refuseFurtherComments();
209 this.crAreaOverMass = CRAreaOverMass;
210 }
211
212 /**
213 * Get the object’s acceleration due to in-track thrust used to propagate the state vector and covariance to TCA.
214 * @return the object’s acceleration (in m/s²) due to in-track thrust
215 */
216 public Optional<Double> getThrustAcceleration() {
217 return Optional.ofNullable(thrustAcceleration);
218 }
219
220 /**
221 * Set the object’s acceleration due to in-track thrust used to propagate the state vector and covariance to TCA.
222 * @param thrustAcceleration object’s acceleration (in m/s²) due to in-track thrust
223 */
224 public void setThrustAcceleration(final double thrustAcceleration) {
225 refuseFurtherComments();
226 this.thrustAcceleration = thrustAcceleration;
227 }
228
229 /**
230 * Get the amount of energy being removed from the object’s orbit by atmospheric drag. This value is an average
231 * calculated during the OD. SEDR = Specific Energy Dissipation Rate.
232 * @return the amount of energy (in W/kg) being removed from the object’s orbit by atmospheric drag
233 */
234 public Optional<Double> getSedr() {
235 return Optional.ofNullable(sedr);
236 }
237
238 /**
239 * Set the amount of energy being removed from the object’s orbit by atmospheric drag. This value is an average
240 * calculated during the OD. SEDR = Specific Energy Dissipation Rate.
241 * @param SEDR amount of energy (in W/kg) being removed from the object’s orbit by atmospheric drag
242 */
243 public void setSedr(final double SEDR) {
244 refuseFurtherComments();
245 this.sedr = SEDR;
246 }
247
248 /** Set the minimum area of the object to be used to compute the collision probability.
249 * @return the areaPCMin
250 */
251 public Optional<Double> getAreaPCMin() {
252 return Optional.ofNullable(areaPCMin);
253 }
254
255 /** Get the minimum area of the object to be used to compute the collision probability.
256 * @param areaPCMin the areaPCMin to set
257 */
258 public void setAreaPCMin(final double areaPCMin) {
259 this.areaPCMin = areaPCMin;
260 }
261
262 /** Get the maximum area of the object to be used to compute the collision probability.
263 * @return the areaPCMax
264 */
265 public Optional<Double> getAreaPCMax() {
266 return Optional.ofNullable(areaPCMax);
267 }
268
269 /** Set the maximum area for the object to be used to compute the collision probability.
270 * @param areaPCMax the areaPCMax to set
271 */
272 public void setAreaPCMax(final double areaPCMax) {
273 this.areaPCMax = areaPCMax;
274 }
275
276 /** Get the object hard body radius.
277 * @return the object hard body radius.
278 */
279 public Optional<Double> getHbr() {
280 return Optional.ofNullable(hbr);
281 }
282
283 /** Set the object hard body radius.
284 * @param hbr the object hard body radius.
285 */
286 public void setHbr(final double hbr) {
287 refuseFurtherComments();
288 this.hbr = hbr;
289 }
290
291 /** Get the distance of the furthest point in the objects orbit above the equatorial radius of the central body.
292 * @return the apoapsisAltitude
293 */
294 public Optional<Double> getApoapsisAltitude() {
295 return Optional.ofNullable(apoapsisAltitude);
296 }
297
298 /** Set the distance of the furthest point in the objects orbit above the equatorial radius of the central body.
299 * @param apoapsisAltitude the apoapsisHeight to set
300 */
301 public void setApoapsisAltitude(final double apoapsisAltitude) {
302 refuseFurtherComments();
303 this.apoapsisAltitude = apoapsisAltitude;
304 }
305
306 /** Get the distance of the closest point in the objects orbit above the equatorial radius of the central body.
307 * @return the periapsissAltitude
308 */
309 public Optional<Double> getPeriapsisAltitude() {
310 return Optional.ofNullable(periapsisAltitude);
311 }
312
313 /** Set the distance of the closest point in the objects orbit above the equatorial radius of the central body.
314 * @param periapsisAltitude the periapsissHeight to set
315 */
316 public void setPeriapsisAltitude(final double periapsisAltitude) {
317 refuseFurtherComments();
318 this.periapsisAltitude = periapsisAltitude;
319 }
320
321 /** Get the angle between the objects orbit plane and the orbit centers equatorial plane.
322 * @return the inclination
323 */
324 public Optional<Double> getInclination() {
325 return Optional.ofNullable(inclination);
326 }
327
328 /** Set the angle between the objects orbit plane and the orbit centers equatorial plane.
329 * @param inclination the inclination to set
330 */
331 public void setInclination(final double inclination) {
332 refuseFurtherComments();
333 this.inclination = inclination;
334 }
335
336 /** Get the measure of the confidence in the covariance errors matching reality.
337 * @return the covConfidence
338 */
339 public Optional<Double> getCovConfidence() {
340 return Optional.ofNullable(covConfidence);
341 }
342
343 /** Set the measure of the confidence in the covariance errors matching reality.
344 * @param covConfidence the covConfidence to set
345 */
346 public void setCovConfidence(final double covConfidence) {
347 refuseFurtherComments();
348 this.covConfidence = covConfidence;
349 }
350
351 /** Get the method used for the calculation of COV_CONFIDENCE.
352 * @return the covConfidenceMethod
353 */
354 public Optional<String> getCovConfidenceMethod() {
355 return Optional.ofNullable(covConfidenceMethod);
356 }
357
358 /** Set the method used for the calculation of COV_CONFIDENCE.
359 * @param covConfidenceMethod the covConfidenceMethod to set
360 */
361 public void setCovConfidenceMethod(final String covConfidenceMethod) {
362 refuseFurtherComments();
363
364 // Check key condition
365 getCovConfidence().
366 orElseThrow(() -> new OrekitException(OrekitMessages.CCSDS_MISSING_KEYWORD,
367 AdditionalParametersKey.COV_CONFIDENCE));
368
369 this.covConfidenceMethod = covConfidenceMethod;
370 }
371 }