1 /* Copyright 2002-2024 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
18 package org.orekit.files.ccsds.ndm.odm.ocm;
19
20 import java.util.ArrayList;
21 import java.util.List;
22
23 import org.hipparchus.linear.MatrixUtils;
24 import org.hipparchus.linear.RealMatrix;
25 import org.orekit.files.ccsds.ndm.CommonPhysicalProperties;
26 import org.orekit.time.AbsoluteDate;
27 import org.orekit.utils.Constants;
28
29 /** Spacecraft physical properties.
30 * @author Luc Maisonobe
31 * @since 11.0
32 */
33 public class OrbitPhysicalProperties extends CommonPhysicalProperties {
34
35 /** Satellite manufacturer name. */
36 private String manufacturer;
37
38 /** Bus model name. */
39 private String busModel;
40
41 /** Other space objects this object is docked to. */
42 private List<String> dockedWith;
43
44 /** Attitude-independent drag cross-sectional area, not already into attitude-dependent area along OEB. */
45 private double dragConstantArea;
46
47 /** Nominal drag coefficient. */
48 private double dragCoefficient;
49
50 /** Drag coefficient 1σ uncertainty. */
51 private double dragUncertainty;
52
53 /** Total mass at beginning of life. */
54 private double initialWetMass;
55
56 /** Total mass at T₀. */
57 private double wetMass;
58
59 /** Mass without propellant. */
60 private double dryMass;
61
62 /** Minimum cross-sectional area for collision probability estimation purposes. */
63 private double minAreaForCollisionProbability;
64
65 /** Maximum cross-sectional area for collision probability estimation purposes. */
66 private double maxAreaForCollisionProbability;
67
68 /** Typical (50th percentile) cross-sectional area for collision probability estimation purposes. */
69 private double typAreaForCollisionProbability;
70
71 /** Attitude-independent SRP area, not already into attitude-dependent area along OEB. */
72 private double srpConstantArea;
73
74 /** Nominal SRP coefficient. */
75 private double srpCoefficient;
76
77 /** SRP coefficient 1σ uncertainty. */
78 private double srpUncertainty;
79
80 /** Attitude control mode. */
81 private String attitudeControlMode;
82
83 /** Type of actuator for attitude control. */
84 private String attitudeActuatorType;
85
86 /** Accuracy of attitude knowledge. */
87 private double attitudeKnowledgeAccuracy;
88
89 /** Accuracy of attitude control. */
90 private double attitudeControlAccuracy;
91
92 /** Overall accuracy of spacecraft to maintain attitude. */
93 private double attitudePointingAccuracy;
94
95 /** Average average frequency of orbit or attitude maneuvers (in SI units, hence per second). */
96 private double maneuversFrequency;
97
98 /** Maximum composite thrust the spacecraft can accomplish. */
99 private double maxThrust;
100
101 /** Total ΔV capability at beginning of life. */
102 private double bolDv;
103
104 /** Total ΔV remaining for spacecraft. */
105 private double remainingDv;
106
107 /** Inertia matrix. */
108 private RealMatrix inertiaMatrix;
109
110 /** Simple constructor.
111 * @param epochT0 T0 epoch from file metadata
112 */
113 public OrbitPhysicalProperties(final AbsoluteDate epochT0) {
114
115 // Call to CommonPhysicalProperties constructor
116 super();
117
118 // we don't call the setXxx() methods in order to avoid
119 // calling refuseFurtherComments as a side effect
120 dockedWith = new ArrayList<>();
121 dragConstantArea = Double.NaN;
122 dragCoefficient = Double.NaN;
123 dragUncertainty = 0.0;
124 initialWetMass = Double.NaN;
125 wetMass = Double.NaN;
126 dryMass = Double.NaN;
127 minAreaForCollisionProbability = Double.NaN;
128 maxAreaForCollisionProbability = Double.NaN;
129 typAreaForCollisionProbability = Double.NaN;
130 attitudeKnowledgeAccuracy = Double.NaN;
131 attitudeControlAccuracy = Double.NaN;
132 attitudePointingAccuracy = Double.NaN;
133 maneuversFrequency = Double.NaN;
134 maxThrust = Double.NaN;
135 bolDv = Double.NaN;
136 remainingDv = Double.NaN;
137 inertiaMatrix = MatrixUtils.createRealMatrix(3, 3);
138 }
139
140 /** Get manufacturer name.
141 * @return manufacturer name
142 */
143 public String getManufacturer() {
144 return manufacturer;
145 }
146
147 /** Set manufacturer name.
148 * @param manufacturer manufacturer name
149 */
150 public void setManufacturer(final String manufacturer) {
151 refuseFurtherComments();
152 this.manufacturer = manufacturer;
153 }
154
155 /** Get the bus model name.
156 * @return bus model name
157 */
158 public String getBusModel() {
159 return busModel;
160 }
161
162 /** Set the bus model name.
163 * @param busModel bus model name
164 */
165 public void setBusModel(final String busModel) {
166 refuseFurtherComments();
167 this.busModel = busModel;
168 }
169
170 /** Get the other space objects this object is docked to.
171 * @return the oother space objects this object is docked to
172 */
173 public List<String> getDockedWith() {
174 return dockedWith;
175 }
176
177 /** Set the other space objects this object is docked to.
178 * @param dockedWith the other space objects this object is docked to
179 */
180 public void setDockedWith(final List<String> dockedWith) {
181 refuseFurtherComments();
182 this.dockedWith = dockedWith;
183 }
184
185 /** Get the attitude-independent drag cross-sectional area, not already into attitude-dependent area along OEB.
186 * @return attitude-independent drag cross-sectional area, not already into attitude-dependent area along OEB
187 */
188 public double getDragConstantArea() {
189 return dragConstantArea;
190 }
191
192 /** Set the attitude-independent drag cross-sectional area, not already into attitude-dependent area along OEB.
193 * @param dragConstantArea attitude-independent drag cross-sectional area, not already into attitude-dependent area along OEB
194 */
195 public void setDragConstantArea(final double dragConstantArea) {
196 refuseFurtherComments();
197 this.dragConstantArea = dragConstantArea;
198 }
199
200 /** Get the nominal drag coefficient.
201 * @return the nominal drag coefficient
202 */
203 public double getDragCoefficient() {
204 return dragCoefficient;
205 }
206
207 /** Set the the nominal drag coefficient.
208 * @param dragCoefficient the nominal drag coefficient
209 */
210 public void setDragCoefficient(final double dragCoefficient) {
211 refuseFurtherComments();
212 this.dragCoefficient = dragCoefficient;
213 }
214
215 /** Get the drag coefficient 1σ uncertainty.
216 * @return drag coefficient 1σ uncertainty (in %)
217 */
218 public double getDragUncertainty() {
219 return dragUncertainty;
220 }
221
222 /** Set the drag coefficient 1σ uncertainty.
223 * @param dragUncertainty drag coefficient 1σ uncertainty (in %)
224 */
225 public void setDragUncertainty(final double dragUncertainty) {
226 refuseFurtherComments();
227 this.dragUncertainty = dragUncertainty;
228 }
229
230 /** Get the total mass at beginning of life.
231 * @return total mass at beginning of life
232 */
233 public double getInitialWetMass() {
234 return initialWetMass;
235 }
236
237 /** Set the total mass at beginning of life.
238 * @param initialWetMass total mass at beginning of life
239 */
240 public void setInitialWetMass(final double initialWetMass) {
241 refuseFurtherComments();
242 this.initialWetMass = initialWetMass;
243 }
244
245 /** Get the total mass at T₀.
246 * @return total mass at T₀
247 */
248 public double getWetMass() {
249 return wetMass;
250 }
251
252 /** Set the total mass at T₀.
253 * @param wetMass total mass at T₀
254 */
255 public void setWetMass(final double wetMass) {
256 refuseFurtherComments();
257 this.wetMass = wetMass;
258 }
259
260 /** Get the mass without propellant.
261 * @return mass without propellant
262 */
263 public double getDryMass() {
264 return dryMass;
265 }
266
267 /** Set the mass without propellant.
268 * @param dryMass mass without propellant
269 */
270 public void setDryMass(final double dryMass) {
271 refuseFurtherComments();
272 this.dryMass = dryMass;
273 }
274
275 /** Get the minimum cross-sectional area for collision probability estimation purposes.
276 * @return minimum cross-sectional area for collision probability estimation purposes
277 */
278 public double getMinAreaForCollisionProbability() {
279 return minAreaForCollisionProbability;
280 }
281
282 /** Set the minimum cross-sectional area for collision probability estimation purposes.
283 * @param minAreaForCollisionProbability minimum cross-sectional area for collision probability estimation purposes
284 */
285 public void setMinAreaForCollisionProbability(final double minAreaForCollisionProbability) {
286 refuseFurtherComments();
287 this.minAreaForCollisionProbability = minAreaForCollisionProbability;
288 }
289
290 /** Get the maximum cross-sectional area for collision probability estimation purposes.
291 * @return maximum cross-sectional area for collision probability estimation purposes
292 */
293 public double getMaxAreaForCollisionProbability() {
294 return maxAreaForCollisionProbability;
295 }
296
297 /** Set the maximum cross-sectional area for collision probability estimation purposes.
298 * @param maxAreaForCollisionProbability maximum cross-sectional area for collision probability estimation purposes
299 */
300 public void setMaxAreaForCollisionProbability(final double maxAreaForCollisionProbability) {
301 refuseFurtherComments();
302 this.maxAreaForCollisionProbability = maxAreaForCollisionProbability;
303 }
304
305 /** Get the typical (50th percentile) cross-sectional area for collision probability estimation purposes.
306 * @return typical (50th percentile) cross-sectional area for collision probability estimation purposes
307 */
308 public double getTypAreaForCollisionProbability() {
309 return typAreaForCollisionProbability;
310 }
311
312 /** Get the typical (50th percentile) cross-sectional area for collision probability estimation purposes.
313 * @param typAreaForCollisionProbability typical (50th percentile) cross-sectional area for collision probability estimation purposes
314 */
315 public void setTypAreaForCollisionProbability(final double typAreaForCollisionProbability) {
316 refuseFurtherComments();
317 this.typAreaForCollisionProbability = typAreaForCollisionProbability;
318 }
319
320 /** Get the attitude-independent SRP area, not already into attitude-dependent area along OEB.
321 * @return attitude-independent SRP area, not already into attitude-dependent area along OEB
322 */
323 public double getSrpConstantArea() {
324 return srpConstantArea;
325 }
326
327 /** Set the attitude-independent SRP area, not already into attitude-dependent area along OEB.
328 * @param srpConstantArea attitude-independent SRP area, not already into attitude-dependent area along OEB
329 */
330 public void setSrpConstantArea(final double srpConstantArea) {
331 refuseFurtherComments();
332 this.srpConstantArea = srpConstantArea;
333 }
334
335 /** Get the nominal SRP coefficient.
336 * @return nominal SRP coefficient
337 */
338 public double getSrpCoefficient() {
339 return srpCoefficient;
340 }
341
342 /** Set the nominal SRP coefficient.
343 * @param srpCoefficient nominal SRP coefficient
344 */
345 public void setSrpCoefficient(final double srpCoefficient) {
346 refuseFurtherComments();
347 this.srpCoefficient = srpCoefficient;
348 }
349
350 /** Get the SRP coefficient 1σ uncertainty.
351 * @return SRP coefficient 1σ uncertainty
352 */
353 public double getSrpUncertainty() {
354 return srpUncertainty;
355 }
356
357 /** Set the SRP coefficient 1σ uncertainty.
358 * @param srpUncertainty SRP coefficient 1σ uncertainty.
359 */
360 public void setSrpUncertainty(final double srpUncertainty) {
361 refuseFurtherComments();
362 this.srpUncertainty = srpUncertainty;
363 }
364
365 /** Get the attitude control mode.
366 * @return attitude control mode
367 */
368 public String getAttitudeControlMode() {
369 return attitudeControlMode;
370 }
371
372 /** Set the attitude control mode.
373 * @param attitudeControlMode attitude control mode
374 */
375 public void setAttitudeControlMode(final String attitudeControlMode) {
376 refuseFurtherComments();
377 this.attitudeControlMode = attitudeControlMode;
378 }
379
380 /** Get the type of actuator for attitude control.
381 * @return type of actuator for attitude control
382 */
383 public String getAttitudeActuatorType() {
384 return attitudeActuatorType;
385 }
386
387 /** Set the type of actuator for attitude control.
388 * @param attitudeActuatorType type of actuator for attitude control
389 */
390 public void setAttitudeActuatorType(final String attitudeActuatorType) {
391 refuseFurtherComments();
392 this.attitudeActuatorType = attitudeActuatorType;
393 }
394
395 /** Get the accuracy of attitude knowledge.
396 * @return accuracy of attitude knowledge
397 */
398 public double getAttitudeKnowledgeAccuracy() {
399 return attitudeKnowledgeAccuracy;
400 }
401
402 /** Set the accuracy of attitude knowledge.
403 * @param attitudeKnowledgeAccuracy accuracy of attitude knowledge
404 */
405 public void setAttitudeKnowledgeAccuracy(final double attitudeKnowledgeAccuracy) {
406 refuseFurtherComments();
407 this.attitudeKnowledgeAccuracy = attitudeKnowledgeAccuracy;
408 }
409
410 /** Get the accuracy of attitude control.
411 * @return accuracy of attitude control
412 */
413 public double getAttitudeControlAccuracy() {
414 return attitudeControlAccuracy;
415 }
416
417 /** Set the accuracy of attitude control.
418 * @param attitudeControlAccuracy accuracy of attitude control
419 */
420 public void setAttitudeControlAccuracy(final double attitudeControlAccuracy) {
421 refuseFurtherComments();
422 this.attitudeControlAccuracy = attitudeControlAccuracy;
423 }
424
425 /** Get the overall accuracy of spacecraft to maintain attitude.
426 * @return overall accuracy of spacecraft to maintain attitude
427 */
428 public double getAttitudePointingAccuracy() {
429 return attitudePointingAccuracy;
430 }
431
432 /** Set the overall accuracy of spacecraft to maintain attitude.
433 * @param attitudePointingAccuracy overall accuracy of spacecraft to maintain attitude
434 */
435 public void setAttitudePointingAccuracy(final double attitudePointingAccuracy) {
436 refuseFurtherComments();
437 this.attitudePointingAccuracy = attitudePointingAccuracy;
438 }
439
440 /** Get the average number of orbit or attitude maneuvers per year.
441 * @return average number of orbit or attitude maneuvers per year.
442 */
443 public double getManeuversPerYear() {
444 return maneuversFrequency * Constants.JULIAN_YEAR;
445 }
446
447 /** Get the average frequency of orbit or attitude maneuvers (in SI units, hence per second).
448 * @return average frequency of orbit or attitude maneuvers (in SI units, hence per second).
449 */
450 public double getManeuversFrequency() {
451 return maneuversFrequency;
452 }
453
454 /** Set the average frequency of orbit or attitude maneuvers (in SI units, hence per second).
455 * @param maneuversFrequency average frequency of orbit or attitude (in SI units, hence per second).
456 */
457 public void setManeuversFrequency(final double maneuversFrequency) {
458 refuseFurtherComments();
459 this.maneuversFrequency = maneuversFrequency;
460 }
461
462 /** Get the maximum composite thrust the spacecraft can accomplish.
463 * @return maximum composite thrust the spacecraft can accomplish
464 */
465 public double getMaxThrust() {
466 return maxThrust;
467 }
468
469 /** Set the maximum composite thrust the spacecraft can accomplish.
470 * @param maxThrust maximum composite thrust the spacecraft can accomplish
471 */
472 public void setMaxThrust(final double maxThrust) {
473 refuseFurtherComments();
474 this.maxThrust = maxThrust;
475 }
476
477 /** Get the total ΔV capability at beginning of life.
478 * @return total ΔV capability at beginning of life
479 */
480 public double getBolDv() {
481 return bolDv;
482 }
483
484 /** Set the total ΔV capability at beginning of life.
485 * @param bolDv total ΔV capability at beginning of life
486 */
487 public void setBolDv(final double bolDv) {
488 refuseFurtherComments();
489 this.bolDv = bolDv;
490 }
491
492 /** Get the total ΔV remaining for spacecraft.
493 * @return total ΔV remaining for spacecraft
494 */
495 public double getRemainingDv() {
496 return remainingDv;
497 }
498
499 /** Set the total ΔV remaining for spacecraft.
500 * @param remainingDv total ΔV remaining for spacecraft
501 */
502 public void setRemainingDv(final double remainingDv) {
503 refuseFurtherComments();
504 this.remainingDv = remainingDv;
505 }
506
507 /** Get the inertia matrix.
508 * @return the inertia matrix
509 */
510 public RealMatrix getInertiaMatrix() {
511 return inertiaMatrix;
512 }
513
514 /** Set an entry in the inertia matrix.
515 * <p>
516 * Both I(j, k) and I(k, j) are set.
517 * </p>
518 * @param j row index (must be between 0 and 3 (inclusive)
519 * @param k column index (must be between 0 and 3 (inclusive)
520 * @param entry value of the matrix entry
521 */
522 public void setInertiaMatrixEntry(final int j, final int k, final double entry) {
523 refuseFurtherComments();
524 inertiaMatrix.setEntry(j, k, entry);
525 inertiaMatrix.setEntry(k, j, entry);
526 }
527
528 }