1 /* Copyright 2002-2021 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 LOuc 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 PhysicalProperties physicBlock;
36
37 /** Covariance logical blocks. */
38 private final List<CovarianceHistory> covarianceBlocks;
39
40 /** Maneuvers logical blocks. */
41 private final List<ManeuverHistory> 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 PhysicalProperties physicBlock,
63 final List<CovarianceHistory> covarianceBlocks,
64 final List<ManeuverHistory> 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 CovarianceHistory ch : covarianceBlocks) {
90 ch.getMetadata().validate(version);
91 }
92 }
93 if (maneuverBlocks != null) {
94 for (final ManeuverHistory 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 */
112 public List<TrajectoryStateHistory> getOTrajectoryBlocks() {
113 return trajectoryBlocks;
114 }
115
116 /** Get physical properties logical block.
117 * @return physical properties logical block (may be null)
118 */
119 public PhysicalProperties getPhysicBlock() {
120 return physicBlock;
121 }
122
123 /** Get covariance logical blocks.
124 * @return covariance logical blocks (may be null)
125 */
126 public List<CovarianceHistory> getCovarianceBlocks() {
127 return covarianceBlocks;
128 }
129
130 /** Get maneuvers logical blocks.
131 * @return maneuvers logical block (may be null)
132 */
133 public List<ManeuverHistory> getManeuverBlocks() {
134 return maneuverBlocks;
135 }
136
137 /** Get perturbations logical block.
138 * @return perturbations logical block (may be null)
139 */
140 public Perturbations getPerturbationsBlock() {
141 return perturbationsBlock;
142 }
143
144 /** Get orbit determination logical block.
145 * @return orbit determination logical block (may be null)
146 */
147 public OrbitDetermination getOrbitDeterminationBlock() {
148 return orbitDeterminationBlock;
149 }
150
151 /** Get user defined parameters logical block.
152 * @return user defined parameters logical block (may be null)
153 */
154 public UserDefined getUserDefinedBlock() {
155 return userDefinedBlock;
156 }
157
158 }