AttitudeCovarianceHistoryMetadata.java

  1. /* Copyright 2022-2025 Luc Maisonobe
  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.adm.acm;

  18. import org.orekit.files.ccsds.definitions.FrameFacade;
  19. import org.orekit.files.ccsds.section.CommentsContainer;

  20. /** Metadata for covariance history.
  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.  * @author Luc Maisonobe
  36.  * @since 12.0
  37.  */
  38. public class AttitudeCovarianceHistoryMetadata extends CommentsContainer {

  39.     /** Covariance identification number. */
  40.     private String covID;

  41.     /** Identification number of previous covariance. */
  42.     private String covPrevID;

  43.     /** Basis of this covariance time history data. */
  44.     private String covBasis;

  45.     /** Identification number of the covariance determination or simulation upon which this covariance is based. */
  46.     private String covBasisID;

  47.     /** Reference frame of the covariance. */
  48.     private FrameFacade covReferenceFrame;

  49.     /** Covariance element set type. */
  50.     private AttitudeCovarianceType covType;

  51.     /** Empty constructor.
  52.      * <p>
  53.      * This constructor is not strictly necessary, but it prevents spurious
  54.      * javadoc warnings with JDK 18 and later.
  55.      * </p>
  56.      * @since 12.0
  57.      */
  58.     public AttitudeCovarianceHistoryMetadata() {
  59.         // nothing to do
  60.     }

  61.     /** {@inheritDoc} */
  62.     @Override
  63.     public void validate(final double version) {
  64.         super.validate(version);
  65.         checkNotNull(covType, AttitudeCovarianceHistoryMetadataKey.COV_TYPE.name());
  66.     }

  67.     /** Get covariance identification number.
  68.      * @return covariance identification number
  69.      */
  70.     public String getCovID() {
  71.         return covID;
  72.     }

  73.     /** Set covariance identification number.
  74.      * @param covID covariance identification number
  75.      */
  76.     public void setCovID(final String covID) {
  77.         refuseFurtherComments();
  78.         this.covID = covID;
  79.     }

  80.     /** Get identification number of previous covariance.
  81.      * @return identification number of previous covariance
  82.      */
  83.     public String getCovPrevID() {
  84.         return covPrevID;
  85.     }

  86.     /** Set identification number of previous covariance.
  87.      * @param covPrevID identification number of previous covariance
  88.      */
  89.     public void setCovPrevID(final String covPrevID) {
  90.         refuseFurtherComments();
  91.         this.covPrevID = covPrevID;
  92.     }

  93.     /** Get basis of this covariance time history data.
  94.      * @return basis of this covariance time history data
  95.      */
  96.     public String getCovBasis() {
  97.         return covBasis;
  98.     }

  99.     /** Set basis of this covariance time history data.
  100.      * @param covBasis basis of this covariance time history data
  101.      */
  102.     public void setCovBasis(final String covBasis) {
  103.         refuseFurtherComments();
  104.         this.covBasis = covBasis;
  105.     }

  106.     /** Get identification number of the orbit determination or simulation upon which this covariance is based.
  107.      * @return identification number of the orbit determination or simulation upon which this covariance is based
  108.      */
  109.     public String getCovBasisID() {
  110.         return covBasisID;
  111.     }

  112.     /** Set identification number of the orbit determination or simulation upon which this covariance is based.
  113.      * @param covBasisID identification number of the orbit determination or simulation upon which this covariance is based
  114.      */
  115.     public void setCovBasisID(final String covBasisID) {
  116.         refuseFurtherComments();
  117.         this.covBasisID = covBasisID;
  118.     }

  119.     /** Get reference frame of the covariance.
  120.      * @return reference frame of the covariance
  121.      */
  122.     public FrameFacade getCovReferenceFrame() {
  123.         return covReferenceFrame;
  124.     }

  125.     /** Set reference frame of the covariance.
  126.      * @param covReferenceFrame the reference frame to be set
  127.      */
  128.     public void setCovReferenceFrame(final FrameFacade covReferenceFrame) {
  129.         refuseFurtherComments();
  130.         this.covReferenceFrame = covReferenceFrame;
  131.     }

  132.     /** Get covariance element set type.
  133.      * @return covariance element set type
  134.      */
  135.     public AttitudeCovarianceType getCovType() {
  136.         return covType;
  137.     }

  138.     /** Set covariance element set type.
  139.      * @param covType covariance element set type
  140.      */
  141.     public void setCovType(final AttitudeCovarianceType covType) {
  142.         refuseFurtherComments();
  143.         this.covType = covType;
  144.     }

  145. }