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;
19  
20  import org.orekit.files.ccsds.section.CommentsContainer;
21  import org.orekit.files.ccsds.section.Data;
22  
23  /** Container for spacecraft parameters.
24   * @author sports
25   * @since 6.1
26   */
27  public class SpacecraftParameters extends CommentsContainer implements Data {
28  
29      /** Spacecraft mass. */
30      private double mass;
31  
32      /** Solar radiation pressure area (m^2). */
33      private double solarRadArea;
34  
35      /** Solar radiation pressure coefficient. */
36      private double solarRadCoeff;
37  
38      /** Drag area (m^2). */
39      private double dragArea;
40  
41      /** Drag coefficient. */
42      private double dragCoeff;
43  
44      /** Create an empty state data set.
45       */
46      public SpacecraftParameters() {
47          mass          = Double.NaN;
48          solarRadArea  = Double.NaN;
49          solarRadCoeff = Double.NaN;
50          dragArea      = Double.NaN;
51          dragCoeff     = Double.NaN;
52      }
53  
54      /** {@inheritDoc} */
55      @Override
56      public void validate(final double version) {
57          checkNotNaN(mass, SpacecraftParametersKey.MASS);
58      }
59  
60      /** Get the spacecraft mass.
61       * @return the spacecraft mass
62       */
63      public double getMass() {
64          return mass;
65      }
66  
67      /** Set the spacecraft mass.
68       * @param mass the spacecraft mass to be set
69       */
70      public void setMass(final double mass) {
71          refuseFurtherComments();
72          this.mass = mass;
73      }
74  
75      /** Get the solar radiation pressure area.
76       * @return the solar radiation pressure area
77       */
78      public double getSolarRadArea() {
79          return solarRadArea;
80      }
81  
82      /** Set the solar radiation pressure area.
83       * @param solarRadArea the area to be set
84       */
85      public void setSolarRadArea(final double solarRadArea) {
86          refuseFurtherComments();
87          this.solarRadArea = solarRadArea;
88      }
89  
90      /** Get the solar radiation pressure coefficient.
91       * @return the solar radiation pressure coefficient
92       */
93      public double getSolarRadCoeff() {
94          return solarRadCoeff;
95      }
96  
97      /** Get the solar radiation pressure coefficient.
98       * @param solarRadCoeff the coefficient to be set
99       */
100     public void setSolarRadCoeff(final double solarRadCoeff) {
101         refuseFurtherComments();
102         this.solarRadCoeff = solarRadCoeff;
103     }
104 
105     /** Get the drag area.
106      * @return the drag area
107      */
108     public double getDragArea() {
109         return dragArea;
110     }
111 
112     /** Set the drag area.
113      * @param dragArea the area to be set
114      */
115     public void setDragArea(final double dragArea) {
116         refuseFurtherComments();
117         this.dragArea = dragArea;
118     }
119 
120     /** Get the drag coefficient.
121      * @return the drag coefficient
122      */
123     public double getDragCoeff() {
124         return dragCoeff;
125     }
126 
127     /** Set the drag coefficient.
128      * @param dragCoeff the coefficient to be set
129      */
130     public void setDragCoeff(final double dragCoeff) {
131         refuseFurtherComments();
132         this.dragCoeff = dragCoeff;
133     }
134 
135 }