XYZCovariance.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.hipparchus.linear.MatrixUtils;
  19. import org.hipparchus.linear.RealMatrix;
  20. import org.orekit.errors.OrekitException;
  21. import org.orekit.errors.OrekitMessages;
  22. import org.orekit.files.ccsds.section.CommentsContainer;

  23. /**
  24.  * Container for XYZ covariance matrix data.
  25.  * <p>
  26.  * Beware that the Orekit getters and setters all rely on SI units. The parsers
  27.  * and writers take care of converting these SI units into CCSDS mandatory units.
  28.  * The {@link org.orekit.utils.units.Unit Unit} class provides useful
  29.  * {@link org.orekit.utils.units.Unit#fromSI(double) fromSi} and
  30.  * {@link org.orekit.utils.units.Unit#toSI(double) toSI} methods in case the callers
  31.  * already use CCSDS units instead of the API SI units. The general-purpose
  32.  * {@link org.orekit.utils.units.Unit Unit} class (without an 's') and the
  33.  * CCSDS-specific {@link org.orekit.files.ccsds.definitions.Units Units} class
  34.  * (with an 's') also provide some predefined units. These predefined units and the
  35.  * {@link org.orekit.utils.units.Unit#fromSI(double) fromSi} and
  36.  * {@link org.orekit.utils.units.Unit#toSI(double) toSI} conversion methods are indeed
  37.  * what the parsers and writers use for the conversions.
  38.  * </p>
  39.  * <p>
  40.  * This class as a RealMatrix as attribute which can be access with
  41.  * {@code getXYZCovariaxMatrix} method. Beware that there are thus two ways to modify
  42.  * the XYZ covariance : {@code setC…} ({@code setCxx}, {@code setCyx}…) which should be
  43.  * prioritized and {@code getXYZCovariaxMatrix.setEntry(row, col, value)}.
  44.  * </p>
  45.  * <p>
  46.  * The XYZ Covariance Matrix is only provided if {@link CdmMetadataKey#ALT_COV_TYPE} is
  47.  * {@link AltCovarianceType#XYZ}, otherwise its terms will return {@code NaN}.
  48.  * </p>
  49.  * <p>
  50.  * When available, the matrix is given in the 9×9 Lower Triangular Form. All parameters
  51.  * of the 6×6 position/velocity submatrix are mandatory. The remaining elements will
  52.  * return {@code NaN} if not provided.
  53.  * </p>
  54.  */
  55. public class XYZCovariance extends CommentsContainer {

  56.     /** XYZ covariance matrix. */
  57.     private final RealMatrix covarianceMatrix;

  58.     /** Flag indicating whether the alternate covariance type set in the CDM Object metadata section is XYZ. */
  59.     private final boolean covXYZset;

  60.     /** Simple constructor. To update matrix value there are 2 ways to modify the XYZ
  61.      * covariance : setC... ( setCxx, setCyx ...) which should be prioritized and
  62.      * getXYZCovariaxMatrix.setEntry(row, col, value).
  63.      * <p> The XYZ Covariance Matrix is only provided if {@link CdmMetadataKey#ALT_COV_TYPE} is {@link AltCovarianceType#XYZ}, otherwise
  64.      * its terms will return NaN. </p>
  65.      * <p> When available, the matrix is given in the 9×9 Lower Triangular Form. All parameters of the 6×6 position/velocity submatrix
  66.      * are mandatory. The remaining elements will return NaN if not provided.</p>
  67.      * @param covXYZset Flag indicating whether the alternate covariance type set in the CDM Object metadata section is XYZ.
  68.      */
  69.     public XYZCovariance(final boolean covXYZset) {
  70.         this.covXYZset = covXYZset;
  71.         covarianceMatrix = MatrixUtils.createRealMatrix(9, 9);
  72.         for (int i = 0; i < covarianceMatrix.getRowDimension(); ++i) {
  73.             for (int j = 0; j <= i; ++j) {
  74.                 covarianceMatrix.setEntry(i, j, Double.NaN);
  75.             }
  76.         }

  77.     }

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

  82.         // Conditional on ALT_COV_TYPE = XYZ
  83.         if (!isCovXYZset()) {
  84.             throw new OrekitException(OrekitMessages.CCSDS_DATE_INVALID_PREAMBLE_FIELD, CdmMetadataKey.ALT_COV_TYPE);
  85.         }

  86.         // We only check values that are mandatory in a cdm file
  87.         checkNotNaN(getCxx(),              XYZCovarianceKey.CX_X.name());
  88.         checkNotNaN(getCyx(),              XYZCovarianceKey.CY_X.name());
  89.         checkNotNaN(getCyy(),              XYZCovarianceKey.CY_Y.name());
  90.         checkNotNaN(getCzx(),              XYZCovarianceKey.CZ_X.name());
  91.         checkNotNaN(getCzy(),              XYZCovarianceKey.CZ_Y.name());
  92.         checkNotNaN(getCzz(),              XYZCovarianceKey.CZ_Z.name());
  93.         checkNotNaN(getCxdotx(),           XYZCovarianceKey.CXDOT_X.name());
  94.         checkNotNaN(getCxdoty(),           XYZCovarianceKey.CXDOT_Y.name());
  95.         checkNotNaN(getCxdotz(),           XYZCovarianceKey.CXDOT_Z.name());
  96.         checkNotNaN(getCxdotxdot(),        XYZCovarianceKey.CXDOT_XDOT.name());
  97.         checkNotNaN(getCydotx(),           XYZCovarianceKey.CYDOT_X.name());
  98.         checkNotNaN(getCydoty(),           XYZCovarianceKey.CYDOT_Y.name());
  99.         checkNotNaN(getCydotz(),           XYZCovarianceKey.CYDOT_Z.name());
  100.         checkNotNaN(getCydotxdot(),        XYZCovarianceKey.CYDOT_XDOT.name());
  101.         checkNotNaN(getCydotydot(),        XYZCovarianceKey.CYDOT_YDOT.name());
  102.         checkNotNaN(getCzdotx(),           XYZCovarianceKey.CZDOT_X.name());
  103.         checkNotNaN(getCzdoty(),           XYZCovarianceKey.CZDOT_Y.name());
  104.         checkNotNaN(getCzdotz(),           XYZCovarianceKey.CZDOT_Z.name());
  105.         checkNotNaN(getCzdotxdot(),        XYZCovarianceKey.CZDOT_XDOT.name());
  106.         checkNotNaN(getCzdotydot(),        XYZCovarianceKey.CZDOT_YDOT.name());
  107.         checkNotNaN(getCzdotzdot(),        XYZCovarianceKey.CZDOT_ZDOT.name());
  108.     }

  109.     /** Set an entry in the XYZ covariance matrix.
  110.      * <p>
  111.      * Both m(j, k) and m(k, j) are set.
  112.      * </p>
  113.      * @param j row index (must be between 0 and 5 (inclusive)
  114.      * @param k column index (must be between 0 and 5 (inclusive)
  115.      * @param entry value of the matrix entry
  116.      */
  117.     public void setCovarianceMatrixEntry(final int j, final int k, final double entry) {
  118.         covarianceMatrix.setEntry(j, k, entry);
  119.         covarianceMatrix.setEntry(k, j, entry);
  120.     }

  121.     /**
  122.      * Get the XYZ covariance matrix.
  123.      * <p> The XYZ Covariance Matrix is only provided if {@link CdmMetadataKey#ALT_COV_TYPE} is {@link AltCovarianceType#XYZ}, otherwise
  124.      * its terms will return NaN. </p>
  125.      * <p> When available, the matrix is given in the 9×9 Lower Triangular Form. All parameters of the 6×6 position/velocity submatrix
  126.      * are mandatory. The remaining elements will return NaN if not provided.</p>
  127.      * @return the XYZ covariance matrix
  128.      */
  129.     public RealMatrix getXYZCovarianceMatrix() {
  130.         return covarianceMatrix;
  131.     }

  132.     /**
  133.      * Get the object [1,1] in covariance matrix (with index starting at 1).
  134.      * @return the object [1,1] in covariance matrix (in m²)
  135.      */
  136.     public double getCxx() {
  137.         return covarianceMatrix.getEntry(0, 0);
  138.     }

  139.     /**
  140.      * Set the object [1,1] in covariance matrix (with index starting at 1).
  141.      * @param CXX = object [1,1] in covariance matrix (in m²)
  142.      */
  143.     public void setCxx(final double CXX) {
  144.         refuseFurtherComments();

  145.         // Conditional on ALT_COV_TYPE = XYZ
  146.         if (!isCovXYZset()) {
  147.             throw new OrekitException(OrekitMessages.CCSDS_DATE_INVALID_PREAMBLE_FIELD, CdmMetadataKey.ALT_COV_TYPE);
  148.         }

  149.         setCovarianceMatrixEntry(0, 0, CXX);
  150.     }

  151.     /**
  152.      * Get the object [2,1] in covariance matrix (with index starting at 1).
  153.      * @return the object [2,1] in covariance matrix (in m²)
  154.      */
  155.     public double getCyx() {
  156.         return covarianceMatrix.getEntry(1, 0);
  157.     }

  158.     /**
  159.      * Set the object [2,1] in covariance matrix (with index starting at 1).
  160.      * @param CYX = object [2,1] in covariance matrix (in m²)
  161.      */
  162.     public void setCyx(final double CYX) {
  163.         refuseFurtherComments();
  164.         setCovarianceMatrixEntry(1, 0, CYX);
  165.     }

  166.     /**
  167.      * Get the object [2,2] in covariance matrix (with index starting at 1).
  168.      * @return the object [2,2] in covariance matrix (in m²)
  169.      */
  170.     public double getCyy() {
  171.         return covarianceMatrix.getEntry(1, 1);
  172.     }

  173.     /**
  174.      * Set the object [2,2] in covariance matrix (with index starting at 1).
  175.      * @param CYY = object [2,2] in covariance matrix (in m²)
  176.      */
  177.     public void setCyy(final double CYY) {
  178.         refuseFurtherComments();
  179.         setCovarianceMatrixEntry(1, 1, CYY);
  180.     }

  181.     /**
  182.      * Get the object [3,1] in covariance matrix (with index starting at 1).
  183.      * @return the object [3,1] in covariance matrix (in m²)
  184.      */
  185.     public double getCzx() {
  186.         return covarianceMatrix.getEntry(2, 0);
  187.     }

  188.     /**
  189.      * Set the object [3,1] in covariance matrix (with index starting at 1).
  190.      * @param CZX = object [3,1] in covariance matrix (in m²)
  191.      */
  192.     public void setCzx(final double CZX) {
  193.         refuseFurtherComments();
  194.         setCovarianceMatrixEntry(2, 0, CZX);
  195.     }

  196.     /**
  197.      * Get the object [3,2] in covariance matrix (with index starting at 1).
  198.      * @return the object [3,2] in covariance matrix (in m²)
  199.      */
  200.     public double getCzy() {
  201.         return covarianceMatrix.getEntry(2, 1);
  202.     }

  203.     /**
  204.      * Set the object [3,2] in covariance matrix (with index starting at 1).
  205.      * @param CZY = object [3,2] in covariance matrix (in m²)
  206.      */
  207.     public void setCzy(final double CZY) {
  208.         refuseFurtherComments();
  209.         setCovarianceMatrixEntry(2, 1, CZY);
  210.     }

  211.     /**
  212.      * Get the object [3,3] in covariance matrix (with index starting at 1).
  213.      * @return the object [3,3] in covariance matrix (in m²)
  214.      */
  215.     public double getCzz() {
  216.         return covarianceMatrix.getEntry(2, 2);
  217.     }

  218.     /**
  219.      * Set the object [3,3] in covariance matrix (with index starting at 1).
  220.      * @param CZZ = object [3,3] in covariance matrix (in m²)
  221.      */
  222.     public void setCzz(final double CZZ) {
  223.         refuseFurtherComments();
  224.         setCovarianceMatrixEntry(2, 2, CZZ);
  225.     }

  226.     /**
  227.      * Get the object [4,1] in covariance matrix (with index starting at 1).
  228.      * @return the object [4,1] in covariance matrix (in m²/s)
  229.      */
  230.     public double getCxdotx() {
  231.         return covarianceMatrix.getEntry(3, 0);
  232.     }

  233.     /**
  234.      * Set the object [4,1] in covariance matrix (with index starting at 1).
  235.      * @param CXdotX = object [4,1] in covariance matrix (in m²/s)
  236.      */
  237.     public void setCxdotx(final double CXdotX) {
  238.         refuseFurtherComments();
  239.         setCovarianceMatrixEntry(3, 0, CXdotX);
  240.     }

  241.     /**
  242.      * Get the object [4,2] in covariance matrix (with index starting at 1).
  243.      * @return the object [4,2] in covariance matrix (in m²/s)
  244.      */
  245.     public double getCxdoty() {
  246.         return covarianceMatrix.getEntry(3, 1);
  247.     }

  248.     /**
  249.      * Set the object [4, 2] in covariance matrix (with index starting at 1).
  250.      * @param CXdotY = object [4, 2] in covariance matrix (in m²/s)
  251.      */
  252.     public void setCxdoty(final double CXdotY) {
  253.         refuseFurtherComments();
  254.         setCovarianceMatrixEntry(3, 1, CXdotY);
  255.     }

  256.     /**
  257.      * Get the object [4, 3] in covariance matrix (with index starting at 1) .
  258.      * @return the object [4, 3] in covariance matrix (in m²/s)
  259.      */
  260.     public double getCxdotz() {
  261.         return covarianceMatrix.getEntry(3, 2);
  262.     }

  263.     /**
  264.      * Set the object [4, 3] in covariance matrix (with index starting at 1).
  265.      * @param CXdotZ = object [4,3] in covariance matrix (in m²/s)
  266.      */
  267.     public void setCxdotz(final double CXdotZ) {
  268.         refuseFurtherComments();
  269.         setCovarianceMatrixEntry(3, 2, CXdotZ);
  270.     }

  271.     /**
  272.      * Get the object [4, 4] in covariance matrix (with index starting at 1).
  273.      * @return the object [4, 4] in covariance matrix (in m²/s²)
  274.      */
  275.     public double getCxdotxdot() {
  276.         return covarianceMatrix.getEntry(3, 3);
  277.     }

  278.     /**
  279.      * Set the object [4, 4] in covariance matrix (with index starting at 1).
  280.      * @param CXdotXdot = object [4, 4] in covariance matrix (in m²/s²)
  281.      */
  282.     public void setCxdotxdot(final double CXdotXdot) {
  283.         refuseFurtherComments();
  284.         setCovarianceMatrixEntry(3, 3, CXdotXdot);
  285.     }

  286.     /**
  287.      * Get the object [5, 1] in covariance matrix (with index starting at 1).
  288.      * @return the object [5, 1] in covariance matrix (in m²/s)
  289.      */
  290.     public double getCydotx() {
  291.         return covarianceMatrix.getEntry(4, 0);
  292.     }

  293.     /**
  294.      * Set the object [5,1] in covariance matrix (with index starting at 1).
  295.      * @param CYdotX = object [5,1] in covariance matrix (in m²/s)
  296.      */
  297.     public void setCydotx(final double CYdotX) {
  298.         refuseFurtherComments();
  299.         setCovarianceMatrixEntry(4, 0, CYdotX);
  300.     }

  301.     /**
  302.      * Get the object [5,2] in covariance matrix (with index starting at 1).
  303.      * @return the object [5,2] in covariance matrix (in m²/s)
  304.      */
  305.     public double getCydoty() {
  306.         return covarianceMatrix.getEntry(4, 1);
  307.     }

  308.     /**
  309.      * Set the object [5,2] in covariance matrix (with index starting at 1).
  310.      * @param CYdotY = object [5,2] in covariance matrix (in m²/s)
  311.      */
  312.     public void setCydoty(final double CYdotY) {
  313.         refuseFurtherComments();
  314.         setCovarianceMatrixEntry(4, 1, CYdotY);
  315.     }

  316.     /**
  317.      * Get the object [5,3] in covariance matrix (with index starting at 1).
  318.      * @return the object [5,3] in covariance matrix (in m²/s)
  319.      */
  320.     public double getCydotz() {
  321.         return covarianceMatrix.getEntry(4, 2);
  322.     }

  323.     /**
  324.      * Set the object [5,3] in covariance matrix (with index starting at 1).
  325.      * @param CYdotZ = object [5,3] in covariance matrix (in m²/s)
  326.      */
  327.     public void setCydotz(final double CYdotZ) {
  328.         refuseFurtherComments();
  329.         setCovarianceMatrixEntry(4, 2, CYdotZ);
  330.     }

  331.     /**
  332.      * Get the object [5,4] in covariance matrix (with index starting at 1).
  333.      * @return the object [5,4] in covariance matrix (in m²/s²)
  334.      */
  335.     public double getCydotxdot() {
  336.         return covarianceMatrix.getEntry(4, 3);
  337.     }

  338.     /**
  339.      * Set the object [5,4] in covariance matrix (with index starting at 1).
  340.      * @param CYdotXdot = object [5,4] in covariance matrix (in m²/s²)
  341.      */
  342.     public void setCydotxdot(final double CYdotXdot) {
  343.         refuseFurtherComments();
  344.         setCovarianceMatrixEntry(4, 3, CYdotXdot);
  345.     }

  346.     /**
  347.      * Get the object [5,5] in covariance matrix (with index starting at 1).
  348.      * @return the object [5,5] in covariance matrix (in m²/s²)
  349.      */
  350.     public double getCydotydot() {
  351.         return covarianceMatrix.getEntry(4, 4);
  352.     }

  353.     /**
  354.      * Set the object [5,5] in covariance matrix (with index starting at 1).
  355.      * @param CYdotYdot = object [5,5] in covariance matrix (in m²/s²)
  356.      */
  357.     public void setCydotydot(final double CYdotYdot) {
  358.         refuseFurtherComments();
  359.         setCovarianceMatrixEntry(4, 4, CYdotYdot);
  360.     }

  361.     /**
  362.      * Get the object [6,1] in covariance matrix (with index starting at 1).
  363.      * @return the object [6,1] in covariance matrix (in m²/s)
  364.      */
  365.     public double getCzdotx() {
  366.         return covarianceMatrix.getEntry(5, 0);
  367.     }

  368.     /**
  369.      * Set the object [6,1] in covariance matrix (with index starting at 1).
  370.      * @param CZdotX = object [6,1] in covariance matrix (in m²/s)
  371.      */
  372.     public void setCzdotx(final double CZdotX) {
  373.         refuseFurtherComments();
  374.         setCovarianceMatrixEntry(5, 0, CZdotX);
  375.     }

  376.     /**
  377.      * Get the object [6,2] in covariance matrix (with index starting at 1).
  378.      * @return the object [6,2] in covariance matrix (in m²/s)
  379.      */
  380.     public double getCzdoty() {
  381.         return covarianceMatrix.getEntry(5, 1);
  382.     }

  383.     /**
  384.      * Set the object [6,2] in covariance matrix (with index starting at 1).
  385.      * @param CZdotY = object [6,2] in covariance matrix (in m²/s)
  386.      */
  387.     public void setCzdoty(final double CZdotY) {
  388.         refuseFurtherComments();
  389.         setCovarianceMatrixEntry(5, 1, CZdotY);
  390.     }

  391.     /**
  392.      * Get the object [6,3] in covariance matrix (with index starting at 1).
  393.      * @return the object [6,3] in covariance matrix (in m²/s)
  394.      */
  395.     public double getCzdotz() {
  396.         return covarianceMatrix.getEntry(5, 2);
  397.     }

  398.     /**
  399.      * Set the object [6,3] in covariance matrix (with index starting at 1).
  400.      * @param CZdotZ = object [6,3] in covariance matrix (in m²/s)
  401.      */
  402.     public void setCzdotz(final double CZdotZ) {
  403.         refuseFurtherComments();
  404.         setCovarianceMatrixEntry(5, 2, CZdotZ);
  405.     }

  406.     /**
  407.      * Get the object [6,4] in covariance matrix (with index starting at 1).
  408.      * @return the object [6,4] in covariance matrix (in m²/s²)
  409.      */
  410.     public double getCzdotxdot() {
  411.         return covarianceMatrix.getEntry(5, 3);
  412.     }

  413.     /**
  414.      * Set the object [6,4] in covariance matrix (with index starting at 1).
  415.      * @param CZdotXdot = object [6,4] in covariance matrix (in m²/s²)
  416.      */
  417.     public void setCzdotxdot(final double CZdotXdot) {
  418.         refuseFurtherComments();
  419.         setCovarianceMatrixEntry(5, 3, CZdotXdot);
  420.     }

  421.     /**
  422.      * Get the object [6,5] in covariance matrix (with index starting at 1).
  423.      * @return the object [6,5] in covariance matrix (in m²/s²)
  424.      */
  425.     public double getCzdotydot() {
  426.         return covarianceMatrix.getEntry(5, 4);
  427.     }

  428.     /**
  429.      * Set the object [6,5] in covariance matrix (with index starting at 1).
  430.      * @param CZdotYdot = object [6,5] in covariance matrix (in m²/s²)
  431.      */
  432.     public void setCzdotydot(final double CZdotYdot) {
  433.         refuseFurtherComments();
  434.         setCovarianceMatrixEntry(5, 4, CZdotYdot);
  435.     }

  436.     /**
  437.      * Get the object [6,6] in covariance matrix (with index starting at 1).
  438.      * @return the object [6,6] in covariance matrix (in m²/s²)
  439.      */
  440.     public double getCzdotzdot() {
  441.         return covarianceMatrix.getEntry(5, 5);
  442.     }

  443.     /**
  444.      * Set the object [6,6] in covariance matrix (with index starting at 1).
  445.      * @param CZdotZdot = object [6,6] in covariance matrix (in m²/s²)
  446.      */
  447.     public void setCzdotzdot(final double CZdotZdot) {
  448.         refuseFurtherComments();
  449.         setCovarianceMatrixEntry(5, 5, CZdotZdot);
  450.     }

  451.     /**
  452.      * Get the object [7,1] in covariance matrix (with index starting at 1).
  453.      * @return the object [7,1] in covariance matrix (in m³/kg)
  454.      */
  455.     public double getCdrgx() {
  456.         return covarianceMatrix.getEntry(6, 0);
  457.     }

  458.     /**
  459.      * Set the object [7,1] in covariance matrix (with index starting at 1).
  460.      * @param CDRGX = object [7,1] in covariance matrix (in m³/kg)
  461.      */
  462.     public void setCdrgx(final double CDRGX) {
  463.         refuseFurtherComments();
  464.         setCovarianceMatrixEntry(6, 0, CDRGX);
  465.     }

  466.     /**
  467.      * Get the object [7,2] in covariance matrix.
  468.      * @return the object [7,2] in covariance matrix (in m³/kg)
  469.      */
  470.     public double getCdrgy() {
  471.         return covarianceMatrix.getEntry(6, 1);
  472.     }

  473.     /**
  474.      * Set the object [7,2] in covariance matrix (with index starting at 1).
  475.      * @param CDRGY = object [7,2] in covariance matrix (in m³/kg)
  476.      */
  477.     public void setCdrgy(final double CDRGY) {
  478.         refuseFurtherComments();
  479.         setCovarianceMatrixEntry(6, 1, CDRGY);
  480.     }

  481.     /**
  482.      * Get the object [7,3] in covariance matrix (with index starting at 1).
  483.      * @return the object [7,3] in covariance matrix (in m³/kg)
  484.      */
  485.     public double getCdrgz() {
  486.         return covarianceMatrix.getEntry(6, 2);
  487.     }

  488.     /**
  489.      * Set the object [7,3] in covariance matrix (with index starting at 1).
  490.      * @param CDRGZ = object [7,3] in covariance matrix (in m³/kg)
  491.      */
  492.     public void setCdrgz(final double CDRGZ) {
  493.         refuseFurtherComments();
  494.         setCovarianceMatrixEntry(6, 2, CDRGZ);
  495.     }

  496.     /**
  497.      * Get the object [7,4] in covariance matrix (with index starting at 1).
  498.      * @return the object [7,4] in covariance matrix (in m³/(kg.s))
  499.      */
  500.     public double getCdrgxdot() {
  501.         return covarianceMatrix.getEntry(6, 3);
  502.     }

  503.     /**
  504.      * Set the object [7,4] in covariance matrix (with index starting at 1).
  505.      * @param CDRGXdot = object [7,4] in covariance matrix (in m³/(kg.s))
  506.      */
  507.     public void setCdrgxdot(final double CDRGXdot) {
  508.         refuseFurtherComments();
  509.         setCovarianceMatrixEntry(6, 3, CDRGXdot);
  510.     }

  511.     /**
  512.      * Get the object [7,5] in covariance matrix (with index starting at 1).
  513.      * @return the object [7,5] in covariance matrix (in m³/(kg.s))
  514.      */
  515.     public double getCdrgydot() {
  516.         return covarianceMatrix.getEntry(6, 4);
  517.     }

  518.     /**
  519.      * Set the object [7,5] in covariance matrix (with index starting at 1).
  520.      * @param CDRGYdot = object [7,5] in covariance matrix (in m³/(kg.s))
  521.      */
  522.     public void setCdrgydot(final double CDRGYdot) {
  523.         refuseFurtherComments();
  524.         setCovarianceMatrixEntry(6, 4, CDRGYdot);
  525.     }

  526.     /**
  527.      * Get the object [7,6] in covariance matrix (with index starting at 1).
  528.      * @return the object [7,6] in covariance matrix (in m³/(kg.s))
  529.      */
  530.     public double getCdrgzdot() {
  531.         return covarianceMatrix.getEntry(6, 5);
  532.     }

  533.     /**
  534.      * Set the object [7,6] in covariance matrix (with index starting at 1).
  535.      * @param CDRGZdot = object [7,6] in covariance matrix (in m³/(kg.s))
  536.      */
  537.     public void setCdrgzdot(final double CDRGZdot) {
  538.         refuseFurtherComments();
  539.         setCovarianceMatrixEntry(6, 5, CDRGZdot);
  540.     }

  541.     /**
  542.      * Get the object [7,7] in covariance matrix (with index starting at 1).
  543.      * @return the object [7,7] in covariance matrix (in m⁴/kg²)
  544.      */
  545.     public double getCdrgdrg() {
  546.         return covarianceMatrix.getEntry(6, 6);
  547.     }

  548.     /**
  549.      * Set the object [7,7] in covariance matrix (with index starting at 1).
  550.      * @param CDRGDRG = object [7,7] in covariance matrix (in m⁴/kg²)
  551.      */
  552.     public void setCdrgdrg(final double CDRGDRG) {
  553.         refuseFurtherComments();
  554.         setCovarianceMatrixEntry(6, 6, CDRGDRG);
  555.     }

  556.     /**
  557.      * Get the object [8,1] in covariance matrix (with index starting at 1).
  558.      * @return the object [8,1] in covariance matrix (in m³/kg)
  559.      */
  560.     public double getCsrpx() {
  561.         return covarianceMatrix.getEntry(7, 0);
  562.     }

  563.     /**
  564.      * Set the object [8,1] in covariance matrix (with index starting at 1).
  565.      * @param CSRPX = object [8,1] in covariance matrix (in m³/kg)
  566.      */
  567.     public void setCsrpx(final double CSRPX) {
  568.         refuseFurtherComments();
  569.         setCovarianceMatrixEntry(7, 0, CSRPX);
  570.     }

  571.     /**
  572.      * Get the object [8,2] in covariance matrix (with index starting at 1).
  573.      * @return the object [8,2] in covariance matrix (in m³/kg)
  574.      */
  575.     public double getCsrpy() {
  576.         return covarianceMatrix.getEntry(7, 1);
  577.     }

  578.     /**
  579.      * Set the object [8,2] in covariance matrix (with index starting at 1).
  580.      * @param CSRPY = object [8,2] in covariance matrix (in m³/kg)
  581.      */
  582.     public void setCsrpy(final double CSRPY) {
  583.         refuseFurtherComments();
  584.         setCovarianceMatrixEntry(7, 1, CSRPY);
  585.     }

  586.     /**
  587.      * Get the object [8,3] in covariance matrix (with index starting at 1).
  588.      * @return the object [8,3] in covariance matrix (in m³/kg)
  589.      */
  590.     public double getCsrpz() {
  591.         return covarianceMatrix.getEntry(7, 2);
  592.     }

  593.     /**
  594.      * Set the object [8,3] in covariance matrix (with index starting at 1).
  595.      * @param CSRPZ = object [8,3] in covariance matrix (in m³/kg)
  596.      */
  597.     public void setCsrpz(final double CSRPZ) {
  598.         refuseFurtherComments();
  599.         setCovarianceMatrixEntry(7, 2, CSRPZ);
  600.     }

  601.     /**
  602.      * Get the object [8,4] in covariance matrix (with index starting at 1).
  603.      * @return the object [8,4] in covariance matrix (in m³/(kg.s))
  604.      */
  605.     public double getCsrpxdot() {
  606.         return covarianceMatrix.getEntry(7, 3);
  607.     }

  608.     /**
  609.      * Set the object [8,4] in covariance matrix (with index starting at 1).
  610.      * @param CSRPXdot = object [8,4] in covariance matrix (in m³/(kg.s))
  611.      */
  612.     public void setCsrpxdot(final double CSRPXdot) {
  613.         refuseFurtherComments();
  614.         setCovarianceMatrixEntry(7, 3, CSRPXdot);
  615.     }

  616.     /**
  617.      * Get the object [8,5] in covariance matrix (with index starting at 1).
  618.      * @return the object [8,5] in covariance matrix (in m³/(kg.s))
  619.      */
  620.     public double getCsrpydot() {
  621.         return covarianceMatrix.getEntry(7, 4);
  622.     }

  623.     /**
  624.      * Set the object [8,5] in covariance matrix (with index starting at 1).
  625.      * @param CSRPYdot = object [8,5] in covariance matrix (in m³/(kg.s))
  626.      */
  627.     public void setCsrpydot(final double CSRPYdot) {
  628.         refuseFurtherComments();
  629.         setCovarianceMatrixEntry(7, 4, CSRPYdot);
  630.     }

  631.     /**
  632.      * Get the object [8,6] in covariance matrix (with index starting at 1).
  633.      * @return the object [8,6] in covariance matrix (in m³/(kg.s))
  634.      */
  635.     public double getCsrpzdot() {
  636.         return covarianceMatrix.getEntry(7, 5);
  637.     }

  638.     /**
  639.      * Set the object [8,6] in covariance matrix (with index starting at 1).
  640.      * @param CSRPZdot = object [8,6] in covariance matrix (in m³/(kg.s))
  641.      */
  642.     public void setCsrpzdot(final double CSRPZdot) {
  643.         refuseFurtherComments();
  644.         setCovarianceMatrixEntry(7, 5, CSRPZdot);
  645.     }

  646.     /**
  647.      * Get the object [8,7] in covariance matrix (with index starting at 1).
  648.      * @return the object [8,7] in covariance matrix (in m⁴/kg²)
  649.      */
  650.     public double getCsrpdrg() {
  651.         return covarianceMatrix.getEntry(7, 6);
  652.     }

  653.     /**
  654.      * Set the object [8,7] in covariance matrix (with index starting at 1).
  655.      * @param CSRPDRG = object [8,7] in covariance matrix (in m⁴/kg²)
  656.      */
  657.     public void setCsrpdrg(final double CSRPDRG) {
  658.         refuseFurtherComments();
  659.         setCovarianceMatrixEntry(7, 6, CSRPDRG);
  660.     }

  661.     /**
  662.      * Get the object [8,8] in covariance matrix (with index starting at 1).
  663.      * @return the object [8,8] in covariance matrix (in m⁴/kg²)
  664.      */
  665.     public double getCsrpsrp() {
  666.         return covarianceMatrix.getEntry(7, 7);
  667.     }

  668.     /**
  669.      * Set the object [8,8] in covariance matrix (with index starting at 1).
  670.      * @param CSRPSRP = object [8,8] in covariance matrix (in m⁴/kg²)
  671.      */
  672.     public void setCsrpsrp(final double CSRPSRP) {
  673.         refuseFurtherComments();
  674.         setCovarianceMatrixEntry(7, 7, CSRPSRP);
  675.     }

  676.     /**
  677.      * Get the object [9,1] in covariance matrix (with index starting at 1).
  678.      * @return the object [9,1] in covariance matrix (in m²/s²)
  679.      */
  680.     public double getCthrx() {
  681.         return covarianceMatrix.getEntry(8, 0);
  682.     }

  683.     /**
  684.      * Set the object [9,1] in covariance matrix (with index starting at 1).
  685.      * @param CTHRX = object [9,1] in covariance matrix (in m²/s²)
  686.      */
  687.     public void setCthrx(final double CTHRX) {
  688.         refuseFurtherComments();
  689.         setCovarianceMatrixEntry(8, 0, CTHRX);
  690.     }

  691.     /**
  692.      * Get the object [9,2] in covariance matrix (with index starting at 1).
  693.      * @return the object [9,2] in covariance matrix (in m²/s²)
  694.      */
  695.     public double getCthry() {
  696.         return covarianceMatrix.getEntry(8, 1);
  697.     }

  698.     /**
  699.      * Set the object [9,2] in covariance matrix (with index starting at 1).
  700.      * @param CTHRY = object [9,2] in covariance matrix (in m²/s²)
  701.      */
  702.     public void setCthry(final double CTHRY) {
  703.         refuseFurtherComments();
  704.         setCovarianceMatrixEntry(8, 1, CTHRY);
  705.     }

  706.     /**
  707.      * Get the object [9,3] in covariance matrix (with index starting at 1).
  708.      * @return the object [9,3] in covariance matrix (in m²/s²)
  709.      */
  710.     public double getCthrz() {
  711.         return covarianceMatrix.getEntry(8, 2);
  712.     }

  713.     /**
  714.      * Set the object [9,3] in covariance matrix (with index starting at 1).
  715.      * @param CTHRZ = object [9,3] in covariance matrix (in m²/s²)
  716.      */
  717.     public void setCthrz(final double CTHRZ) {
  718.         refuseFurtherComments();
  719.         setCovarianceMatrixEntry(8, 2, CTHRZ);
  720.     }

  721.     /**
  722.      * Get the object [9,4] in covariance matrix (with index starting at 1).
  723.      * @return the object [9,4] in covariance matrix (in m²/s³)
  724.      */
  725.     public double getCthrxdot() {
  726.         return covarianceMatrix.getEntry(8, 3);
  727.     }

  728.     /**
  729.      * Set the object [9,4] in covariance matrix (with index starting at 1).
  730.      * @param CTHRXdot = object [9,4] in covariance matrix (in m²/s³)
  731.      */
  732.     public void setCthrxdot(final double CTHRXdot) {
  733.         refuseFurtherComments();
  734.         setCovarianceMatrixEntry(8, 3, CTHRXdot);
  735.     }

  736.     /**
  737.      * Get the object [9,5] in covariance matrix (with index starting at 1).
  738.      * @return the object [9,5] in covariance matrix (in m²/s³)
  739.      */
  740.     public double getCthrydot() {
  741.         return covarianceMatrix.getEntry(8, 4);
  742.     }

  743.     /**
  744.      * Set the object [9,5] in covariance matrix (with index starting at 1).
  745.      * @param CTHRYdot = object [9,5] in covariance matrix (in m²/s³)
  746.      */
  747.     public void setCthrydot(final double CTHRYdot) {
  748.         refuseFurtherComments();
  749.         setCovarianceMatrixEntry(8, 4, CTHRYdot);
  750.     }

  751.     /**
  752.      * Get the object [9,6] in covariance matrix (with index starting at 1).
  753.      * @return the object [9,6] in covariance matrix (in m²/s³)
  754.      */
  755.     public double getCthrzdot() {
  756.         return covarianceMatrix.getEntry(8, 5);
  757.     }

  758.     /**
  759.      * Set the object [9,6] in covariance matrix (with index starting at 1).
  760.      * @param CTHRZdot = object [9,6] in covariance matrix (in m²/s³)
  761.      */
  762.     public void setCthrzdot(final double CTHRZdot) {
  763.         refuseFurtherComments();
  764.         setCovarianceMatrixEntry(8, 5, CTHRZdot);
  765.     }

  766.     /**
  767.      * Get the object [9,7] in covariance matrix (with index starting at 1).
  768.      * @return the object [9,7] in covariance matrix (in m³/(kg.s²))
  769.      */
  770.     public double getCthrdrg() {
  771.         return covarianceMatrix.getEntry(8, 6);
  772.     }

  773.     /**
  774.      * Set the object [9,7] in covariance matrix (with index starting at 1).
  775.      * @param CTHRDRG = object [9,7] in covariance matrix (in m³/(kg.s²))
  776.      */
  777.     public void setCthrdrg(final double CTHRDRG) {
  778.         refuseFurtherComments();
  779.         setCovarianceMatrixEntry(8, 6, CTHRDRG);
  780.     }

  781.     /**
  782.      * Get the object [9,8] in covariance matrix (with index starting at 1).
  783.      * @return the object [9,8] in covariance matrix (in m³/(kg.s²))
  784.      */
  785.     public double getCthrsrp() {
  786.         return covarianceMatrix.getEntry(8, 7);
  787.     }

  788.     /**
  789.      * Set the object [9,8] in covariance matrix (with index starting at 1).
  790.      * @param CTHRSRP = object [9,8] in covariance matrix (in m³/(kg.s²))
  791.      */
  792.     public void setCthrsrp(final double CTHRSRP) {
  793.         refuseFurtherComments();
  794.         setCovarianceMatrixEntry(8, 7, CTHRSRP);
  795.     }

  796.     /**
  797.      * Get the object [9,9] in covariance matrix (with index starting at 1).
  798.      * @return the object [9,9] in covariance matrix (in m²/s⁴)
  799.      */
  800.     public double getCthrthr() {
  801.         return covarianceMatrix.getEntry(8, 8);
  802.     }

  803.     /**
  804.      * Set the object [9,9] in covariance matrix (with index starting at 1).
  805.      * @param CTHRTHR = object [9,9] in covariance matrix (in m²/s⁴)
  806.      */
  807.     public void setCthrthr(final double CTHRTHR) {
  808.         refuseFurtherComments();
  809.         setCovarianceMatrixEntry(8, 8, CTHRTHR);
  810.     }

  811.     /** Get the flag indicating whether the alternate covariance type set in the CDM Object metadata section is XYZ.
  812.      * @return the covXYZset
  813.      */
  814.     public boolean isCovXYZset() {
  815.         return covXYZset;
  816.     }
  817. }