SpacecraftParameters.java

  1. /* Copyright 2002-2023 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.odm;

  18. import org.orekit.files.ccsds.section.CommentsContainer;
  19. import org.orekit.files.ccsds.section.Data;

  20. /** Container for spacecraft parameters.
  21.  * @author sports
  22.  * @since 6.1
  23.  */
  24. public class SpacecraftParameters extends CommentsContainer implements Data {

  25.     /** Spacecraft mass. */
  26.     private double mass;

  27.     /** Solar radiation pressure area (m^2). */
  28.     private double solarRadArea;

  29.     /** Solar radiation pressure coefficient. */
  30.     private double solarRadCoeff;

  31.     /** Drag area (m^2). */
  32.     private double dragArea;

  33.     /** Drag coefficient. */
  34.     private double dragCoeff;

  35.     /** Create an empty state data set.
  36.      */
  37.     public SpacecraftParameters() {
  38.         mass          = Double.NaN;
  39.         solarRadArea  = Double.NaN;
  40.         solarRadCoeff = Double.NaN;
  41.         dragArea      = Double.NaN;
  42.         dragCoeff     = Double.NaN;
  43.     }

  44.     /** {@inheritDoc} */
  45.     @Override
  46.     public void validate(final double version) {
  47.         checkNotNaN(mass, SpacecraftParametersKey.MASS.name());
  48.     }

  49.     /** Get the spacecraft mass.
  50.      * @return the spacecraft mass
  51.      */
  52.     public double getMass() {
  53.         return mass;
  54.     }

  55.     /** Set the spacecraft mass.
  56.      * @param mass the spacecraft mass to be set
  57.      */
  58.     public void setMass(final double mass) {
  59.         refuseFurtherComments();
  60.         this.mass = mass;
  61.     }

  62.     /** Get the solar radiation pressure area.
  63.      * @return the solar radiation pressure area
  64.      */
  65.     public double getSolarRadArea() {
  66.         return solarRadArea;
  67.     }

  68.     /** Set the solar radiation pressure area.
  69.      * @param solarRadArea the area to be set
  70.      */
  71.     public void setSolarRadArea(final double solarRadArea) {
  72.         refuseFurtherComments();
  73.         this.solarRadArea = solarRadArea;
  74.     }

  75.     /** Get the solar radiation pressure coefficient.
  76.      * @return the solar radiation pressure coefficient
  77.      */
  78.     public double getSolarRadCoeff() {
  79.         return solarRadCoeff;
  80.     }

  81.     /** Get the solar radiation pressure coefficient.
  82.      * @param solarRadCoeff the coefficient to be set
  83.      */
  84.     public void setSolarRadCoeff(final double solarRadCoeff) {
  85.         refuseFurtherComments();
  86.         this.solarRadCoeff = solarRadCoeff;
  87.     }

  88.     /** Get the drag area.
  89.      * @return the drag area
  90.      */
  91.     public double getDragArea() {
  92.         return dragArea;
  93.     }

  94.     /** Set the drag area.
  95.      * @param dragArea the area to be set
  96.      */
  97.     public void setDragArea(final double dragArea) {
  98.         refuseFurtherComments();
  99.         this.dragArea = dragArea;
  100.     }

  101.     /** Get the drag coefficient.
  102.      * @return the drag coefficient
  103.      */
  104.     public double getDragCoeff() {
  105.         return dragCoeff;
  106.     }

  107.     /** Set the drag coefficient.
  108.      * @param dragCoeff the coefficient to be set
  109.      */
  110.     public void setDragCoeff(final double dragCoeff) {
  111.         refuseFurtherComments();
  112.         this.dragCoeff = dragCoeff;
  113.     }

  114. }