ODParameters.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. import org.orekit.time.AbsoluteDate;

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

  40.     /** The start of a time interval (UTC) that contains the time of the last accepted observation. */
  41.     private AbsoluteDate timeLastObsStart;

  42.     /** The end of a time interval (UTC) that contains the time of the last accepted observation. */
  43.     private AbsoluteDate timeLastObsEnd;

  44.     /** The recommended OD time span calculated for the object. */
  45.     private double recommendedOdSpan;

  46.     /** Based on the observations available and the RECOMMENDED_OD_SPAN, the actual time span used for the OD of the object. */
  47.     private double actualOdSpan;

  48.     /** The number of observations available for the OD of the object. */
  49.     private int obsAvailable;

  50.     /** The number of observations accepted for the OD of the object. */
  51.     private int obsUsed;

  52.     /** The number of sensor tracks available for the OD of the object. */
  53.     private int tracksAvailable;

  54.     /** The number of sensor tracks accepted for the OD of the object. */
  55.     private int tracksUsed;

  56.     /** The percentage of residuals accepted in the OD of the object (from 0 to 100). */
  57.     private double residualsAccepted;

  58.     /** The weighted Root Mean Square (RMS) of the residuals from a batch least squares OD. */
  59.     private double weightedRMS;

  60.     /** The epoch of the orbit determination used for this message (UTC). */
  61.     private AbsoluteDate odEpoch;

  62.     /** Simple constructor.
  63.      */
  64.     public ODParameters() {
  65.         recommendedOdSpan   = Double.NaN;
  66.         actualOdSpan        = Double.NaN;
  67.         residualsAccepted   = Double.NaN;
  68.         weightedRMS         = Double.NaN;
  69.     }

  70.     /** {@inheritDoc} */
  71.     @Override
  72.     public void validate(final double version) {
  73.         super.validate(version);
  74.     }

  75.     /**
  76.      * Get the start of a time interval (UTC) that contains the time of the last accepted observation.
  77.      * @return the start of a time interval (UTC)
  78.      */
  79.     public AbsoluteDate getTimeLastObsStart() {
  80.         return timeLastObsStart;
  81.     }

  82.     /**
  83.      * Set the start of a time interval (UTC) that contains the time of the last accepted observation.
  84.      * @param timeLastObsStart the start of a time interval (UTC)
  85.      */
  86.     public void setTimeLastObsStart(final AbsoluteDate timeLastObsStart) {
  87.         refuseFurtherComments();
  88.         this.timeLastObsStart = timeLastObsStart;
  89.     }

  90.     /**
  91.      * Get the start of a time interval (UTC) that contains the time of the last accepted observation.
  92.      * @return the start of a time interval (UTC)
  93.      */
  94.     public AbsoluteDate getTimeLastObsEnd() {
  95.         return timeLastObsEnd;
  96.     }

  97.     /**
  98.      * Set the start of a time interval (UTC) that contains the time of the last accepted observation.
  99.      * @param timeLastObsEnd the start of a time interval (UTC)
  100.      */
  101.     public void setTimeLastObsEnd(final AbsoluteDate timeLastObsEnd) {
  102.         refuseFurtherComments();
  103.         this.timeLastObsEnd = timeLastObsEnd;
  104.     }

  105.     /**
  106.      * Get the recommended OD time span calculated for the object.
  107.      * @return the recommended OD time span (in days) calculated for the object
  108.      */
  109.     public double getRecommendedOdSpan() {
  110.         return recommendedOdSpan;
  111.     }

  112.     /**
  113.      * Set the recommended OD time span calculated for the object.
  114.      * @param recommendedOdSpan recommended OD time span (in days) calculated for the object
  115.      */
  116.     public void setRecommendedOdSpan(final double recommendedOdSpan) {
  117.         refuseFurtherComments();
  118.         this.recommendedOdSpan = recommendedOdSpan;
  119.     }

  120.     /**
  121.      * Get the actual OD time based on the observations available and the RECOMMENDED_OD_SPAN.
  122.      * @return the actual OD time (in days)
  123.      */
  124.     public double getActualOdSpan() {
  125.         return actualOdSpan;
  126.     }

  127.     /**
  128.      * Set the actual OD time based on the observations available and the RECOMMENDED_OD_SPAN.
  129.      * @param actualOdSpan the actual OD time (in days)
  130.      */
  131.     public void setActualOdSpan(final double actualOdSpan) {
  132.         refuseFurtherComments();
  133.         this.actualOdSpan = actualOdSpan;
  134.     }

  135.     /**
  136.      * Get the number of observations available for the OD of the object.
  137.      * @return the number of observations available
  138.      */
  139.     public int getObsAvailable() {
  140.         return obsAvailable;
  141.     }

  142.     /**
  143.      * Set the number of observations available for the OD of the object.
  144.      * @param obsAvailable the number of observations available
  145.      */
  146.     public void setObsAvailable(final int obsAvailable) {
  147.         refuseFurtherComments();
  148.         this.obsAvailable = obsAvailable;
  149.     }

  150.     /**
  151.      * Get the number of observations accepted for the OD of the object.
  152.      * @return the number of observations used
  153.      */
  154.     public int getObsUsed() {
  155.         return obsUsed;
  156.     }

  157.     /**
  158.      * Set the number of observations accepted for the OD of the object.
  159.      * @param obsUsed the number of observations used
  160.      */
  161.     public void setObsUsed(final int obsUsed) {
  162.         refuseFurtherComments();
  163.         this.obsUsed = obsUsed;
  164.     }

  165.     /**
  166.      * Get the number of sensor tracks available for the OD of the object.
  167.      * @return the number of sensor tracks available
  168.      */
  169.     public int getTracksAvailable() {
  170.         return tracksAvailable;
  171.     }

  172.     /**
  173.      * Set the number of sensor tracks available for the OD of the object.
  174.      * @param tracksAvailable the number of sensor tracks available
  175.      */
  176.     public void setTracksAvailable(final int tracksAvailable) {
  177.         refuseFurtherComments();
  178.         this.tracksAvailable = tracksAvailable;
  179.     }

  180.     /**
  181.      * Get the number of sensor tracks used for the OD of the object.
  182.      * @return the number of sensor tracks used
  183.      */
  184.     public int getTracksUsed() {
  185.         return tracksUsed;
  186.     }

  187.     /**
  188.      * Set the number of sensor tracks used for the OD of the object.
  189.      * @param tracksUsed the number of sensor tracks used
  190.      */
  191.     public void setTracksUsed(final int tracksUsed) {
  192.         refuseFurtherComments();
  193.         this.tracksUsed = tracksUsed;
  194.     }

  195.     /**
  196.      * Get the percentage of residuals accepted in the OD of the object (from 0 to 100).
  197.      * @return the percentage of residuals accepted in the OD
  198.      */
  199.     public double getResidualsAccepted() {
  200.         return residualsAccepted;
  201.     }

  202.     /**
  203.      * Set the percentage of residuals accepted in the OD of the object (from 0 to 100).
  204.      * @param residualsAccepted the percentage of residuals accepted in the OD to be set
  205.      */
  206.     public void setResidualsAccepted(final double residualsAccepted) {
  207.         refuseFurtherComments();
  208.         this.residualsAccepted = residualsAccepted;
  209.     }

  210.     /**
  211.      * Get the weighted Root Mean Square (RMS) of the residuals from a batch least squares OD.
  212.      * @return the weighted Root Mean Square (RMS) of the residuals from a batch least squares OD
  213.      */
  214.     public double getWeightedRMS() {
  215.         return weightedRMS;
  216.     }

  217.     /**
  218.      * Set the weighted Root Mean Square (RMS) of the residuals from a batch least squares OD.
  219.      * @param WeightedRMS the weighted Root Mean Square (RMS) of the residuals from a batch least squares OD
  220.      */
  221.     public void setWeightedRMS(final double WeightedRMS) {
  222.         refuseFurtherComments();
  223.         this.weightedRMS = WeightedRMS;
  224.     }

  225.     /** Get the epoch of the orbit determination used for this message.
  226.      * @return the odEpoch the epoch of the orbit determination used for this message
  227.      */
  228.     public AbsoluteDate getOdEpoch() {
  229.         return odEpoch;
  230.     }

  231.     /** Set the epoch of the orbit determination used for this message.
  232.      * @param odEpoch the odEpoch to set
  233.      */
  234.     public void setOdEpoch(final AbsoluteDate odEpoch) {
  235.         this.odEpoch = odEpoch;
  236.     }

  237. }