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 java.util.List;
21
22 import org.orekit.files.ccsds.ndm.odm.UserDefined;
23 import org.orekit.files.ccsds.section.Data;
24
25 /** Data container for Attitude Comprehensive Messages.
26 * @author Luc Maisonobe
27 * @since 12.0
28 */
29 public class AcmData implements Data {
30
31 /** Attitude state histories logical blocks. */
32 private final List<AttitudeStateHistory> attitudeBlocks;
33
34 /** Physical properties logical block. */
35 private final AttitudePhysicalProperties physicBlock;
36
37 /** Covariance logical blocks. */
38 private final List<AttitudeCovarianceHistory> covarianceBlocks;
39
40 /** Maneuvers logical blocks. */
41 private final List<AttitudeManeuver> maneuverBlocks;
42
43 /** Attitude determination logical block. */
44 private final AttitudeDetermination attitudeDeterminationBlock;
45
46 /** User defined parameters logical block. */
47 private final UserDefined userDefinedBlock;
48
49 /** Simple constructor.
50 * @param attitudeBlocks attitude state histories logical blocks (may be empty)
51 * @param physicBlock physical properties logical block (may be null)
52 * @param covarianceBlocks covariance logical blocks (may be empty)
53 * @param maneuverBlocks maneuvers logical blocks (may be empty)
54 * @param attitudeDeterminationBlock attitude determination logical block (may be null)
55 * @param userDefinedBlock user defined parameters logical block (may be null)
56 */
57 public AcmData(final List<AttitudeStateHistory> attitudeBlocks,
58 final AttitudePhysicalProperties physicBlock,
59 final List<AttitudeCovarianceHistory> covarianceBlocks,
60 final List<AttitudeManeuver> maneuverBlocks,
61 final AttitudeDetermination attitudeDeterminationBlock,
62 final UserDefined userDefinedBlock) {
63 this.attitudeBlocks = attitudeBlocks;
64 this.physicBlock = physicBlock;
65 this.covarianceBlocks = covarianceBlocks;
66 this.maneuverBlocks = maneuverBlocks;
67 this.attitudeDeterminationBlock = attitudeDeterminationBlock;
68 this.userDefinedBlock = userDefinedBlock;
69 }
70
71 /** {@inheritDoc} */
72 @Override
73 public void validate(final double version) {
74 if (attitudeBlocks != null) {
75 for (final AttitudeStateHistory ash : attitudeBlocks) {
76 ash.getMetadata().validate(version);
77 }
78 }
79 if (physicBlock != null) {
80 physicBlock.validate(version);
81 }
82 if (covarianceBlocks != null) {
83 for (final AttitudeCovarianceHistory ch : covarianceBlocks) {
84 ch.getMetadata().validate(version);
85 }
86 }
87 if (maneuverBlocks != null) {
88 for (final AttitudeManeuver m : maneuverBlocks) {
89 m.validate(version);
90 }
91 }
92 if (attitudeDeterminationBlock != null) {
93 attitudeDeterminationBlock.validate(version);
94 }
95 if (userDefinedBlock != null) {
96 userDefinedBlock.validate(version);
97 }
98 }
99
100 /** Get attitude state histories logical blocks.
101 * @return attitude state histories logical blocks (may be null)
102 */
103 public List<AttitudeStateHistory> getAttitudeBlocks() {
104 return attitudeBlocks;
105 }
106
107 /** Get physical properties logical block.
108 * @return physical properties logical block (may be null)
109 */
110 public AttitudePhysicalProperties getPhysicBlock() {
111 return physicBlock;
112 }
113
114 /** Get covariance logical blocks.
115 * @return covariance logical blocks (may be null)
116 */
117 public List<AttitudeCovarianceHistory> getCovarianceBlocks() {
118 return covarianceBlocks;
119 }
120
121 /** Get maneuvers logical blocks.
122 * @return maneuvers logical block (may be null)
123 */
124 public List<AttitudeManeuver> getManeuverBlocks() {
125 return maneuverBlocks;
126 }
127
128 /** Get attitude determination logical block.
129 * @return attitude determination logical block (may be null)
130 */
131 public AttitudeDetermination getAttitudeDeterminationBlock() {
132 return attitudeDeterminationBlock;
133 }
134
135 /** Get user defined parameters logical block.
136 * @return user defined parameters logical block (may be null)
137 */
138 public UserDefined getUserDefinedBlock() {
139 return userDefinedBlock;
140 }
141
142 }