XYZCovariance.java

  1. /* Copyright 2002-2024 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. This class as a RealMatrix as
  25.  * attribute which can be acces with getXYZCovariaxMatrix method. Beware that
  26.  * there are thus 2 ways to modify the XYZ covariance : setC... ( setCxx,
  27.  * setCyx ...) which should be prioritized and getXYZCovariaxMatrix.setEntry(row, col, value).
  28.  * <p> The XYZ Covariance Matrix is only provided if {@link CdmMetadataKey#ALT_COV_TYPE} is {@link AltCovarianceType#XYZ}, otherwise
  29.  * its terms will return NaN. </p>
  30.  * <p> When available, the matrix is given in the 9×9 Lower Triangular Form. All parameters of the 6×6 position/velocity submatrix
  31.  * are mandatory. The remaining elements will return NaN if not provided.</p>
  32.  */
  33. public class XYZCovariance extends CommentsContainer {

  34.     /** XYZ covariance matrix. */
  35.     private RealMatrix covarianceMatrix;

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

  38.     /** Simple constructor. To update matrix value there are 2 ways to modify the XYZ
  39.      * covariance : setC... ( setCxx, setCyx ...) which should be prioritized and
  40.      * getXYZCovariaxMatrix.setEntry(row, col, value).
  41.      * <p> The XYZ Covariance Matrix is only provided if {@link CdmMetadataKey#ALT_COV_TYPE} is {@link AltCovarianceType#XYZ}, otherwise
  42.      * its terms will return NaN. </p>
  43.      * <p> When available, the matrix is given in the 9×9 Lower Triangular Form. All parameters of the 6×6 position/velocity submatrix
  44.      * are mandatory. The remaining elements will return NaN if not provided.</p>
  45.      * @param covXYZset Flag indicating whether the alternate covariance type set in the CDM Object metadata section is XYZ.
  46.      */
  47.     public XYZCovariance(final boolean covXYZset) {
  48.         this.covXYZset = covXYZset;
  49.         covarianceMatrix = MatrixUtils.createRealMatrix(9, 9);
  50.         for (int i = 0; i < covarianceMatrix.getRowDimension(); ++i) {
  51.             for (int j = 0; j <= i; ++j) {
  52.                 covarianceMatrix.setEntry(i, j, Double.NaN);
  53.             }
  54.         }

  55.     }

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

  60.         // Conditional on ALT_COV_TYPE = XYZ
  61.         if (!isCovXYZset()) {
  62.             throw new OrekitException(OrekitMessages.CCSDS_DATE_INVALID_PREAMBLE_FIELD, CdmMetadataKey.ALT_COV_TYPE);
  63.         }

  64.         // We only check values that are mandatory in a cdm file
  65.         checkNotNaN(getCxx(),              XYZCovarianceKey.CX_X.name());
  66.         checkNotNaN(getCyx(),              XYZCovarianceKey.CY_X.name());
  67.         checkNotNaN(getCyy(),              XYZCovarianceKey.CY_Y.name());
  68.         checkNotNaN(getCzx(),              XYZCovarianceKey.CZ_X.name());
  69.         checkNotNaN(getCzy(),              XYZCovarianceKey.CZ_Y.name());
  70.         checkNotNaN(getCzz(),              XYZCovarianceKey.CZ_Z.name());
  71.         checkNotNaN(getCxdotx(),           XYZCovarianceKey.CXDOT_X.name());
  72.         checkNotNaN(getCxdoty(),           XYZCovarianceKey.CXDOT_Y.name());
  73.         checkNotNaN(getCxdotz(),           XYZCovarianceKey.CXDOT_Z.name());
  74.         checkNotNaN(getCxdotxdot(),        XYZCovarianceKey.CXDOT_XDOT.name());
  75.         checkNotNaN(getCydotx(),           XYZCovarianceKey.CYDOT_X.name());
  76.         checkNotNaN(getCydoty(),           XYZCovarianceKey.CYDOT_Y.name());
  77.         checkNotNaN(getCydotz(),           XYZCovarianceKey.CYDOT_Z.name());
  78.         checkNotNaN(getCydotxdot(),        XYZCovarianceKey.CYDOT_XDOT.name());
  79.         checkNotNaN(getCydotydot(),        XYZCovarianceKey.CYDOT_YDOT.name());
  80.         checkNotNaN(getCzdotx(),           XYZCovarianceKey.CZDOT_X.name());
  81.         checkNotNaN(getCzdoty(),           XYZCovarianceKey.CZDOT_Y.name());
  82.         checkNotNaN(getCzdotz(),           XYZCovarianceKey.CZDOT_Z.name());
  83.         checkNotNaN(getCzdotxdot(),        XYZCovarianceKey.CZDOT_XDOT.name());
  84.         checkNotNaN(getCzdotydot(),        XYZCovarianceKey.CZDOT_YDOT.name());
  85.         checkNotNaN(getCzdotzdot(),        XYZCovarianceKey.CZDOT_ZDOT.name());
  86.     }

  87.     /** Set an entry in the XYZ covariance matrix.
  88.      * <p>
  89.      * Both m(j, k) and m(k, j) are set.
  90.      * </p>
  91.      * @param j row index (must be between 0 and 5 (inclusive)
  92.      * @param k column index (must be between 0 and 5 (inclusive)
  93.      * @param entry value of the matrix entry
  94.      */
  95.     public void setCovarianceMatrixEntry(final int j, final int k, final double entry) {
  96.         covarianceMatrix.setEntry(j, k, entry);
  97.         covarianceMatrix.setEntry(k, j, entry);
  98.     }

  99.     /**
  100.      * Get the XYZ covariance matrix.
  101.      * <p> The XYZ Covariance Matrix is only provided if {@link CdmMetadataKey#ALT_COV_TYPE} is {@link AltCovarianceType#XYZ}, otherwise
  102.      * its terms will return NaN. </p>
  103.      * <p> When available, the matrix is given in the 9×9 Lower Triangular Form. All parameters of the 6×6 position/velocity submatrix
  104.      * are mandatory. The remaining elements will return NaN if not provided.</p>
  105.      * @return the XYZ covariance matrix
  106.      */
  107.     public RealMatrix getXYZCovarianceMatrix() {
  108.         return covarianceMatrix;
  109.     }

  110.     /**
  111.      * Get the object [1,1] in covariance matrix (with index starting at 1).
  112.      * @return the object [1,1] in covariance matrix (in m²)
  113.      */
  114.     public double getCxx() {
  115.         return covarianceMatrix.getEntry(0, 0);
  116.     }

  117.     /**
  118.      * Set the object [1,1] in covariance matrix (with index starting at 1).
  119.      * @param CXX = object [1,1] in covariance matrix (in m²)
  120.      */
  121.     public void setCxx(final double CXX) {
  122.         refuseFurtherComments();

  123.         // Conditional on ALT_COV_TYPE = XYZ
  124.         if (!isCovXYZset()) {
  125.             throw new OrekitException(OrekitMessages.CCSDS_DATE_INVALID_PREAMBLE_FIELD, CdmMetadataKey.ALT_COV_TYPE);
  126.         }

  127.         setCovarianceMatrixEntry(0, 0, CXX);
  128.     }

  129.     /**
  130.      * Get the object [2,1] in covariance matrix (with index starting at 1).
  131.      * @return the object [2,1] in covariance matrix (in m²)
  132.      */
  133.     public double getCyx() {
  134.         return covarianceMatrix.getEntry(1, 0);
  135.     }

  136.     /**
  137.      * Set the object [2,1] in covariance matrix (with index starting at 1).
  138.      * @param CYX = object [2,1] in covariance matrix (in m²)
  139.      */
  140.     public void setCyx(final double CYX) {
  141.         refuseFurtherComments();
  142.         setCovarianceMatrixEntry(1, 0, CYX);
  143.     }

  144.     /**
  145.      * Get the object [2,2] in covariance matrix (with index starting at 1).
  146.      * @return the object [2,2] in covariance matrix (in m²)
  147.      */
  148.     public double getCyy() {
  149.         return covarianceMatrix.getEntry(1, 1);
  150.     }

  151.     /**
  152.      * Set the object [2,2] in covariance matrix (with index starting at 1).
  153.      * @param CYY = object [2,2] in covariance matrix (in m²)
  154.      */
  155.     public void setCyy(final double CYY) {
  156.         refuseFurtherComments();
  157.         setCovarianceMatrixEntry(1, 1, CYY);
  158.     }

  159.     /**
  160.      * Get the object [3,1] in covariance matrix (with index starting at 1).
  161.      * @return the object [3,1] in covariance matrix (in m²)
  162.      */
  163.     public double getCzx() {
  164.         return covarianceMatrix.getEntry(2, 0);
  165.     }

  166.     /**
  167.      * Set the object [3,1] in covariance matrix (with index starting at 1).
  168.      * @param CZX = object [3,1] in covariance matrix (in m²)
  169.      */
  170.     public void setCzx(final double CZX) {
  171.         refuseFurtherComments();
  172.         setCovarianceMatrixEntry(2, 0, CZX);
  173.     }

  174.     /**
  175.      * Get the object [3,2] in covariance matrix (with index starting at 1).
  176.      * @return the object [3,2] in covariance matrix (in m²)
  177.      */
  178.     public double getCzy() {
  179.         return covarianceMatrix.getEntry(2, 1);
  180.     }

  181.     /**
  182.      * Set the object [3,2] in covariance matrix (with index starting at 1).
  183.      * @param CZY = object [3,2] in covariance matrix (in m²)
  184.      */
  185.     public void setCzy(final double CZY) {
  186.         refuseFurtherComments();
  187.         setCovarianceMatrixEntry(2, 1, CZY);
  188.     }

  189.     /**
  190.      * Get the object [3,3] in covariance matrix (with index starting at 1).
  191.      * @return the object [3,3] in covariance matrix (in m²)
  192.      */
  193.     public double getCzz() {
  194.         return covarianceMatrix.getEntry(2, 2);
  195.     }

  196.     /**
  197.      * Set the object [3,3] in covariance matrix (with index starting at 1).
  198.      * @param CZZ = object [3,3] in covariance matrix (in m²)
  199.      */
  200.     public void setCzz(final double CZZ) {
  201.         refuseFurtherComments();
  202.         setCovarianceMatrixEntry(2, 2, CZZ);
  203.     }

  204.     /**
  205.      * Get the object [4,1] in covariance matrix (with index starting at 1).
  206.      * @return the object [4,1] in covariance matrix (in m²/s)
  207.      */
  208.     public double getCxdotx() {
  209.         return covarianceMatrix.getEntry(3, 0);
  210.     }

  211.     /**
  212.      * Set the object [4,1] in covariance matrix (with index starting at 1).
  213.      * @param CXdotX = object [4,1] in covariance matrix (in m²/s)
  214.      */
  215.     public void setCxdotx(final double CXdotX) {
  216.         refuseFurtherComments();
  217.         setCovarianceMatrixEntry(3, 0, CXdotX);
  218.     }

  219.     /**
  220.      * Get the object [4,2] in covariance matrix (with index starting at 1).
  221.      * @return the object [4,2] in covariance matrix (in m²/s)
  222.      */
  223.     public double getCxdoty() {
  224.         return covarianceMatrix.getEntry(3, 1);
  225.     }

  226.     /**
  227.      * Set the object [4, 2] in covariance matrix (with index starting at 1).
  228.      * @param CXdotY = object [4, 2] in covariance matrix (in m²/s)
  229.      */
  230.     public void setCxdoty(final double CXdotY) {
  231.         refuseFurtherComments();
  232.         setCovarianceMatrixEntry(3, 1, CXdotY);
  233.     }

  234.     /**
  235.      * Get the object [4, 3] in covariance matrix (with index starting at 1) .
  236.      * @return the object [4, 3] in covariance matrix (in m²/s)
  237.      */
  238.     public double getCxdotz() {
  239.         return covarianceMatrix.getEntry(3, 2);
  240.     }

  241.     /**
  242.      * Set the object [4, 3] in covariance matrix (with index starting at 1).
  243.      * @param CXdotZ = object [4,3] in covariance matrix (in m²/s)
  244.      */
  245.     public void setCxdotz(final double CXdotZ) {
  246.         refuseFurtherComments();
  247.         setCovarianceMatrixEntry(3, 2, CXdotZ);
  248.     }

  249.     /**
  250.      * Get the object [4, 4] in covariance matrix (with index starting at 1).
  251.      * @return the object [4, 4] in covariance matrix (in m²/s²)
  252.      */
  253.     public double getCxdotxdot() {
  254.         return covarianceMatrix.getEntry(3, 3);
  255.     }

  256.     /**
  257.      * Set the object [4, 4] in covariance matrix (with index starting at 1).
  258.      * @param CXdotXdot = object [4, 4] in covariance matrix (in m²/s²)
  259.      */
  260.     public void setCxdotxdot(final double CXdotXdot) {
  261.         refuseFurtherComments();
  262.         setCovarianceMatrixEntry(3, 3, CXdotXdot);
  263.     }

  264.     /**
  265.      * Get the object [5, 1] in covariance matrix (with index starting at 1).
  266.      * @return the object [5, 1] in covariance matrix (in m²/s)
  267.      */
  268.     public double getCydotx() {
  269.         return covarianceMatrix.getEntry(4, 0);
  270.     }

  271.     /**
  272.      * Set the object [5,1] in covariance matrix (with index starting at 1).
  273.      * @param CYdotX = object [5,1] in covariance matrix (in m²/s)
  274.      */
  275.     public void setCydotx(final double CYdotX) {
  276.         refuseFurtherComments();
  277.         setCovarianceMatrixEntry(4, 0, CYdotX);
  278.     }

  279.     /**
  280.      * Get the object [5,2] in covariance matrix (with index starting at 1).
  281.      * @return the object [5,2] in covariance matrix (in m²/s)
  282.      */
  283.     public double getCydoty() {
  284.         return covarianceMatrix.getEntry(4, 1);
  285.     }

  286.     /**
  287.      * Set the object [5,2] in covariance matrix (with index starting at 1).
  288.      * @param CYdotY = object [5,2] in covariance matrix (in m²/s)
  289.      */
  290.     public void setCydoty(final double CYdotY) {
  291.         refuseFurtherComments();
  292.         setCovarianceMatrixEntry(4, 1, CYdotY);
  293.     }

  294.     /**
  295.      * Get the object [5,3] in covariance matrix (with index starting at 1).
  296.      * @return the object [5,3] in covariance matrix (in m²/s)
  297.      */
  298.     public double getCydotz() {
  299.         return covarianceMatrix.getEntry(4, 2);
  300.     }

  301.     /**
  302.      * Set the object [5,3] in covariance matrix (with index starting at 1).
  303.      * @param CYdotZ = object [5,3] in covariance matrix (in m²/s)
  304.      */
  305.     public void setCydotz(final double CYdotZ) {
  306.         refuseFurtherComments();
  307.         setCovarianceMatrixEntry(4, 2, CYdotZ);
  308.     }

  309.     /**
  310.      * Get the object [5,4] in covariance matrix (with index starting at 1).
  311.      * @return the object [5,4] in covariance matrix (in m²/s²)
  312.      */
  313.     public double getCydotxdot() {
  314.         return covarianceMatrix.getEntry(4, 3);
  315.     }

  316.     /**
  317.      * Set the object [5,4] in covariance matrix (with index starting at 1).
  318.      * @param CYdotXdot = object [5,4] in covariance matrix (in m²/s²)
  319.      */
  320.     public void setCydotxdot(final double CYdotXdot) {
  321.         refuseFurtherComments();
  322.         setCovarianceMatrixEntry(4, 3, CYdotXdot);
  323.     }

  324.     /**
  325.      * Get the object [5,5] in covariance matrix (with index starting at 1).
  326.      * @return the object [5,5] in covariance matrix (in m²/s²)
  327.      */
  328.     public double getCydotydot() {
  329.         return covarianceMatrix.getEntry(4, 4);
  330.     }

  331.     /**
  332.      * Set the object [5,5] in covariance matrix (with index starting at 1).
  333.      * @param CYdotYdot = object [5,5] in covariance matrix (in m²/s²)
  334.      */
  335.     public void setCydotydot(final double CYdotYdot) {
  336.         refuseFurtherComments();
  337.         setCovarianceMatrixEntry(4, 4, CYdotYdot);
  338.     }

  339.     /**
  340.      * Get the object [6,1] in covariance matrix (with index starting at 1).
  341.      * @return the object [6,1] in covariance matrix (in m²/s)
  342.      */
  343.     public double getCzdotx() {
  344.         return covarianceMatrix.getEntry(5, 0);
  345.     }

  346.     /**
  347.      * Set the object [6,1] in covariance matrix (with index starting at 1).
  348.      * @param CZdotX = object [6,1] in covariance matrix (in m²/s)
  349.      */
  350.     public void setCzdotx(final double CZdotX) {
  351.         refuseFurtherComments();
  352.         setCovarianceMatrixEntry(5, 0, CZdotX);
  353.     }

  354.     /**
  355.      * Get the object [6,2] in covariance matrix (with index starting at 1).
  356.      * @return the object [6,2] in covariance matrix (in m²/s)
  357.      */
  358.     public double getCzdoty() {
  359.         return covarianceMatrix.getEntry(5, 1);
  360.     }

  361.     /**
  362.      * Set the object [6,2] in covariance matrix (with index starting at 1).
  363.      * @param CZdotY = object [6,2] in covariance matrix (in m²/s)
  364.      */
  365.     public void setCzdoty(final double CZdotY) {
  366.         refuseFurtherComments();
  367.         setCovarianceMatrixEntry(5, 1, CZdotY);
  368.     }

  369.     /**
  370.      * Get the object [6,3] in covariance matrix (with index starting at 1).
  371.      * @return the object [6,3] in covariance matrix (in m²/s)
  372.      */
  373.     public double getCzdotz() {
  374.         return covarianceMatrix.getEntry(5, 2);
  375.     }

  376.     /**
  377.      * Set the object [6,3] in covariance matrix (with index starting at 1).
  378.      * @param CZdotZ = object [6,3] in covariance matrix (in m²/s)
  379.      */
  380.     public void setCzdotz(final double CZdotZ) {
  381.         refuseFurtherComments();
  382.         setCovarianceMatrixEntry(5, 2, CZdotZ);
  383.     }

  384.     /**
  385.      * Get the object [6,4] in covariance matrix (with index starting at 1).
  386.      * @return the object [6,4] in covariance matrix (in m²/s²)
  387.      */
  388.     public double getCzdotxdot() {
  389.         return covarianceMatrix.getEntry(5, 3);
  390.     }

  391.     /**
  392.      * Set the object [6,4] in covariance matrix (with index starting at 1).
  393.      * @param CZdotXdot = object [6,4] in covariance matrix (in m²/s²)
  394.      */
  395.     public void setCzdotxdot(final double CZdotXdot) {
  396.         refuseFurtherComments();
  397.         setCovarianceMatrixEntry(5, 3, CZdotXdot);
  398.     }

  399.     /**
  400.      * Get the object [6,5] in covariance matrix (with index starting at 1).
  401.      * @return the object [6,5] in covariance matrix (in m²/s²)
  402.      */
  403.     public double getCzdotydot() {
  404.         return covarianceMatrix.getEntry(5, 4);
  405.     }

  406.     /**
  407.      * Set the object [6,5] in covariance matrix (with index starting at 1).
  408.      * @param CZdotYdot = object [6,5] in covariance matrix (in m²/s²)
  409.      */
  410.     public void setCzdotydot(final double CZdotYdot) {
  411.         refuseFurtherComments();
  412.         setCovarianceMatrixEntry(5, 4, CZdotYdot);
  413.     }

  414.     /**
  415.      * Get the object [6,6] in covariance matrix (with index starting at 1).
  416.      * @return the object [6,6] in covariance matrix (in m²/s²)
  417.      */
  418.     public double getCzdotzdot() {
  419.         return covarianceMatrix.getEntry(5, 5);
  420.     }

  421.     /**
  422.      * Set the object [6,6] in covariance matrix (with index starting at 1).
  423.      * @param CZdotZdot = object [6,6] in covariance matrix (in m²/s²)
  424.      */
  425.     public void setCzdotzdot(final double CZdotZdot) {
  426.         refuseFurtherComments();
  427.         setCovarianceMatrixEntry(5, 5, CZdotZdot);
  428.     }

  429.     /**
  430.      * Get the object [7,1] in covariance matrix (with index starting at 1).
  431.      * @return the object [7,1] in covariance matrix (in m³/kg)
  432.      */
  433.     public double getCdrgx() {
  434.         return covarianceMatrix.getEntry(6, 0);
  435.     }

  436.     /**
  437.      * Set the object [7,1] in covariance matrix (with index starting at 1).
  438.      * @param CDRGX = object [7,1] in covariance matrix (in m³/kg)
  439.      */
  440.     public void setCdrgx(final double CDRGX) {
  441.         refuseFurtherComments();
  442.         setCovarianceMatrixEntry(6, 0, CDRGX);
  443.     }

  444.     /**
  445.      * Get the object [7,2] in covariance matrix.
  446.      * @return the object [7,2] in covariance matrix (in m³/kg)
  447.      */
  448.     public double getCdrgy() {
  449.         return covarianceMatrix.getEntry(6, 1);
  450.     }

  451.     /**
  452.      * Set the object [7,2] in covariance matrix (with index starting at 1).
  453.      * @param CDRGY = object [7,2] in covariance matrix (in m³/kg)
  454.      */
  455.     public void setCdrgy(final double CDRGY) {
  456.         refuseFurtherComments();
  457.         setCovarianceMatrixEntry(6, 1, CDRGY);
  458.     }

  459.     /**
  460.      * Get the object [7,3] in covariance matrix (with index starting at 1).
  461.      * @return the object [7,3] in covariance matrix (in m³/kg)
  462.      */
  463.     public double getCdrgz() {
  464.         return covarianceMatrix.getEntry(6, 2);
  465.     }

  466.     /**
  467.      * Set the object [7,3] in covariance matrix (with index starting at 1).
  468.      * @param CDRGZ = object [7,3] in covariance matrix (in m³/kg)
  469.      */
  470.     public void setCdrgz(final double CDRGZ) {
  471.         refuseFurtherComments();
  472.         setCovarianceMatrixEntry(6, 2, CDRGZ);
  473.     }

  474.     /**
  475.      * Get the object [7,4] in covariance matrix (with index starting at 1).
  476.      * @return the object [7,4] in covariance matrix (in m³/(kg.s))
  477.      */
  478.     public double getCdrgxdot() {
  479.         return covarianceMatrix.getEntry(6, 3);
  480.     }

  481.     /**
  482.      * Set the object [7,4] in covariance matrix (with index starting at 1).
  483.      * @param CDRGXdot = object [7,4] in covariance matrix (in m³/(kg.s))
  484.      */
  485.     public void setCdrgxdot(final double CDRGXdot) {
  486.         refuseFurtherComments();
  487.         setCovarianceMatrixEntry(6, 3, CDRGXdot);
  488.     }

  489.     /**
  490.      * Get the object [7,5] in covariance matrix (with index starting at 1).
  491.      * @return the object [7,5] in covariance matrix (in m³/(kg.s))
  492.      */
  493.     public double getCdrgydot() {
  494.         return covarianceMatrix.getEntry(6, 4);
  495.     }

  496.     /**
  497.      * Set the object [7,5] in covariance matrix (with index starting at 1).
  498.      * @param CDRGYdot = object [7,5] in covariance matrix (in m³/(kg.s))
  499.      */
  500.     public void setCdrgydot(final double CDRGYdot) {
  501.         refuseFurtherComments();
  502.         setCovarianceMatrixEntry(6, 4, CDRGYdot);
  503.     }

  504.     /**
  505.      * Get the object [7,6] in covariance matrix (with index starting at 1).
  506.      * @return the object [7,6] in covariance matrix (in m³/(kg.s))
  507.      */
  508.     public double getCdrgzdot() {
  509.         return covarianceMatrix.getEntry(6, 5);
  510.     }

  511.     /**
  512.      * Set the object [7,6] in covariance matrix (with index starting at 1).
  513.      * @param CDRGZdot = object [7,6] in covariance matrix (in m³/(kg.s))
  514.      */
  515.     public void setCdrgzdot(final double CDRGZdot) {
  516.         refuseFurtherComments();
  517.         setCovarianceMatrixEntry(6, 5, CDRGZdot);
  518.     }

  519.     /**
  520.      * Get the object [7,7] in covariance matrix (with index starting at 1).
  521.      * @return the object [7,7] in covariance matrix (in m⁴/kg²)
  522.      */
  523.     public double getCdrgdrg() {
  524.         return covarianceMatrix.getEntry(6, 6);
  525.     }

  526.     /**
  527.      * Set the object [7,7] in covariance matrix (with index starting at 1).
  528.      * @param CDRGDRG = object [7,7] in covariance matrix (in m⁴/kg²)
  529.      */
  530.     public void setCdrgdrg(final double CDRGDRG) {
  531.         refuseFurtherComments();
  532.         setCovarianceMatrixEntry(6, 6, CDRGDRG);
  533.     }

  534.     /**
  535.      * Get the object [8,1] in covariance matrix (with index starting at 1).
  536.      * @return the object [8,1] in covariance matrix (in m³/kg)
  537.      */
  538.     public double getCsrpx() {
  539.         return covarianceMatrix.getEntry(7, 0);
  540.     }

  541.     /**
  542.      * Set the object [8,1] in covariance matrix (with index starting at 1).
  543.      * @param CSRPX = object [8,1] in covariance matrix (in m³/kg)
  544.      */
  545.     public void setCsrpx(final double CSRPX) {
  546.         refuseFurtherComments();
  547.         setCovarianceMatrixEntry(7, 0, CSRPX);
  548.     }

  549.     /**
  550.      * Get the object [8,2] in covariance matrix (with index starting at 1).
  551.      * @return the object [8,2] in covariance matrix (in m³/kg)
  552.      */
  553.     public double getCsrpy() {
  554.         return covarianceMatrix.getEntry(7, 1);
  555.     }

  556.     /**
  557.      * Set the object [8,2] in covariance matrix (with index starting at 1).
  558.      * @param CSRPY = object [8,2] in covariance matrix (in m³/kg)
  559.      */
  560.     public void setCsrpy(final double CSRPY) {
  561.         refuseFurtherComments();
  562.         setCovarianceMatrixEntry(7, 1, CSRPY);
  563.     }

  564.     /**
  565.      * Get the object [8,3] in covariance matrix (with index starting at 1).
  566.      * @return the object [8,3] in covariance matrix (in m³/kg)
  567.      */
  568.     public double getCsrpz() {
  569.         return covarianceMatrix.getEntry(7, 2);
  570.     }

  571.     /**
  572.      * Set the object [8,3] in covariance matrix (with index starting at 1).
  573.      * @param CSRPZ = object [8,3] in covariance matrix (in m³/kg)
  574.      */
  575.     public void setCsrpz(final double CSRPZ) {
  576.         refuseFurtherComments();
  577.         setCovarianceMatrixEntry(7, 2, CSRPZ);
  578.     }

  579.     /**
  580.      * Get the object [8,4] in covariance matrix (with index starting at 1).
  581.      * @return the object [8,4] in covariance matrix (in m³/(kg.s))
  582.      */
  583.     public double getCsrpxdot() {
  584.         return covarianceMatrix.getEntry(7, 3);
  585.     }

  586.     /**
  587.      * Set the object [8,4] in covariance matrix (with index starting at 1).
  588.      * @param CSRPXdot = object [8,4] in covariance matrix (in m³/(kg.s))
  589.      */
  590.     public void setCsrpxdot(final double CSRPXdot) {
  591.         refuseFurtherComments();
  592.         setCovarianceMatrixEntry(7, 3, CSRPXdot);
  593.     }

  594.     /**
  595.      * Get the object [8,5] in covariance matrix (with index starting at 1).
  596.      * @return the object [8,5] in covariance matrix (in m³/(kg.s))
  597.      */
  598.     public double getCsrpydot() {
  599.         return covarianceMatrix.getEntry(7, 4);
  600.     }

  601.     /**
  602.      * Set the object [8,5] in covariance matrix (with index starting at 1).
  603.      * @param CSRPYdot = object [8,5] in covariance matrix (in m³/(kg.s))
  604.      */
  605.     public void setCsrpydot(final double CSRPYdot) {
  606.         refuseFurtherComments();
  607.         setCovarianceMatrixEntry(7, 4, CSRPYdot);
  608.     }

  609.     /**
  610.      * Get the object [8,6] in covariance matrix (with index starting at 1).
  611.      * @return the object [8,6] in covariance matrix (in m³/(kg.s))
  612.      */
  613.     public double getCsrpzdot() {
  614.         return covarianceMatrix.getEntry(7, 5);
  615.     }

  616.     /**
  617.      * Set the object [8,6] in covariance matrix (with index starting at 1).
  618.      * @param CSRPZdot = object [8,6] in covariance matrix (in m³/(kg.s))
  619.      */
  620.     public void setCsrpzdot(final double CSRPZdot) {
  621.         refuseFurtherComments();
  622.         setCovarianceMatrixEntry(7, 5, CSRPZdot);
  623.     }

  624.     /**
  625.      * Get the object [8,7] in covariance matrix (with index starting at 1).
  626.      * @return the object [8,7] in covariance matrix (in m⁴/kg²)
  627.      */
  628.     public double getCsrpdrg() {
  629.         return covarianceMatrix.getEntry(7, 6);
  630.     }

  631.     /**
  632.      * Set the object [8,7] in covariance matrix (with index starting at 1).
  633.      * @param CSRPDRG = object [8,7] in covariance matrix (in m⁴/kg²)
  634.      */
  635.     public void setCsrpdrg(final double CSRPDRG) {
  636.         refuseFurtherComments();
  637.         setCovarianceMatrixEntry(7, 6, CSRPDRG);
  638.     }

  639.     /**
  640.      * Get the object [8,8] in covariance matrix (with index starting at 1).
  641.      * @return the object [8,8] in covariance matrix (in m⁴/kg²)
  642.      */
  643.     public double getCsrpsrp() {
  644.         return covarianceMatrix.getEntry(7, 7);
  645.     }

  646.     /**
  647.      * Set the object [8,8] in covariance matrix (with index starting at 1).
  648.      * @param CSRPSRP = object [8,8] in covariance matrix (in m⁴/kg²)
  649.      */
  650.     public void setCsrpsrp(final double CSRPSRP) {
  651.         refuseFurtherComments();
  652.         setCovarianceMatrixEntry(7, 7, CSRPSRP);
  653.     }

  654.     /**
  655.      * Get the object [9,1] in covariance matrix (with index starting at 1).
  656.      * @return the object [9,1] in covariance matrix (in m²/s²)
  657.      */
  658.     public double getCthrx() {
  659.         return covarianceMatrix.getEntry(8, 0);
  660.     }

  661.     /**
  662.      * Set the object [9,1] in covariance matrix (with index starting at 1).
  663.      * @param CTHRX = object [9,1] in covariance matrix (in m²/s²)
  664.      */
  665.     public void setCthrx(final double CTHRX) {
  666.         refuseFurtherComments();
  667.         setCovarianceMatrixEntry(8, 0, CTHRX);
  668.     }

  669.     /**
  670.      * Get the object [9,2] in covariance matrix (with index starting at 1).
  671.      * @return the object [9,2] in covariance matrix (in m²/s²)
  672.      */
  673.     public double getCthry() {
  674.         return covarianceMatrix.getEntry(8, 1);
  675.     }

  676.     /**
  677.      * Set the object [9,2] in covariance matrix (with index starting at 1).
  678.      * @param CTHRY = object [9,2] in covariance matrix (in m²/s²)
  679.      */
  680.     public void setCthry(final double CTHRY) {
  681.         refuseFurtherComments();
  682.         setCovarianceMatrixEntry(8, 1, CTHRY);
  683.     }

  684.     /**
  685.      * Get the object [9,3] in covariance matrix (with index starting at 1).
  686.      * @return the object [9,3] in covariance matrix (in m²/s²)
  687.      */
  688.     public double getCthrz() {
  689.         return covarianceMatrix.getEntry(8, 2);
  690.     }

  691.     /**
  692.      * Set the object [9,3] in covariance matrix (with index starting at 1).
  693.      * @param CTHRZ = object [9,3] in covariance matrix (in m²/s²)
  694.      */
  695.     public void setCthrz(final double CTHRZ) {
  696.         refuseFurtherComments();
  697.         setCovarianceMatrixEntry(8, 2, CTHRZ);
  698.     }

  699.     /**
  700.      * Get the object [9,4] in covariance matrix (with index starting at 1).
  701.      * @return the object [9,4] in covariance matrix (in m²/s³)
  702.      */
  703.     public double getCthrxdot() {
  704.         return covarianceMatrix.getEntry(8, 3);
  705.     }

  706.     /**
  707.      * Set the object [9,4] in covariance matrix (with index starting at 1).
  708.      * @param CTHRXdot = object [9,4] in covariance matrix (in m²/s³)
  709.      */
  710.     public void setCthrxdot(final double CTHRXdot) {
  711.         refuseFurtherComments();
  712.         setCovarianceMatrixEntry(8, 3, CTHRXdot);
  713.     }

  714.     /**
  715.      * Get the object [9,5] in covariance matrix (with index starting at 1).
  716.      * @return the object [9,5] in covariance matrix (in m²/s³)
  717.      */
  718.     public double getCthrydot() {
  719.         return covarianceMatrix.getEntry(8, 4);
  720.     }

  721.     /**
  722.      * Set the object [9,5] in covariance matrix (with index starting at 1).
  723.      * @param CTHRYdot = object [9,5] in covariance matrix (in m²/s³)
  724.      */
  725.     public void setCthrydot(final double CTHRYdot) {
  726.         refuseFurtherComments();
  727.         setCovarianceMatrixEntry(8, 4, CTHRYdot);
  728.     }

  729.     /**
  730.      * Get the object [9,6] in covariance matrix (with index starting at 1).
  731.      * @return the object [9,6] in covariance matrix (in m²/s³)
  732.      */
  733.     public double getCthrzdot() {
  734.         return covarianceMatrix.getEntry(8, 5);
  735.     }

  736.     /**
  737.      * Set the object [9,6] in covariance matrix (with index starting at 1).
  738.      * @param CTHRZdot = object [9,6] in covariance matrix (in m²/s³)
  739.      */
  740.     public void setCthrzdot(final double CTHRZdot) {
  741.         refuseFurtherComments();
  742.         setCovarianceMatrixEntry(8, 5, CTHRZdot);
  743.     }

  744.     /**
  745.      * Get the object [9,7] in covariance matrix (with index starting at 1).
  746.      * @return the object [9,7] in covariance matrix (in m³/(kg.s²))
  747.      */
  748.     public double getCthrdrg() {
  749.         return covarianceMatrix.getEntry(8, 6);
  750.     }

  751.     /**
  752.      * Set the object [9,7] in covariance matrix (with index starting at 1).
  753.      * @param CTHRDRG = object [9,7] in covariance matrix (in m³/(kg.s²))
  754.      */
  755.     public void setCthrdrg(final double CTHRDRG) {
  756.         refuseFurtherComments();
  757.         setCovarianceMatrixEntry(8, 6, CTHRDRG);
  758.     }

  759.     /**
  760.      * Get the object [9,8] in covariance matrix (with index starting at 1).
  761.      * @return the object [9,8] in covariance matrix (in m³/(kg.s²))
  762.      */
  763.     public double getCthrsrp() {
  764.         return covarianceMatrix.getEntry(8, 7);
  765.     }

  766.     /**
  767.      * Set the object [9,8] in covariance matrix (with index starting at 1).
  768.      * @param CTHRSRP = object [9,8] in covariance matrix (in m³/(kg.s²))
  769.      */
  770.     public void setCthrsrp(final double CTHRSRP) {
  771.         refuseFurtherComments();
  772.         setCovarianceMatrixEntry(8, 7, CTHRSRP);
  773.     }

  774.     /**
  775.      * Get the object [9,9] in covariance matrix (with index starting at 1).
  776.      * @return the object [9,9] in covariance matrix (in m²/s⁴)
  777.      */
  778.     public double getCthrthr() {
  779.         return covarianceMatrix.getEntry(8, 8);
  780.     }

  781.     /**
  782.      * Set the object [9,9] in covariance matrix (with index starting at 1).
  783.      * @param CTHRTHR = object [9,9] in covariance matrix (in m²/s⁴)
  784.      */
  785.     public void setCthrthr(final double CTHRTHR) {
  786.         refuseFurtherComments();
  787.         setCovarianceMatrixEntry(8, 8, CTHRTHR);
  788.     }

  789.     /** Get the flag indicating whether the alternate covariance type set in the CDM Object metadata section is XYZ.
  790.      * @return the covXYZset
  791.      */
  792.     public boolean isCovXYZset() {
  793.         return covXYZset;
  794.     }
  795. }