CommonPhysicalProperties.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;

  18. import org.hipparchus.complex.Quaternion;
  19. import org.orekit.files.ccsds.definitions.FrameFacade;
  20. import org.orekit.files.ccsds.ndm.cdm.AdditionalParameters;
  21. import org.orekit.files.ccsds.ndm.odm.ocm.OrbitPhysicalProperties;
  22. import org.orekit.files.ccsds.section.CommentsContainer;
  23. import org.orekit.time.AbsoluteDate;

  24. /** Container for common physical properties for both {@link OrbitPhysicalProperties} and {@link AdditionalParameters}.
  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.  * @author Maxime Journot
  40.  * @since 11.3
  41.  */
  42. public class CommonPhysicalProperties extends CommentsContainer {

  43.     /** Optimally Enclosing Box parent reference frame. */
  44.     private FrameFacade oebParentFrame;

  45.     /** Optimally Enclosing Box parent reference frame epoch. */
  46.     private AbsoluteDate oebParentFrameEpoch;

  47.     /** Quaternion defining Optimally Enclosing Box. */
  48.     private final double[] oebQ;

  49.     /** Maximum physical dimension of Optimally Enclosing Box. */
  50.     private double oebMax;

  51.     /** Intermediate physical dimension of Optimally Enclosing Box. */
  52.     private double oebIntermediate;

  53.     /** Minimum physical dimension of Optimally Enclosing Box. */
  54.     private double oebMin;

  55.     /** Cross-sectional area of Optimally Enclosing Box when viewed along the maximum OEB direction. */
  56.     private double oebAreaAlongMax;

  57.     /** Cross-sectional area of Optimally Enclosing Box when viewed along the intermediate OEB direction. */
  58.     private double oebAreaAlongIntermediate;

  59.     /** Cross-sectional area of Optimally Enclosing Box when viewed along the minimum OEB direction. */
  60.     private double oebAreaAlongMin;

  61.         /** Typical (50th percentile) radar cross-section. */
  62.     private double rcs;

  63.     /** Minimum radar cross-section. */
  64.     private double minRcs;

  65.     /** Maximum radar cross-section. */
  66.     private double maxRcs;

  67.     /** Typical (50th percentile) visual magnitude. */
  68.     private double vmAbsolute;

  69.     /** Minimum apparent visual magnitude. */
  70.     private double vmApparentMin;

  71.     /** Typical (50th percentile) apparent visual magnitude. */
  72.     private double vmApparent;

  73.     /** Maximum apparent visual magnitude. */
  74.     private double vmApparentMax;

  75.     /** Typical (50th percentile) coefficient of reflectivity. */
  76.     private double reflectance;

  77.     /** Simple constructor.
  78.      */
  79.     public CommonPhysicalProperties() {

  80.         // 502.0-B-3 (page 6-23) says the default is RSW_ROTATING, but also says,
  81.         // "This keyword shall be provided if OEB_Q1,2,3,4 are specified".
  82.         // Which means it must be specified in the file any time it would be used,
  83.         // which leaves the default without any effect.
  84.         oebParentFrame           = new FrameFacade(null, null, null, null, null);
  85.         // 502.0-B-3 (page 6-23) says the default is EPOCH_TZERO from the OCM metadata.
  86.         oebParentFrameEpoch      = null;
  87.         // 502.0-B-3 (page 6-23) says these four values are optional.
  88.         oebQ                     = new double[] {Double.NaN, Double.NaN, Double.NaN, Double.NaN};
  89.         oebMax                   = Double.NaN;
  90.         oebIntermediate          = Double.NaN;
  91.         oebMin                   = Double.NaN;
  92.         oebAreaAlongMax          = Double.NaN;
  93.         oebAreaAlongIntermediate = Double.NaN;
  94.         oebAreaAlongMin          = Double.NaN;
  95.         rcs                      = Double.NaN;
  96.         minRcs                   = Double.NaN;
  97.         maxRcs                   = Double.NaN;
  98.         vmAbsolute               = Double.NaN;
  99.         vmApparentMin            = Double.NaN;
  100.         vmApparent               = Double.NaN;
  101.         vmApparentMax            = Double.NaN;
  102.         reflectance              = Double.NaN;
  103.     }

  104.     /** {@inheritDoc} */
  105.     @Override
  106.     public void validate(final double version) {
  107.         super.validate(version);
  108.     }

  109.     /** Get the Optimally Enclosing Box parent reference frame.
  110.      * @return Optimally Enclosing Box parent reference frame
  111.      */
  112.     public FrameFacade getOebParentFrame() {
  113.         return oebParentFrame;
  114.     }

  115.     /** Set the Optimally Enclosing Box parent reference frame.
  116.      * @param oebParentFrame Optimally Enclosing Box parent reference frame
  117.      */
  118.     public void setOebParentFrame(final FrameFacade oebParentFrame) {
  119.         refuseFurtherComments();
  120.         this.oebParentFrame = oebParentFrame;
  121.     }

  122.     /** Get the Optimally Enclosing Box parent reference frame epoch.
  123.      * @return Optimally Enclosing Box parent reference frame epoch
  124.      */
  125.     public AbsoluteDate getOebParentFrameEpoch() {
  126.         return oebParentFrameEpoch;
  127.     }

  128.     /** Set the Optimally Enclosing Box parent reference frame epoch.
  129.      * @param oebParentFrameEpoch Optimally Enclosing Box parent reference frame epoch
  130.      */
  131.     public void setOebParentFrameEpoch(final AbsoluteDate oebParentFrameEpoch) {
  132.         refuseFurtherComments();
  133.         this.oebParentFrameEpoch = oebParentFrameEpoch;
  134.     }

  135.     /** Get the quaternion defining Optimally Enclosing Box.
  136.      * @return quaternion defining Optimally Enclosing Box
  137.      */
  138.     public Quaternion getOebQ() {
  139.         return new Quaternion(oebQ[0], oebQ[1], oebQ[2], oebQ[3]);
  140.     }

  141.     /** set the component of quaternion defining Optimally Enclosing Box.
  142.      * @param i index of the component
  143.      * @param qI component of quaternion defining Optimally Enclosing Box
  144.      */
  145.     public void setOebQ(final int i, final double qI) {
  146.         refuseFurtherComments();
  147.         oebQ[i] = qI;
  148.     }

  149.     /** Get the maximum physical dimension of the OEB.
  150.      * @return maximum physical dimension of the OEB.
  151.      */
  152.     public double getOebMax() {
  153.         return oebMax;
  154.     }

  155.     /** Set the maximum physical dimension of the OEB.
  156.      * @param oebMax maximum physical dimension of the OEB.
  157.      */
  158.     public void setOebMax(final double oebMax) {
  159.         refuseFurtherComments();
  160.         this.oebMax = oebMax;
  161.     }

  162.     /** Get the intermediate physical dimension of the OEB.
  163.      * @return intermediate physical dimension of the OEB.
  164.      */
  165.     public double getOebIntermediate() {
  166.         return oebIntermediate;
  167.     }

  168.     /** Set the intermediate physical dimension of the OEB.
  169.      * @param oebIntermediate intermediate physical dimension of the OEB.
  170.      */
  171.     public void setOebIntermediate(final double oebIntermediate) {
  172.         refuseFurtherComments();
  173.         this.oebIntermediate = oebIntermediate;
  174.     }

  175.     /** Get the minimum physical dimension of the OEB.
  176.      * @return dimensions the minimum physical dimension of the OEB.
  177.      */
  178.     public double getOebMin() {
  179.         return oebMin;
  180.     }

  181.     /** Set the minimum physical dimension of the OEB.
  182.      * @param oebMin the minimum physical dimension of the OEB.
  183.      */
  184.     public void setOebMin(final double oebMin) {
  185.         refuseFurtherComments();
  186.         this.oebMin = oebMin;
  187.     }

  188.     /** Get the cross-sectional area of Optimally Enclosing Box when viewed along the maximum OEB direction.
  189.      * @return cross-sectional area of Optimally Enclosing Box when viewed along the maximum OEB direction.
  190.      */
  191.     public double getOebAreaAlongMax() {
  192.         return oebAreaAlongMax;
  193.     }

  194.     /** Set the cross-sectional area of Optimally Enclosing Box when viewed along the maximum OEB direction.
  195.      * @param oebAreaAlongMax cross-sectional area of Optimally Enclosing Box when viewed along the maximum OEB direction.
  196.      */
  197.     public void setOebAreaAlongMax(final double oebAreaAlongMax) {
  198.         refuseFurtherComments();
  199.         this.oebAreaAlongMax = oebAreaAlongMax;
  200.     }

  201.     /** Get the cross-sectional area of Optimally Enclosing Box when viewed along the intermediate OEB direction.
  202.      * @return cross-sectional area of Optimally Enclosing Box when viewed along the intermediate OEB direction.
  203.      */
  204.     public double getOebAreaAlongIntermediate() {
  205.         return oebAreaAlongIntermediate;
  206.     }

  207.     /** Set the cross-sectional area of Optimally Enclosing Box when viewed along the intermediate OEB direction.
  208.      * @param oebAreaAlongIntermediate cross-sectional area of Optimally Enclosing Box when viewed along the intermediate OEB direction.
  209.      */
  210.     public void setOebAreaAlongIntermediate(final double oebAreaAlongIntermediate) {
  211.         refuseFurtherComments();
  212.         this.oebAreaAlongIntermediate = oebAreaAlongIntermediate;
  213.     }

  214.     /** Get the cross-sectional area of Optimally Enclosing Box when viewed along the minimum OEB direction.
  215.      * @return cross-sectional area of Optimally Enclosing Box when viewed along the minimum OEB direction.
  216.      */
  217.     public double getOebAreaAlongMin() {
  218.         return oebAreaAlongMin;
  219.     }

  220.     /** Set the cross-sectional area of Optimally Enclosing Box when viewed along the minimum OEB direction.
  221.      * @param oebAreaAlongMin cross-sectional area of Optimally Enclosing Box when viewed along the minimum OEB direction.
  222.      */
  223.     public void setOebAreaAlongMin(final double oebAreaAlongMin) {
  224.         refuseFurtherComments();
  225.         this.oebAreaAlongMin = oebAreaAlongMin;
  226.     }


  227.     /** Get the typical (50th percentile) radar cross-section.
  228.      * @return typical (50th percentile) radar cross-section
  229.      */
  230.     public double getRcs() {
  231.         return rcs;
  232.     }

  233.     /** Set the typical (50th percentile) radar cross-section.
  234.      * @param rcs typical (50th percentile) radar cross-section
  235.      */
  236.     public void setRcs(final double rcs) {
  237.         refuseFurtherComments();
  238.         this.rcs = rcs;
  239.     }

  240.     /** Get the minimum radar cross-section.
  241.      * @return minimum radar cross-section
  242.      */
  243.     public double getMinRcs() {
  244.         return minRcs;
  245.     }

  246.     /** Set the minimum radar cross-section.
  247.      * @param minRcs minimum radar cross-section
  248.      */
  249.     public void setMinRcs(final double minRcs) {
  250.         refuseFurtherComments();
  251.         this.minRcs = minRcs;
  252.     }

  253.     /** Get the maximum radar cross-section.
  254.      * @return maximum radar cross-section
  255.      */
  256.     public double getMaxRcs() {
  257.         return maxRcs;
  258.     }

  259.     /** Set the maximum radar cross-section.
  260.      * @param maxRcs maximum radar cross-section
  261.      */
  262.     public void setMaxRcs(final double maxRcs) {
  263.         refuseFurtherComments();
  264.         this.maxRcs = maxRcs;
  265.     }

  266.     /** Get the typical (50th percentile) visual magnitude.
  267.      * @return typical (50th percentile) visual magnitude
  268.      */
  269.     public double getVmAbsolute() {
  270.         return vmAbsolute;
  271.     }

  272.     /** Set the typical (50th percentile) visual magnitude.
  273.      * @param vmAbsolute typical (50th percentile) visual magnitude
  274.      */
  275.     public void setVmAbsolute(final double vmAbsolute) {
  276.         refuseFurtherComments();
  277.         this.vmAbsolute = vmAbsolute;
  278.     }

  279.     /** Get the minimum apparent visual magnitude.
  280.      * @return minimum apparent visual magnitude
  281.      */
  282.     public double getVmApparentMin() {
  283.         return vmApparentMin;
  284.     }

  285.     /** Set the minimum apparent visual magnitude.
  286.      * @param vmApparentMin minimum apparent visual magnitude
  287.      */
  288.     public void setVmApparentMin(final double vmApparentMin) {
  289.         refuseFurtherComments();
  290.         this.vmApparentMin = vmApparentMin;
  291.     }

  292.     /** Get the typical (50th percentile) apparent visual magnitude.
  293.      * @return typical (50th percentile) apparent visual magnitude
  294.      */
  295.     public double getVmApparent() {
  296.         return vmApparent;
  297.     }

  298.     /** Set the typical (50th percentile) apparent visual magnitude.
  299.      * @param vmApparent typical (50th percentile) apparent visual magnitude
  300.      */
  301.     public void setVmApparent(final double vmApparent) {
  302.         refuseFurtherComments();
  303.         this.vmApparent = vmApparent;
  304.     }

  305.     /** Get the maximum apparent visual magnitude.
  306.      * @return maximum apparent visual magnitude
  307.      */
  308.     public double getVmApparentMax() {
  309.         return vmApparentMax;
  310.     }

  311.     /** Set the maximum apparent visual magnitude.
  312.      * @param vmApparentMax maximum apparent visual magnitude
  313.      */
  314.     public void setVmApparentMax(final double vmApparentMax) {
  315.         refuseFurtherComments();
  316.         this.vmApparentMax = vmApparentMax;
  317.     }

  318.     /** Get the typical (50th percentile) coefficient of reflectance.
  319.      * @return typical (50th percentile) coefficient of reflectance
  320.      */
  321.     public double getReflectance() {
  322.         return reflectance;
  323.     }

  324.     /** Set the typical (50th percentile) coefficient of reflectance.
  325.      * @param reflectance typical (50th percentile) coefficient of reflectance
  326.      */
  327.     public void setReflectance(final double reflectance) {
  328.         refuseFurtherComments();
  329.         this.reflectance = reflectance;
  330.     }
  331. }