OrbitDetermination.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.odm.ocm;

  18. import java.util.Collections;
  19. import java.util.List;

  20. import org.orekit.files.ccsds.definitions.OdMethodFacade;
  21. import org.orekit.files.ccsds.section.CommentsContainer;
  22. import org.orekit.time.AbsoluteDate;

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

  42.     /** Identification number. */
  43.     private String id;

  44.     /** Identification of previous orbit determination. */
  45.     private String prevId;

  46.     /** Orbit determination method. */
  47.     private OdMethodFacade method;

  48.     /** Time tag for orbit determination solved-for state. */
  49.     private AbsoluteDate epoch;

  50.     /** Time elapsed between first accepted observation on epoch. */
  51.     private double timeSinceFirstObservation;

  52.     /** Time elapsed between last accepted observation on epoch. */
  53.     private double timeSinceLastObservation;

  54.     /** Sime span of observation recommended for the OD of the object. */
  55.     private double recommendedOdSpan;

  56.     /** Actual time span used for the OD of the object. */
  57.     private double actualOdSpan;

  58.     /** Number of observations available within the actual OD span. */
  59.     private Integer obsAvailable;

  60.     /** Number of observations accepted within the actual OD span. */
  61.     private Integer obsUsed;

  62.     /** Number of sensors tracks available for the OD within the actual OD span. */
  63.     private Integer tracksAvailable;

  64.     /** Number of sensors tracks accepted for the OD within the actual OD span. */
  65.     private Integer tracksUsed;

  66.     /** Maximum time between observations in the OD of the object. */
  67.     private double maximumObsGap;

  68.     /** Positional error ellipsoid 1σ major eigenvalue at the epoch of OD. */
  69.     private double epochEigenMaj;

  70.     /** Positional error ellipsoid 1σ intermediate eigenvalue at the epoch of OD. */
  71.     private double epochEigenInt;

  72.     /** Positional error ellipsoid 1σ minor eigenvalue at the epoch of OD. */
  73.     private double epochEigenMin;

  74.     /** Maximum predicted major eigenvalue of 1σ positional error ellipsoid over entire time span of the OCM. */
  75.     private double maxPredictedEigenMaj;

  76.     /** Minimum predicted minor eigenvalue of 1σ positional error ellipsoid over entire time span of the OCM. */
  77.     private double minPredictedEigenMin;

  78.     /** Confidence metric. */
  79.     private double confidence;

  80.     /** Generalize Dilution Of Precision. */
  81.     private double gdop;

  82.     /** Number of solved-for states. */
  83.     private Integer solveN;

  84.     /** Description of state elements solved-for. */
  85.     private List<String> solveStates;

  86.     /** Number of consider parameters. */
  87.     private Integer considerN;

  88.     /** Description of consider parameters. */
  89.     private List<String> considerParameters;

  90.     /** Specific Energy Dissipation Rate.
  91.      * @since 12.0
  92.      */
  93.     private double sedr;

  94.     /** Number of sensors used. */
  95.     private Integer sensorsN;

  96.     /** Description of sensors used. */
  97.     private List<String> sensors;

  98.     /** Weighted RMS residual ratio. */
  99.     private double weightedRms;

  100.     /** Observation data types used. */
  101.     private List<String> dataTypes;

  102.     /** Simple constructor.
  103.      */
  104.     public OrbitDetermination() {
  105.         sedr               = Double.NaN;
  106.         solveStates        = Collections.emptyList();
  107.         considerParameters = Collections.emptyList();
  108.         sensors            = Collections.emptyList();
  109.         dataTypes          = Collections.emptyList();
  110.         // In 502.0-B-3 (Table 6-11) these values are optional with no default
  111.         timeSinceFirstObservation = Double.NaN;
  112.         timeSinceLastObservation = Double.NaN;
  113.         recommendedOdSpan = Double.NaN;
  114.         actualOdSpan = Double.NaN;
  115.         maximumObsGap = Double.NaN;
  116.         epochEigenInt = Double.NaN;
  117.         epochEigenMaj = Double.NaN;
  118.         epochEigenMin = Double.NaN;
  119.         maxPredictedEigenMaj = Double.NaN;
  120.         minPredictedEigenMin = Double.NaN;
  121.         confidence = Double.NaN;
  122.         gdop = Double.NaN;
  123.         weightedRms = Double.NaN;
  124.     }

  125.     /** {@inheritDoc} */
  126.     @Override
  127.     public void validate(final double version) {
  128.         super.validate(version);
  129.         checkNotNull(id,     OrbitDeterminationKey.OD_ID.name());
  130.         checkNotNull(method, OrbitDeterminationKey.OD_METHOD.name());
  131.         checkNotNull(epoch,  OrbitDeterminationKey.OD_EPOCH.name());
  132.     }

  133.     /** Get identification number.
  134.      * @return identification number
  135.      */
  136.     public String getId() {
  137.         return id;
  138.     }

  139.     /** Set identification number.
  140.      * @param id identification number
  141.      */
  142.     public void setId(final String id) {
  143.         this.id = id;
  144.     }

  145.     /** Get identification of previous orbit determination.
  146.      * @return identification of previous orbit determination
  147.      */
  148.     public String getPrevId() {
  149.         return prevId;
  150.     }

  151.     /** Set identification of previous orbit determination.
  152.      * @param prevId identification of previous orbit determination
  153.      */
  154.     public void setPrevId(final String prevId) {
  155.         this.prevId = prevId;
  156.     }

  157.     /** Get orbit determination method.
  158.      * @return orbit determination method
  159.      */
  160.     public OdMethodFacade getMethod() {
  161.         return method;
  162.     }

  163.     /** Set orbit determination method.
  164.      * @param method orbit determination method
  165.      */
  166.     public void setMethod(final OdMethodFacade method) {
  167.         this.method = method;
  168.     }

  169.     /** Get time tag for orbit determination solved-for state.
  170.      * @return time tag for orbit determination solved-for state
  171.      */
  172.     public AbsoluteDate getEpoch() {
  173.         return epoch;
  174.     }

  175.     /** Set time tag for orbit determination solved-for state.
  176.      * @param epoch time tag for orbit determination solved-for state
  177.      */
  178.     public void setEpoch(final AbsoluteDate epoch) {
  179.         this.epoch = epoch;
  180.     }

  181.     /** Get time elapsed between first accepted observation on epoch.
  182.      * @return time elapsed between first accepted observation on epoch
  183.      */
  184.     public double getTimeSinceFirstObservation() {
  185.         return timeSinceFirstObservation;
  186.     }

  187.     /** Set time elapsed between first accepted observation on epoch.
  188.      * @param timeSinceFirstObservation time elapsed between first accepted observation on epoch
  189.      */
  190.     public void setTimeSinceFirstObservation(final double timeSinceFirstObservation) {
  191.         this.timeSinceFirstObservation = timeSinceFirstObservation;
  192.     }

  193.     /** Get time elapsed between last accepted observation on epoch.
  194.      * @return time elapsed between last accepted observation on epoch
  195.      */
  196.     public double getTimeSinceLastObservation() {
  197.         return timeSinceLastObservation;
  198.     }

  199.     /** Set time elapsed between last accepted observation on epoch.
  200.      * @param timeSinceLastObservation time elapsed between last accepted observation on epoch
  201.      */
  202.     public void setTimeSinceLastObservation(final double timeSinceLastObservation) {
  203.         this.timeSinceLastObservation = timeSinceLastObservation;
  204.     }

  205.     /** Get time span of observation recommended for the OD of the object.
  206.      * @return time span of observation recommended for the OD of the object
  207.      */
  208.     public double getRecommendedOdSpan() {
  209.         return recommendedOdSpan;
  210.     }

  211.     /** Set time span of observation recommended for the OD of the object.
  212.      * @param recommendedOdSpan time span of observation recommended for the OD of the object
  213.      */
  214.     public void setRecommendedOdSpan(final double recommendedOdSpan) {
  215.         this.recommendedOdSpan = recommendedOdSpan;
  216.     }

  217.     /** Get actual time span used for the OD of the object.
  218.      * @return actual time span used for the OD of the object
  219.      */
  220.     public double getActualOdSpan() {
  221.         return actualOdSpan;
  222.     }

  223.     /** Set actual time span used for the OD of the object.
  224.      * @param actualOdSpan actual time span used for the OD of the object
  225.      */
  226.     public void setActualOdSpan(final double actualOdSpan) {
  227.         this.actualOdSpan = actualOdSpan;
  228.     }

  229.     /** Get number of observations available within the actual OD span.
  230.      * @return number of observations available within the actual OD span
  231.      */
  232.     public Integer getObsAvailable() {
  233.         return obsAvailable;
  234.     }

  235.     /** Set number of observations available within the actual OD span.
  236.      * @param obsAvailable number of observations available within the actual OD span
  237.      */
  238.     public void setObsAvailable(final Integer obsAvailable) {
  239.         this.obsAvailable = obsAvailable;
  240.     }

  241.     /** Get number of observations accepted within the actual OD span.
  242.      * @return number of observations accepted within the actual OD span
  243.      */
  244.     public Integer getObsUsed() {
  245.         return obsUsed;
  246.     }

  247.     /** Set number of observations accepted within the actual OD span.
  248.      * @param obsUsed number of observations accepted within the actual OD span
  249.      */
  250.     public void setObsUsed(final Integer obsUsed) {
  251.         this.obsUsed = obsUsed;
  252.     }

  253.     /** Get number of sensors tracks available for the OD within the actual OD span.
  254.      * @return number of sensors tracks available for the OD within the actual OD span
  255.      */
  256.     public Integer getTracksAvailable() {
  257.         return tracksAvailable;
  258.     }

  259.     /** Set number of sensors tracks available for the OD within the actual OD span.
  260.      * @param tracksAvailable number of sensors tracks available for the OD within the actual OD span
  261.      */
  262.     public void setTracksAvailable(final Integer tracksAvailable) {
  263.         this.tracksAvailable = tracksAvailable;
  264.     }

  265.     /** Get number of sensors tracks accepted for the OD within the actual OD span.
  266.      * @return number of sensors tracks accepted for the OD within the actual OD span
  267.      */
  268.     public Integer getTracksUsed() {
  269.         return tracksUsed;
  270.     }

  271.     /** Set number of sensors tracks accepted for the OD within the actual OD span.
  272.      * @param tracksUsed number of sensors tracks accepted for the OD within the actual OD span
  273.      */
  274.     public void setTracksUsed(final Integer tracksUsed) {
  275.         this.tracksUsed = tracksUsed;
  276.     }

  277.     /** Get maximum time between observations in the OD of the object.
  278.      * @return maximum time between observations in the OD of the object
  279.      */
  280.     public double getMaximumObsGap() {
  281.         return maximumObsGap;
  282.     }

  283.     /** Set maximum time between observations in the OD of the object.
  284.      * @param maximumObsGap maximum time between observations in the OD of the object
  285.      */
  286.     public void setMaximumObsGap(final double maximumObsGap) {
  287.         this.maximumObsGap = maximumObsGap;
  288.     }

  289.     /** Get positional error ellipsoid 1σ major eigenvalue at the epoch of OD.
  290.      * @return positional error ellipsoid 1σ major eigenvalue at the epoch of OD
  291.      */
  292.     public double getEpochEigenMaj() {
  293.         return epochEigenMaj;
  294.     }

  295.     /** Set positional error ellipsoid 1σ major eigenvalue at the epoch of OD.
  296.      * @param epochEigenMaj positional error ellipsoid 1σ major eigenvalue at the epoch of OD
  297.      */
  298.     public void setEpochEigenMaj(final double epochEigenMaj) {
  299.         this.epochEigenMaj = epochEigenMaj;
  300.     }

  301.     /** Get positional error ellipsoid 1σ intermediate eigenvalue at the epoch of OD.
  302.      * @return positional error ellipsoid 1σ intermediate eigenvalue at the epoch of OD
  303.      */
  304.     public double getEpochEigenInt() {
  305.         return epochEigenInt;
  306.     }

  307.     /** Set positional error ellipsoid 1σ intermediate eigenvalue at the epoch of OD.
  308.      * @param epochEigenInt positional error ellipsoid 1σ intermediate eigenvalue at the epoch of OD
  309.      */
  310.     public void setEpochEigenInt(final double epochEigenInt) {
  311.         this.epochEigenInt = epochEigenInt;
  312.     }

  313.     /** Get positional error ellipsoid 1σ minor eigenvalue at the epoch of OD.
  314.      * @return positional error ellipsoid 1σ minor eigenvalue at the epoch of OD
  315.      */
  316.     public double getEpochEigenMin() {
  317.         return epochEigenMin;
  318.     }

  319.     /** Set positional error ellipsoid 1σ minor eigenvalue at the epoch of OD.
  320.      * @param epochEigenMin positional error ellipsoid 1σ minor eigenvalue at the epoch of OD
  321.      */
  322.     public void setEpochEigenMin(final double epochEigenMin) {
  323.         this.epochEigenMin = epochEigenMin;
  324.     }

  325.     /** Get maximum predicted major eigenvalue of 1σ positional error ellipsoid over entire time span of the OCM.
  326.      * @return maximum predicted major eigenvalue of 1σ positional error ellipsoid over entire time span of the OCM
  327.      */
  328.     public double getMaxPredictedEigenMaj() {
  329.         return maxPredictedEigenMaj;
  330.     }

  331.     /** Set maximum predicted major eigenvalue of 1σ positional error ellipsoid over entire time span of the OCM.
  332.      * @param maxPredictedEigenMaj maximum predicted major eigenvalue of 1σ positional error ellipsoid over entire time span of the OCM
  333.      */
  334.     public void setMaxPredictedEigenMaj(final double maxPredictedEigenMaj) {
  335.         this.maxPredictedEigenMaj = maxPredictedEigenMaj;
  336.     }

  337.     /** Get minimum predicted minor eigenvalue of 1σ positional error ellipsoid over entire time span of the OCM.
  338.      * @return minimum predicted v eigenvalue of 1σ positional error ellipsoid over entire time span of the OCM
  339.      */
  340.     public double getMinPredictedEigenMin() {
  341.         return minPredictedEigenMin;
  342.     }

  343.     /** Set minimum predicted minor eigenvalue of 1σ positional error ellipsoid over entire time span of the OCM.
  344.      * @param minPredictedEigenMin minimum predicted minor eigenvalue of 1σ positional error ellipsoid over entire time span of the OCM
  345.      */
  346.     public void setMinPredictedEigenMin(final double minPredictedEigenMin) {
  347.         this.minPredictedEigenMin = minPredictedEigenMin;
  348.     }

  349.     /** Get confidence metric.
  350.      * @return confidence metric
  351.      */
  352.     public double getConfidence() {
  353.         return confidence;
  354.     }

  355.     /** Set confidence metric.
  356.      * @param confidence confidence metric
  357.      */
  358.     public void setConfidence(final double confidence) {
  359.         this.confidence = confidence;
  360.     }

  361.     /** Get generalize Dilution Of Precision.
  362.      * @return generalize Dilution Of Precision
  363.      */
  364.     public double getGdop() {
  365.         return gdop;
  366.     }

  367.     /** Set generalize Dilution Of Precision.
  368.      * @param gdop generalize Dilution Of Precision
  369.      */
  370.     public void setGdop(final double gdop) {
  371.         this.gdop = gdop;
  372.     }

  373.     /** Get number of solved-for states.
  374.      * @return number of solved-for states
  375.      */
  376.     public Integer getSolveN() {
  377.         return solveN;
  378.     }

  379.     /** Set number of solved-for states.
  380.      * @param solveN number of solved-for states
  381.      */
  382.     public void setSolveN(final Integer solveN) {
  383.         this.solveN = solveN;
  384.     }

  385.     /** Get description of state elements solved-for.
  386.      * @return description of state elements solved-for
  387.      */
  388.     public List<String> getSolveStates() {
  389.         return solveStates;
  390.     }

  391.     /** Set description of state elements solved-for.
  392.      * @param solveStates description of state elements solved-for
  393.      */
  394.     public void setSolveStates(final List<String> solveStates) {
  395.         this.solveStates = solveStates;
  396.     }

  397.     /** Get number of consider parameters.
  398.      * @return number of consider parameters
  399.      */
  400.     public Integer getConsiderN() {
  401.         return considerN;
  402.     }

  403.     /** Set number of consider parameters.
  404.      * @param considerN number of consider parameters
  405.      */
  406.     public void setConsiderN(final Integer considerN) {
  407.         this.considerN = considerN;
  408.     }

  409.     /** Get description of consider parameters.
  410.      * @return description of consider parameters
  411.      */
  412.     public List<String> getConsiderParameters() {
  413.         return considerParameters;
  414.     }

  415.     /** Set description of consider parameters.
  416.      * @param considerParameters description of consider parameters
  417.      */
  418.     public void setConsiderParameters(final List<String> considerParameters) {
  419.         this.considerParameters = considerParameters;
  420.     }

  421.     /** Get Specific Energy Dissipation Rate.
  422.      * @return Specific Energy Dissipation Rate
  423.      * @since 12.0
  424.      */
  425.     public double getSedr() {
  426.         return sedr;
  427.     }

  428.     /** Set Specific Energy Dissipation Rate.
  429.      * @param sedr Specific Energy Dissipation Rate (W/kg)
  430.      * @since 12.0
  431.      */
  432.     public void setSedr(final double sedr) {
  433.         this.sedr = sedr;
  434.     }

  435.     /** Get number of sensors used.
  436.      * @return number of sensors used
  437.      */
  438.     public Integer getSensorsN() {
  439.         return sensorsN;
  440.     }

  441.     /** Set number of sensors used.
  442.      * @param sensorsN number of sensors used
  443.      */
  444.     public void setSensorsN(final Integer sensorsN) {
  445.         this.sensorsN = sensorsN;
  446.     }

  447.     /** Get description of sensors used.
  448.      * @return description of sensors used
  449.      */
  450.     public List<String> getSensors() {
  451.         return sensors;
  452.     }

  453.     /** Set description of sensors used.
  454.      * @param sensors description of sensors used
  455.      */
  456.     public void setSensors(final List<String> sensors) {
  457.         this.sensors = sensors;
  458.     }

  459.     /** Get weighted RMS residual ratio.
  460.      * @return weighted RMS residual ratio
  461.      */
  462.     public double getWeightedRms() {
  463.         return weightedRms;
  464.     }

  465.     /** Set weighted RMS residual ratio.
  466.      * @param weightedRms weighted RMS residual ratio
  467.      */
  468.     public void setWeightedRms(final double weightedRms) {
  469.         this.weightedRms = weightedRms;
  470.     }

  471.     /** Get observation data types used.
  472.      * @return observation data types used
  473.      */
  474.     public List<String> getDataTypes() {
  475.         return dataTypes;
  476.     }

  477.     /** Set observation data types used.
  478.      * @param dataTypes observation data types used
  479.      */
  480.     public void setDataTypes(final List<String> dataTypes) {
  481.         this.dataTypes = dataTypes;
  482.     }

  483. }