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 package org.orekit.files.ccsds.ndm.adm.apm;
18
19 import org.orekit.files.ccsds.definitions.FrameFacade;
20 import org.orekit.files.ccsds.section.CommentsContainer;
21
22 /**
23 * Container for spacecraft parameters data.
24 * @author Bryan Cazabonne
25 * @since 10.2
26 */
27 public class SpacecraftParameters extends CommentsContainer {
28
29 /** Coordinate system for the inertia tensor. */
30 private FrameFacade inertiaReferenceFrame;
31
32 /** Moment of Inertia about the 1-axis (kg.m²). */
33 private double i11;
34
35 /** Moment of Inertia about the 2-axis (kg.m²). */
36 private double i22;
37
38 /** Moment of Inertia about the 3-axis (kg.m²). */
39 private double i33;
40
41 /** Inertia Cross Product of the 1 and 2 axes (kg.m²). */
42 private double i12;
43
44 /** Inertia Cross Product of the 1 and 3 axes (kg.m²). */
45 private double i13;
46
47 /** Inertia Cross Product of the 2 and 3 axes (kg.m²). */
48 private double i23;
49
50 /** Simple constructor.
51 */
52 public SpacecraftParameters() {
53 inertiaReferenceFrame = null;
54 i11 = Double.NaN;
55 i22 = Double.NaN;
56 i33 = Double.NaN;
57 i12 = Double.NaN;
58 i13 = Double.NaN;
59 i23 = Double.NaN;
60 }
61
62 /** {@inheritDoc} */
63 @Override
64 public void validate(final double version) {
65 super.validate(version);
66 checkNotNaN(i11, SpacecraftParametersKey.I11);
67 checkNotNaN(i22, SpacecraftParametersKey.I22);
68 checkNotNaN(i33, SpacecraftParametersKey.I33);
69 checkNotNaN(i12, SpacecraftParametersKey.I12);
70 checkNotNaN(i13, SpacecraftParametersKey.I13);
71 checkNotNaN(i23, SpacecraftParametersKey.I23);
72 }
73
74 /**
75 * Get the coordinate system for the inertia tensor.
76 * @return the coordinate system for the inertia tensor
77 */
78 public FrameFacade getInertiaReferenceFrame() {
79 return inertiaReferenceFrame;
80 }
81
82 /**
83 * Set the coordinate system for the inertia tensor.
84 * @param inertiaReferenceFrame frame to be set
85 */
86 public void setInertiaReferenceFrame(final FrameFacade inertiaReferenceFrame) {
87 refuseFurtherComments();
88 this.inertiaReferenceFrame = inertiaReferenceFrame;
89 }
90
91 /**
92 * Get the moment of Inertia about the 1-axis (N.m²).
93 * @return the moment of Inertia about the 1-axis.
94 */
95 public double getI11() {
96 return i11;
97 }
98
99 /**
100 * Set the moment of Inertia about the 1-axis (N.m²).
101 * @param i11 moment of Inertia about the 1-axis
102 */
103 public void setI11(final double i11) {
104 refuseFurtherComments();
105 this.i11 = i11;
106 }
107
108 /**
109 * Get the moment of Inertia about the 2-axis (N.m²).
110 * @return the moment of Inertia about the 2-axis.
111 */
112 public double getI22() {
113 return i22;
114 }
115
116 /**
117 * Set the moment of Inertia about the 2-axis (N.m²).
118 * @param i22 moment of Inertia about the 2-axis
119 */
120 public void setI22(final double i22) {
121 refuseFurtherComments();
122 this.i22 = i22;
123 }
124
125 /**
126 * Get the moment of Inertia about the 3-axis (N.m²).
127 * @return the moment of Inertia about the 3-axis.
128 */
129 public double getI33() {
130 return i33;
131 }
132
133 /**
134 * Set the moment of Inertia about the 3-axis (N.m²).
135 * @param i33 moment of Inertia about the 3-axis
136 */
137 public void setI33(final double i33) {
138 refuseFurtherComments();
139 this.i33 = i33;
140 }
141
142 /**
143 * Get the moment of Inertia about the 1 and 2 axes (N.m²).
144 * @return the moment of Inertia about the 1 and 2 axes.
145 */
146 public double getI12() {
147 return i12;
148 }
149
150 /**
151 * Set the moment of Inertia about the 1 and 2 axes (N.m²).
152 * @param i12 moment of Inertia about the 1 and 2 axes
153 */
154 public void setI12(final double i12) {
155 refuseFurtherComments();
156 this.i12 = i12;
157 }
158
159 /**
160 * Get the moment of Inertia about the 1 and 3 axes (N.m²).
161 * @return the moment of Inertia about the 1 and 3 axes.
162 */
163 public double getI13() {
164 return i13;
165 }
166
167 /**
168 * Set the moment of Inertia about the 1 and 3 axes (N.m²).
169 * @param i13 moment of Inertia about the 1 and 3 axes
170 */
171 public void setI13(final double i13) {
172 refuseFurtherComments();
173 this.i13 = i13;
174 }
175
176 /**
177 * Get the moment of Inertia about the 2 and 3 axes (N.m²).
178 * @return the moment of Inertia about the 2 and 3 axes.
179 */
180 public double getI23() {
181 return i23;
182 }
183
184 /**
185 * Set the moment of Inertia about the 2 and 3 axes (N.m²).
186 * @param i23 moment of Inertia about the 2 and 3 axes
187 */
188 public void setI23(final double i23) {
189 refuseFurtherComments();
190 this.i23 = i23;
191 }
192
193 }