AdditionalParameters.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.cdm;

  18. import org.orekit.errors.OrekitException;
  19. import org.orekit.errors.OrekitMessages;
  20. import org.orekit.files.ccsds.ndm.CommonPhysicalProperties;

  21. /**
  22.  * Container for additional parameters data block.
  23.  * @author Melina Vanel
  24.  * @since 11.2
  25.  */
  26. public class AdditionalParameters extends CommonPhysicalProperties {

  27.     /** The actual area of the object. */
  28.     private double areaPC;

  29.     /** The minimum area of the object to be used to compute the collision probability. */
  30.     private double areaPCMin;

  31.     /** The maximum area of the object to be used to compute the collision probability. */
  32.     private double areaPCMax;

  33.     /** The effective area of the object exposed to atmospheric drag. */
  34.     private double areaDRG;

  35.     /** The effective area of the object exposed to solar radiation pressure. */
  36.     private double areaSRP;

  37.     /** The object hard body radius. */
  38.     private double hbr;

  39.     /** The mass of the object. */
  40.     private double mass;

  41.     /** The object’s Cd x A/m used to propagate the state vector and covariance to TCA. */
  42.     private double cdAreaOverMass;

  43.     /** The object’s Cr x A/m used to propagate the state vector and covariance to TCA. */
  44.     private double crAreaOverMass;

  45.     /** The object’s acceleration due to in-track thrust used to propagate the state vector and covariance to TCA. */
  46.     private double thrustAcceleration;

  47.     /** The amount of energy being removed from the object’s orbit by atmospheric drag. This value is an average calculated during the OD. */
  48.     private double sedr;

  49.     /** The distance of the furthest point in the objects orbit above the equatorial radius of the central body. */
  50.     private double apoapsisAltitude;

  51.     /** The distance of the closest point in the objects orbit above the equatorial radius of the central body . */
  52.     private double periapsisAltitude;

  53.     /** The angle between the objects orbit plane and the orbit centers equatorial plane. */
  54.     private double inclination;

  55.     /** A measure of the confidence in the covariance errors matching reality. */
  56.     private double covConfidence;

  57.     /** The method used for the calculation of COV_CONFIDENCE. */
  58.     private String covConfidenceMethod;

  59.     /** Simple constructor.
  60.      */
  61.     public AdditionalParameters() {

  62.        // Call to CommonPhysicalProperties constructor
  63.         super();

  64.         // we don't call the setXxx() methods in order to avoid
  65.         // calling refuseFurtherComments as a side effect
  66.         areaPC              = Double.NaN;
  67.         areaDRG             = Double.NaN;
  68.         areaSRP             = Double.NaN;
  69.         mass                = Double.NaN;
  70.         cdAreaOverMass      = Double.NaN;
  71.         crAreaOverMass      = Double.NaN;
  72.         thrustAcceleration  = Double.NaN;
  73.         sedr                = Double.NaN;
  74.         hbr                 = Double.NaN;
  75.         apoapsisAltitude  = Double.NaN;
  76.         periapsisAltitude = Double.NaN;
  77.         inclination       = Double.NaN;
  78.         covConfidence       = Double.NaN;
  79.     }

  80.     /** {@inheritDoc} */
  81.     @Override
  82.     public void validate(final double version) {
  83.         super.validate(version);
  84.     }

  85.     /**
  86.      * Get the actual area of the object.
  87.      * @return the object area (in m²)
  88.      */
  89.     public double getAreaPC() {
  90.         return areaPC;
  91.     }

  92.     /**
  93.      * Set the actual area of the object.
  94.      * @param areaPC area  (in m²) value to be set
  95.      */
  96.     public void setAreaPC(final double areaPC) {
  97.         refuseFurtherComments();
  98.         this.areaPC = areaPC;
  99.     }

  100.     /**
  101.      * Get the effective area of the object exposed to atmospheric drag.
  102.      * @return the object area (in m²) exposed to atmospheric drag
  103.      */
  104.     public double getAreaDRG() {
  105.         return areaDRG;
  106.     }

  107.     /**
  108.      * Set the effective area of the object exposed to atmospheric drag.
  109.      * @param areaDRG area (in m²) value to be set
  110.      */
  111.     public void setAreaDRG(final double areaDRG) {
  112.         refuseFurtherComments();
  113.         this.areaDRG = areaDRG;
  114.     }

  115.     /**
  116.      * Get the effective area of the object exposed to solar radiation pressure.
  117.      * @return the object area (in m²) exposed to solar radiation pressure
  118.      */
  119.     public double getAreaSRP() {
  120.         return areaSRP;
  121.     }

  122.     /**
  123.      * Set the effective area of the object exposed to solar radiation pressure.
  124.      * @param areaSRP area (in m²) to be set
  125.      */
  126.     public void setAreaSRP(final double areaSRP) {
  127.         refuseFurtherComments();
  128.         this.areaSRP = areaSRP;
  129.     }

  130.     /**
  131.      * Get the mass of the object.
  132.      * @return the mass (in kg) of the object
  133.      */
  134.     public double getMass() {
  135.         return mass;
  136.     }

  137.     /**
  138.      * Set the mass of the object.
  139.      * @param mass mass (in kg) of the object to be set
  140.      */
  141.     public void setMass(final double mass) {
  142.         refuseFurtherComments();
  143.         this.mass = mass;
  144.     }

  145.     /**
  146.      * Get the object’s Cd x A/m used to propagate the state vector and covariance to TCA.
  147.      * @return the object’s Cd x A/m (in m²/kg)
  148.      */
  149.     public double getCDAreaOverMass() {
  150.         return cdAreaOverMass;
  151.     }

  152.     /**
  153.      * Set the object’s Cd x A/m used to propagate the state vector and covariance to TCA.
  154.      * @param CDAreaOverMass object’s Cd x A/m (in m²/kg) value to be set
  155.      */
  156.     public void setCDAreaOverMass(final double CDAreaOverMass) {
  157.         refuseFurtherComments();
  158.         this.cdAreaOverMass = CDAreaOverMass;
  159.     }

  160.     /**
  161.      * Get the object’s Cr x A/m used to propagate the state vector and covariance to TCA.
  162.      * @return the object’s Cr x A/m (in m²/kg)
  163.      */
  164.     public double getCRAreaOverMass() {
  165.         return crAreaOverMass;
  166.     }

  167.     /**
  168.      * Set the object’s Cr x A/m used to propagate the state vector and covariance to TCA.
  169.      * @param CRAreaOverMass object’s Cr x A/m (in m²/kg) value to be set
  170.      */
  171.     public void setCRAreaOverMass(final double CRAreaOverMass) {
  172.         refuseFurtherComments();
  173.         this.crAreaOverMass = CRAreaOverMass;
  174.     }

  175.     /**
  176.      * Get the object’s acceleration due to in-track thrust used to propagate the state vector and covariance to TCA.
  177.      * @return the object’s acceleration (in m/s²) due to in-track thrust
  178.      */
  179.     public double getThrustAcceleration() {
  180.         return thrustAcceleration;
  181.     }

  182.     /**
  183.      * Set the object’s acceleration due to in-track thrust used to propagate the state vector and covariance to TCA.
  184.      * @param thrustAcceleration object’s acceleration (in m/s²) due to in-track thrust
  185.      */
  186.     public void setThrustAcceleration(final double thrustAcceleration) {
  187.         refuseFurtherComments();
  188.         this.thrustAcceleration = thrustAcceleration;
  189.     }

  190.     /**
  191.      * Get the amount of energy being removed from the object’s orbit by atmospheric drag. This value is an average
  192.      * calculated during the OD. SEDR = Specific Energy Dissipation Rate.
  193.      * @return the amount of energy (in W/kg) being removed from the object’s orbit by atmospheric drag
  194.      */
  195.     public double getSedr() {
  196.         return sedr;
  197.     }

  198.     /**
  199.      * Set the amount of energy being removed from the object’s orbit by atmospheric drag. This value is an average
  200.      * calculated during the OD. SEDR = Specific Energy Dissipation Rate.
  201.      * @param SEDR amount of energy (in W/kg) being removed from the object’s orbit by atmospheric drag
  202.      */
  203.     public void setSedr(final double SEDR) {
  204.         refuseFurtherComments();
  205.         this.sedr = SEDR;
  206.     }

  207.     /** Set the minimum area of the object to be used to compute the collision probability.
  208.      * @return the areaPCMin
  209.      */
  210.     public double getAreaPCMin() {
  211.         return areaPCMin;
  212.     }

  213.     /** Get the minimum area of the object to be used to compute the collision probability.
  214.      * @param areaPCMin the areaPCMin to set
  215.      */
  216.     public void setAreaPCMin(final double areaPCMin) {
  217.         this.areaPCMin = areaPCMin;
  218.     }

  219.     /** Get the maximum area of the object to be used to compute the collision probability.
  220.      * @return the areaPCMax
  221.      */
  222.     public double getAreaPCMax() {
  223.         return areaPCMax;
  224.     }

  225.     /** Set the maximum area for the object to be used to compute the collision probability.
  226.      * @param areaPCMax the areaPCMax to set
  227.      */
  228.     public void setAreaPCMax(final double areaPCMax) {
  229.         this.areaPCMax = areaPCMax;
  230.     }

  231.      /** Get the object hard body radius.
  232.      * @return the object hard body radius.
  233.      */
  234.     public double getHbr() {
  235.         return hbr;
  236.     }

  237.     /** Set the object hard body radius.
  238.      * @param hbr the object hard body radius.
  239.      */
  240.     public void setHbr(final double hbr) {
  241.         refuseFurtherComments();
  242.         this.hbr = hbr;
  243.     }

  244.     /** Get the distance of the furthest point in the objects orbit above the equatorial radius of the central body.
  245.      * @return the apoapsisAltitude
  246.      */
  247.     public double getApoapsisAltitude() {
  248.         return apoapsisAltitude;
  249.     }

  250.     /** Set the distance of the furthest point in the objects orbit above the equatorial radius of the central body.
  251.      * @param apoapsisAltitude the apoapsisHeight to set
  252.      */
  253.     public void setApoapsisAltitude(final double apoapsisAltitude) {
  254.         refuseFurtherComments();
  255.         this.apoapsisAltitude = apoapsisAltitude;
  256.     }

  257.     /** Get the distance of the closest point in the objects orbit above the equatorial radius of the central body.
  258.      * @return the periapsissAltitude
  259.      */
  260.     public double getPeriapsisAltitude() {
  261.         return periapsisAltitude;
  262.     }

  263.     /** Set the distance of the closest point in the objects orbit above the equatorial radius of the central body.
  264.      * @param periapsisAltitude the periapsissHeight to set
  265.      */
  266.     public void setPeriapsisAltitude(final double periapsisAltitude) {
  267.         refuseFurtherComments();
  268.         this.periapsisAltitude = periapsisAltitude;
  269.     }

  270.     /** Get the angle between the objects orbit plane and the orbit centers equatorial plane.
  271.      * @return the inclination
  272.      */
  273.     public double getInclination() {
  274.         return inclination;
  275.     }

  276.     /** Set the angle between the objects orbit plane and the orbit centers equatorial plane.
  277.      * @param inclination the inclination to set
  278.      */
  279.     public void setInclination(final double inclination) {
  280.         refuseFurtherComments();
  281.         this.inclination = inclination;
  282.     }

  283.     /** Get the measure of the confidence in the covariance errors matching reality.
  284.      * @return the covConfidence
  285.      */
  286.     public double getCovConfidence() {
  287.         return covConfidence;
  288.     }

  289.     /** Set the measure of the confidence in the covariance errors matching reality.
  290.      * @param covConfidence the covConfidence to set
  291.      */
  292.     public void setCovConfidence(final double covConfidence) {
  293.         refuseFurtherComments();
  294.         this.covConfidence = covConfidence;
  295.     }

  296.     /** Get the method used for the calculation of COV_CONFIDENCE.
  297.      * @return the covConfidenceMethod
  298.      */
  299.     public String getCovConfidenceMethod() {
  300.         return covConfidenceMethod;
  301.     }

  302.     /** Set the method used for the calculation of COV_CONFIDENCE.
  303.      * @param covConfidenceMethod the covConfidenceMethod to set
  304.      */
  305.     public void setCovConfidenceMethod(final String covConfidenceMethod) {
  306.         refuseFurtherComments();

  307.         // Check key condition
  308.         if (Double.isNaN(getCovConfidence())) {
  309.             throw new OrekitException(OrekitMessages.CCSDS_MISSING_KEYWORD, AdditionalParametersKey.COV_CONFIDENCE);
  310.         }

  311.         this.covConfidenceMethod = covConfidenceMethod;
  312.     }
  313. }