AdditionalCovarianceMetadata.java

  1. /* Copyright 2002-2025 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.files.ccsds.section.CommentsContainer;

  19. /**
  20.  * Container for the additional covariance metadata (optional).
  21.  * <p>
  22.  * Beware that the Orekit getters and setters all rely on SI units. The parsers
  23.  * and writers take care of converting these SI units into CCSDS mandatory units.
  24.  * The {@link org.orekit.utils.units.Unit Unit} class provides useful
  25.  * {@link org.orekit.utils.units.Unit#fromSI(double) fromSi} and
  26.  * {@link org.orekit.utils.units.Unit#toSI(double) toSI} methods in case the callers
  27.  * already use CCSDS units instead of the API SI units. The general-purpose
  28.  * {@link org.orekit.utils.units.Unit Unit} class (without an 's') and the
  29.  * CCSDS-specific {@link org.orekit.files.ccsds.definitions.Units Units} class
  30.  * (with an 's') also provide some predefined units. These predefined units and the
  31.  * {@link org.orekit.utils.units.Unit#fromSI(double) fromSi} and
  32.  * {@link org.orekit.utils.units.Unit#toSI(double) toSI} conversion methods are indeed
  33.  * what the parsers and writers use for the conversions.
  34.  * </p>
  35.  */
  36. public class AdditionalCovarianceMetadata extends CommentsContainer {

  37.     /** The atmospheric density forecast error. */
  38.     private double densityForecastUncertainty;

  39.     /** The minimum suggested covariance scale factor. */
  40.     private double cScaleFactorMin;

  41.     /** The (median) suggested covariance scale factor. */
  42.     private double cScaleFactor;

  43.     /** The maximum suggested covariance scale factor. */
  44.     private double cScaleFactorMax;

  45.     /** The source (or origin) of the specific orbital data for this object. */
  46.     private String screeningDataSource;

  47.     /** The drag consider parameter (DCP) sensitivity vectors map forward expected error in the drag acceleration to actual
  48.      * componentized position errors at TCA. */
  49.     private double[] dcpSensitivityVectorPosition;

  50.     /** The drag consider parameter (DCP) sensitivity vectors map forward expected error in the drag acceleration to actual
  51.      * componentized velocity errors at TCA. */
  52.     private double[] dcpSensitivityVectorVelocity;


  53.     /** Simple constructor. */
  54.     public AdditionalCovarianceMetadata() {
  55.         densityForecastUncertainty = Double.NaN;
  56.     }

  57.     /** {@inheritDoc} */
  58.     @Override
  59.     public void validate(final double version) {
  60.         super.validate(version);
  61.     }


  62.     /**
  63.      * Get the atmospheric density forecast error.
  64.      * @return densityForecastUncertainty
  65.      */
  66.     public double getDensityForecastUncertainty() {
  67.         return densityForecastUncertainty;
  68.     }

  69.     /**
  70.      * Set the atmospheric density forecast error.
  71.      * @param densityForecastUncertainty the cScaleFactorMax to set
  72.      */
  73.     public void setDensityForecastUncertainty(final double densityForecastUncertainty) {
  74.         refuseFurtherComments();
  75.         this.densityForecastUncertainty = densityForecastUncertainty;
  76.     }

  77.     /** Get the minimum suggested covariance scale factor.
  78.      * @return the cScaleFactorMin
  79.      */
  80.     public double getcScaleFactorMin() {
  81.         return cScaleFactorMin;
  82.     }

  83.     /** Set the minimum suggested covariance scale factor.
  84.      * @param cScaleFactorMin the cScaleFactorMin to set
  85.      */
  86.     public void setcScaleFactorMin(final double cScaleFactorMin) {
  87.         this.cScaleFactorMin = cScaleFactorMin;
  88.     }

  89.     /** Get the (median) suggested covariance scale factor.
  90.      * @return the cScaleFactor
  91.      */
  92.     public double getcScaleFactor() {
  93.         return cScaleFactor;
  94.     }

  95.     /** Set the (median) suggested covariance scale factor.
  96.      * @param cScaleFactor the cScaleFactor to set
  97.      */
  98.     public void setcScaleFactor(final double cScaleFactor) {
  99.         this.cScaleFactor = cScaleFactor;
  100.     }

  101.     /** Get the maximum suggested covariance scale factor.
  102.      * @return the cScaleFactorMax
  103.      */
  104.     public double getcScaleFactorMax() {
  105.         return cScaleFactorMax;
  106.     }

  107.     /** set the maximum suggested covariance scale factor.
  108.      * @param cScaleFactorMax the cScaleFactorMax to set
  109.      */
  110.     public void setcScaleFactorMax(final double cScaleFactorMax) {
  111.         this.cScaleFactorMax = cScaleFactorMax;
  112.     }

  113.     /** Get the source (or origin) of the specific orbital data for this object.
  114.      * @return the screeningDataSource
  115.      */
  116.     public String getScreeningDataSource() {
  117.         return screeningDataSource;
  118.     }

  119.     /** Set the source (or origin) of the specific orbital data for this object.
  120.      * @param screeningDataSource the screeningDataSource to set
  121.      */
  122.     public void setScreeningDataSource(final String screeningDataSource) {
  123.         this.screeningDataSource = screeningDataSource;
  124.     }

  125.     /** Get the DCP sensitivity vector (position errors at TCA).
  126.      * @return the dcpSensitivityVectorPosition
  127.      */
  128.     public double[] getDcpSensitivityVectorPosition() {
  129.         return dcpSensitivityVectorPosition == null ? null : dcpSensitivityVectorPosition.clone();
  130.     }

  131.     /** Set the DCP sensitivity vector (position errors at TCA).
  132.      * @param dcpSensitivityVectorPosition the dcpSensitivityVectorPosition to set
  133.      */
  134.     public void setDcpSensitivityVectorPosition(final double[] dcpSensitivityVectorPosition) {
  135.         this.dcpSensitivityVectorPosition = dcpSensitivityVectorPosition == null ? null : dcpSensitivityVectorPosition.clone();
  136.     }

  137.     /** Get the DCP sensitivity vector (velocity errors at TCA).
  138.      * @return the dcpSensitivityVectorVelocity
  139.      */
  140.     public double[] getDcpSensitivityVectorVelocity() {
  141.         return dcpSensitivityVectorVelocity == null ? null : dcpSensitivityVectorVelocity.clone();
  142.     }

  143.     /** Set the DCP sensitivity vector (velocity errors at TCA).
  144.      * @param dcpSensitivityVectorVelocity the dcpSensitivityVectorVelocity to set
  145.      */
  146.     public void setDcpSensitivityVectorVelocity(final double[] dcpSensitivityVectorVelocity) {
  147.         this.dcpSensitivityVectorVelocity = dcpSensitivityVectorVelocity == null ? null : dcpSensitivityVectorVelocity.clone();
  148.     }

  149. }