1 /* Copyright 2002-2025 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.List;
21
22 import org.orekit.files.ccsds.ndm.odm.UserDefined;
23 import org.orekit.files.ccsds.section.Data;
24
25 /** Data container for Orbit Comprehensive Messages.
26 * @author Luc Maisonobe
27 * @since 11.0
28 */
29 public class OcmData implements Data {
30
31 /** Trajectory state histories logical blocks. */
32 private final List<TrajectoryStateHistory> trajectoryBlocks;
33
34 /** Physical properties logical block. */
35 private final OrbitPhysicalProperties physicBlock;
36
37 /** Covariance logical blocks. */
38 private final List<OrbitCovarianceHistory> covarianceBlocks;
39
40 /** Maneuvers logical blocks. */
41 private final List<OrbitManeuverHistory> maneuverBlocks;
42
43 /** Perturbations logical block. */
44 private final Perturbations perturbationsBlock;
45
46 /** Orbit determination logical block. */
47 private final OrbitDetermination orbitDeterminationBlock;
48
49 /** User defined parameters logical block. */
50 private final UserDefined userDefinedBlock;
51
52 /** Simple constructor.
53 * @param trajectoryBlocks trajectory state histories logical blocks (may be empty)
54 * @param physicBlock physical properties logical block (may be null)
55 * @param covarianceBlocks covariance logical blocks (may be empty)
56 * @param maneuverBlocks maneuvers logical blocks (may be empty)
57 * @param perturbationsBlock perturbations logical block (may be null)
58 * @param orbitDeterminationBlock orbit determination logical block (may be null)
59 * @param userDefinedBlock user defined parameters logical block (may be null)
60 */
61 public OcmData(final List<TrajectoryStateHistory> trajectoryBlocks,
62 final OrbitPhysicalProperties physicBlock,
63 final List<OrbitCovarianceHistory> covarianceBlocks,
64 final List<OrbitManeuverHistory> maneuverBlocks,
65 final Perturbations perturbationsBlock,
66 final OrbitDetermination orbitDeterminationBlock,
67 final UserDefined userDefinedBlock) {
68 this.trajectoryBlocks = trajectoryBlocks;
69 this.physicBlock = physicBlock;
70 this.covarianceBlocks = covarianceBlocks;
71 this.maneuverBlocks = maneuverBlocks;
72 this.perturbationsBlock = perturbationsBlock;
73 this.orbitDeterminationBlock = orbitDeterminationBlock;
74 this.userDefinedBlock = userDefinedBlock;
75 }
76
77 /** {@inheritDoc} */
78 @Override
79 public void validate(final double version) {
80 if (trajectoryBlocks != null) {
81 for (final TrajectoryStateHistory osh : trajectoryBlocks) {
82 osh.getMetadata().validate(version);
83 }
84 }
85 if (physicBlock != null) {
86 physicBlock.validate(version);
87 }
88 if (covarianceBlocks != null) {
89 for (final OrbitCovarianceHistory ch : covarianceBlocks) {
90 ch.getMetadata().validate(version);
91 }
92 }
93 if (maneuverBlocks != null) {
94 for (final OrbitManeuverHistory mh : maneuverBlocks) {
95 mh.getMetadata().validate(version);
96 }
97 }
98 if (perturbationsBlock != null) {
99 perturbationsBlock.validate(version);
100 }
101 if (orbitDeterminationBlock != null) {
102 orbitDeterminationBlock.validate(version);
103 }
104 if (userDefinedBlock != null) {
105 userDefinedBlock.validate(version);
106 }
107 }
108
109 /** Get trajectory state histories logical blocks.
110 * @return trajectory state histories logical blocks (may be null)
111 * @since 12.0
112 */
113 public List<TrajectoryStateHistory> getTrajectoryBlocks() {
114 return trajectoryBlocks;
115 }
116
117 /** Get physical properties logical block.
118 * @return physical properties logical block (may be null)
119 */
120 public OrbitPhysicalProperties getPhysicBlock() {
121 return physicBlock;
122 }
123
124 /** Get covariance logical blocks.
125 * @return covariance logical blocks (may be null)
126 */
127 public List<OrbitCovarianceHistory> getCovarianceBlocks() {
128 return covarianceBlocks;
129 }
130
131 /** Get maneuvers logical blocks.
132 * @return maneuvers logical block (may be null)
133 */
134 public List<OrbitManeuverHistory> getManeuverBlocks() {
135 return maneuverBlocks;
136 }
137
138 /** Get perturbations logical block.
139 * @return perturbations logical block (may be null)
140 */
141 public Perturbations getPerturbationsBlock() {
142 return perturbationsBlock;
143 }
144
145 /** Get orbit determination logical block.
146 * @return orbit determination logical block (may be null)
147 */
148 public OrbitDetermination getOrbitDeterminationBlock() {
149 return orbitDeterminationBlock;
150 }
151
152 /** Get user defined parameters logical block.
153 * @return user defined parameters logical block (may be null)
154 */
155 public UserDefined getUserDefinedBlock() {
156 return userDefinedBlock;
157 }
158
159 }