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

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

  20. import org.hipparchus.linear.MatrixUtils;
  21. import org.hipparchus.linear.RealMatrix;
  22. import org.orekit.files.ccsds.ndm.CommonPhysicalProperties;
  23. import org.orekit.time.AbsoluteDate;
  24. import org.orekit.utils.Constants;

  25. /** Spacecraft physical properties.
  26.  * @author Luc Maisonobe
  27.  * @since 11.0
  28.  */
  29. public class OrbitPhysicalProperties extends CommonPhysicalProperties {

  30.     /** Satellite manufacturer name. */
  31.     private String manufacturer;

  32.     /** Bus model name. */
  33.     private String busModel;

  34.     /** Other space objects this object is docked to. */
  35.     private List<String> dockedWith;

  36.     /** Attitude-independent drag cross-sectional area, not already into attitude-dependent area along OEB. */
  37.     private double dragConstantArea;

  38.     /** Nominal drag coefficient. */
  39.     private double dragCoefficient;

  40.     /** Drag coefficient 1σ uncertainty. */
  41.     private double dragUncertainty;

  42.     /** Total mass at beginning of life. */
  43.     private double initialWetMass;

  44.     /** Total mass at T₀. */
  45.     private double wetMass;

  46.     /** Mass without propellant. */
  47.     private double dryMass;

  48.     /** Minimum cross-sectional area for collision probability estimation purposes. */
  49.     private double minAreaForCollisionProbability;

  50.     /** Maximum cross-sectional area for collision probability estimation purposes. */
  51.     private double maxAreaForCollisionProbability;

  52.     /** Typical (50th percentile) cross-sectional area for collision probability estimation purposes. */
  53.     private double typAreaForCollisionProbability;

  54.     /** Attitude-independent SRP area, not already into attitude-dependent area along OEB. */
  55.     private double srpConstantArea;

  56.     /** Nominal SRP coefficient. */
  57.     private double srpCoefficient;

  58.     /** SRP coefficient 1σ uncertainty. */
  59.     private double srpUncertainty;

  60.     /** Attitude control mode. */
  61.     private String attitudeControlMode;

  62.     /** Type of actuator for attitude control. */
  63.     private String attitudeActuatorType;

  64.     /** Accuracy of attitude knowledge. */
  65.     private double attitudeKnowledgeAccuracy;

  66.     /** Accuracy of attitude control. */
  67.     private double attitudeControlAccuracy;

  68.     /** Overall accuracy of spacecraft to maintain attitude. */
  69.     private double attitudePointingAccuracy;

  70.     /** Average average frequency of orbit or attitude maneuvers (in SI units, hence per second). */
  71.     private double maneuversFrequency;

  72.     /** Maximum composite thrust the spacecraft can accomplish. */
  73.     private double maxThrust;

  74.     /** Total ΔV capability at beginning of life. */
  75.     private double bolDv;

  76.     /** Total ΔV remaining for spacecraft. */
  77.     private double remainingDv;

  78.     /** Inertia matrix. */
  79.     private RealMatrix inertiaMatrix;

  80.     /** Simple constructor.
  81.      * @param epochT0 T0 epoch from file metadata
  82.      */
  83.     public OrbitPhysicalProperties(final AbsoluteDate epochT0) {

  84.         // Call to CommonPhysicalProperties constructor
  85.         super();

  86.         // we don't call the setXxx() methods in order to avoid
  87.         // calling refuseFurtherComments as a side effect
  88.         dockedWith                     = new ArrayList<>();
  89.         dragConstantArea               = Double.NaN;
  90.         dragCoefficient                = Double.NaN;
  91.         dragUncertainty                = 0.0;
  92.         initialWetMass                 = Double.NaN;
  93.         wetMass                        = Double.NaN;
  94.         dryMass                        = Double.NaN;
  95.         minAreaForCollisionProbability = Double.NaN;
  96.         maxAreaForCollisionProbability = Double.NaN;
  97.         typAreaForCollisionProbability = Double.NaN;
  98.         attitudeKnowledgeAccuracy      = Double.NaN;
  99.         attitudeControlAccuracy        = Double.NaN;
  100.         attitudePointingAccuracy       = Double.NaN;
  101.         maneuversFrequency             = Double.NaN;
  102.         maxThrust                      = Double.NaN;
  103.         bolDv                          = Double.NaN;
  104.         remainingDv                    = Double.NaN;
  105.         inertiaMatrix                  = MatrixUtils.createRealMatrix(3, 3);
  106.     }

  107.     /** Get manufacturer name.
  108.      * @return manufacturer name
  109.      */
  110.     public String getManufacturer() {
  111.         return manufacturer;
  112.     }

  113.     /** Set manufacturer name.
  114.      * @param manufacturer manufacturer name
  115.      */
  116.     public void setManufacturer(final String manufacturer) {
  117.         refuseFurtherComments();
  118.         this.manufacturer = manufacturer;
  119.     }

  120.     /** Get the bus model name.
  121.      * @return bus model name
  122.      */
  123.     public String getBusModel() {
  124.         return busModel;
  125.     }

  126.     /** Set the bus model name.
  127.      * @param busModel bus model name
  128.      */
  129.     public void setBusModel(final String busModel) {
  130.         refuseFurtherComments();
  131.         this.busModel = busModel;
  132.     }

  133.     /** Get the other space objects this object is docked to.
  134.      * @return the oother space objects this object is docked to
  135.      */
  136.     public List<String> getDockedWith() {
  137.         return dockedWith;
  138.     }

  139.     /** Set the other space objects this object is docked to.
  140.      * @param dockedWith the other space objects this object is docked to
  141.      */
  142.     public void setDockedWith(final List<String> dockedWith) {
  143.         refuseFurtherComments();
  144.         this.dockedWith = dockedWith;
  145.     }

  146.     /** Get the attitude-independent drag cross-sectional area, not already into attitude-dependent area along OEB.
  147.      * @return attitude-independent drag cross-sectional area, not already into attitude-dependent area along OEB
  148.      */
  149.     public double getDragConstantArea() {
  150.         return dragConstantArea;
  151.     }

  152.     /** Set the attitude-independent drag cross-sectional area, not already into attitude-dependent area along OEB.
  153.      * @param dragConstantArea attitude-independent drag cross-sectional area, not already into attitude-dependent area along OEB
  154.      */
  155.     public void setDragConstantArea(final double dragConstantArea) {
  156.         refuseFurtherComments();
  157.         this.dragConstantArea = dragConstantArea;
  158.     }

  159.     /** Get the nominal drag coefficient.
  160.      * @return the nominal drag coefficient
  161.      */
  162.     public double getDragCoefficient() {
  163.         return dragCoefficient;
  164.     }

  165.     /** Set the the nominal drag coefficient.
  166.      * @param dragCoefficient the nominal drag coefficient
  167.      */
  168.     public void setDragCoefficient(final double dragCoefficient) {
  169.         refuseFurtherComments();
  170.         this.dragCoefficient = dragCoefficient;
  171.     }

  172.     /** Get the drag coefficient 1σ uncertainty.
  173.      * @return drag coefficient 1σ uncertainty (in %)
  174.      */
  175.     public double getDragUncertainty() {
  176.         return dragUncertainty;
  177.     }

  178.     /** Set the drag coefficient 1σ uncertainty.
  179.      * @param dragUncertainty drag coefficient 1σ uncertainty (in %)
  180.      */
  181.     public void setDragUncertainty(final double dragUncertainty) {
  182.         refuseFurtherComments();
  183.         this.dragUncertainty = dragUncertainty;
  184.     }

  185.     /** Get the total mass at beginning of life.
  186.      * @return total mass at beginning of life
  187.      */
  188.     public double getInitialWetMass() {
  189.         return initialWetMass;
  190.     }

  191.     /** Set the total mass at beginning of life.
  192.      * @param initialWetMass total mass at beginning of life
  193.      */
  194.     public void setInitialWetMass(final double initialWetMass) {
  195.         refuseFurtherComments();
  196.         this.initialWetMass = initialWetMass;
  197.     }

  198.     /** Get the total mass at T₀.
  199.      * @return total mass at T₀
  200.      */
  201.     public double getWetMass() {
  202.         return wetMass;
  203.     }

  204.     /** Set the total mass at T₀.
  205.      * @param wetMass total mass at T₀
  206.      */
  207.     public void setWetMass(final double wetMass) {
  208.         refuseFurtherComments();
  209.         this.wetMass = wetMass;
  210.     }

  211.     /** Get the mass without propellant.
  212.      * @return mass without propellant
  213.      */
  214.     public double getDryMass() {
  215.         return dryMass;
  216.     }

  217.     /** Set the mass without propellant.
  218.      * @param dryMass mass without propellant
  219.      */
  220.     public void setDryMass(final double dryMass) {
  221.         refuseFurtherComments();
  222.         this.dryMass = dryMass;
  223.     }

  224.     /** Get the minimum cross-sectional area for collision probability estimation purposes.
  225.      * @return minimum cross-sectional area for collision probability estimation purposes
  226.      */
  227.     public double getMinAreaForCollisionProbability() {
  228.         return minAreaForCollisionProbability;
  229.     }

  230.     /** Set the minimum cross-sectional area for collision probability estimation purposes.
  231.      * @param minAreaForCollisionProbability minimum cross-sectional area for collision probability estimation purposes
  232.      */
  233.     public void setMinAreaForCollisionProbability(final double minAreaForCollisionProbability) {
  234.         refuseFurtherComments();
  235.         this.minAreaForCollisionProbability = minAreaForCollisionProbability;
  236.     }

  237.     /** Get the maximum cross-sectional area for collision probability estimation purposes.
  238.      * @return maximum cross-sectional area for collision probability estimation purposes
  239.      */
  240.     public double getMaxAreaForCollisionProbability() {
  241.         return maxAreaForCollisionProbability;
  242.     }

  243.     /** Set the maximum cross-sectional area for collision probability estimation purposes.
  244.      * @param maxAreaForCollisionProbability maximum cross-sectional area for collision probability estimation purposes
  245.      */
  246.     public void setMaxAreaForCollisionProbability(final double maxAreaForCollisionProbability) {
  247.         refuseFurtherComments();
  248.         this.maxAreaForCollisionProbability = maxAreaForCollisionProbability;
  249.     }

  250.     /** Get the typical (50th percentile) cross-sectional area for collision probability estimation purposes.
  251.      * @return typical (50th percentile) cross-sectional area for collision probability estimation purposes
  252.      */
  253.     public double getTypAreaForCollisionProbability() {
  254.         return typAreaForCollisionProbability;
  255.     }

  256.     /** Get the typical (50th percentile) cross-sectional area for collision probability estimation purposes.
  257.      * @param typAreaForCollisionProbability typical (50th percentile) cross-sectional area for collision probability estimation purposes
  258.      */
  259.     public void setTypAreaForCollisionProbability(final double typAreaForCollisionProbability) {
  260.         refuseFurtherComments();
  261.         this.typAreaForCollisionProbability = typAreaForCollisionProbability;
  262.     }

  263.     /** Get the attitude-independent SRP area, not already into attitude-dependent area along OEB.
  264.      * @return attitude-independent SRP area, not already into attitude-dependent area along OEB
  265.      */
  266.     public double getSrpConstantArea() {
  267.         return srpConstantArea;
  268.     }

  269.     /** Set the attitude-independent SRP area, not already into attitude-dependent area along OEB.
  270.      * @param srpConstantArea attitude-independent SRP area, not already into attitude-dependent area along OEB
  271.      */
  272.     public void setSrpConstantArea(final double srpConstantArea) {
  273.         refuseFurtherComments();
  274.         this.srpConstantArea = srpConstantArea;
  275.     }

  276.     /** Get the nominal SRP coefficient.
  277.      * @return nominal SRP coefficient
  278.      */
  279.     public double getSrpCoefficient() {
  280.         return srpCoefficient;
  281.     }

  282.     /** Set the nominal SRP coefficient.
  283.      * @param srpCoefficient nominal SRP coefficient
  284.      */
  285.     public void setSrpCoefficient(final double srpCoefficient) {
  286.         refuseFurtherComments();
  287.         this.srpCoefficient = srpCoefficient;
  288.     }

  289.     /** Get the SRP coefficient 1σ uncertainty.
  290.      * @return SRP coefficient 1σ uncertainty
  291.      */
  292.     public double getSrpUncertainty() {
  293.         return srpUncertainty;
  294.     }

  295.     /** Set the SRP coefficient 1σ uncertainty.
  296.      * @param srpUncertainty SRP coefficient 1σ uncertainty.
  297.      */
  298.     public void setSrpUncertainty(final double srpUncertainty) {
  299.         refuseFurtherComments();
  300.         this.srpUncertainty = srpUncertainty;
  301.     }

  302.     /** Get the attitude control mode.
  303.      * @return attitude control mode
  304.      */
  305.     public String getAttitudeControlMode() {
  306.         return attitudeControlMode;
  307.     }

  308.     /** Set the attitude control mode.
  309.      * @param attitudeControlMode attitude control mode
  310.      */
  311.     public void setAttitudeControlMode(final String attitudeControlMode) {
  312.         refuseFurtherComments();
  313.         this.attitudeControlMode = attitudeControlMode;
  314.     }

  315.     /** Get the type of actuator for attitude control.
  316.      * @return type of actuator for attitude control
  317.      */
  318.     public String getAttitudeActuatorType() {
  319.         return attitudeActuatorType;
  320.     }

  321.     /** Set the type of actuator for attitude control.
  322.      * @param attitudeActuatorType type of actuator for attitude control
  323.      */
  324.     public void setAttitudeActuatorType(final String attitudeActuatorType) {
  325.         refuseFurtherComments();
  326.         this.attitudeActuatorType = attitudeActuatorType;
  327.     }

  328.     /** Get the accuracy of attitude knowledge.
  329.      * @return accuracy of attitude knowledge
  330.      */
  331.     public double getAttitudeKnowledgeAccuracy() {
  332.         return attitudeKnowledgeAccuracy;
  333.     }

  334.     /** Set the accuracy of attitude knowledge.
  335.      * @param attitudeKnowledgeAccuracy accuracy of attitude knowledge
  336.      */
  337.     public void setAttitudeKnowledgeAccuracy(final double attitudeKnowledgeAccuracy) {
  338.         refuseFurtherComments();
  339.         this.attitudeKnowledgeAccuracy = attitudeKnowledgeAccuracy;
  340.     }

  341.     /** Get the accuracy of attitude control.
  342.      * @return accuracy of attitude control
  343.      */
  344.     public double getAttitudeControlAccuracy() {
  345.         return attitudeControlAccuracy;
  346.     }

  347.     /** Set the accuracy of attitude control.
  348.      * @param attitudeControlAccuracy accuracy of attitude control
  349.      */
  350.     public void setAttitudeControlAccuracy(final double attitudeControlAccuracy) {
  351.         refuseFurtherComments();
  352.         this.attitudeControlAccuracy = attitudeControlAccuracy;
  353.     }

  354.     /** Get the overall accuracy of spacecraft to maintain attitude.
  355.      * @return overall accuracy of spacecraft to maintain attitude
  356.      */
  357.     public double getAttitudePointingAccuracy() {
  358.         return attitudePointingAccuracy;
  359.     }

  360.     /** Set the overall accuracy of spacecraft to maintain attitude.
  361.      * @param attitudePointingAccuracy overall accuracy of spacecraft to maintain attitude
  362.      */
  363.     public void setAttitudePointingAccuracy(final double attitudePointingAccuracy) {
  364.         refuseFurtherComments();
  365.         this.attitudePointingAccuracy = attitudePointingAccuracy;
  366.     }

  367.     /** Get the average number of orbit or attitude maneuvers per year.
  368.      * @return average number of orbit or attitude maneuvers per year.
  369.      */
  370.     public double getManeuversPerYear() {
  371.         return maneuversFrequency * Constants.JULIAN_YEAR;
  372.     }

  373.     /** Get the average frequency of orbit or attitude maneuvers (in SI units, hence per second).
  374.      * @return average frequency of orbit or attitude maneuvers (in SI units, hence per second).
  375.      */
  376.     public double getManeuversFrequency() {
  377.         return maneuversFrequency;
  378.     }

  379.     /** Set the average frequency of orbit or attitude maneuvers (in SI units, hence per second).
  380.      * @param maneuversFrequency average frequency of orbit or attitude (in SI units, hence per second).
  381.      */
  382.     public void setManeuversFrequency(final double maneuversFrequency) {
  383.         refuseFurtherComments();
  384.         this.maneuversFrequency = maneuversFrequency;
  385.     }

  386.     /** Get the maximum composite thrust the spacecraft can accomplish.
  387.      * @return maximum composite thrust the spacecraft can accomplish
  388.      */
  389.     public double getMaxThrust() {
  390.         return maxThrust;
  391.     }

  392.     /** Set the maximum composite thrust the spacecraft can accomplish.
  393.      * @param maxThrust maximum composite thrust the spacecraft can accomplish
  394.      */
  395.     public void setMaxThrust(final double maxThrust) {
  396.         refuseFurtherComments();
  397.         this.maxThrust = maxThrust;
  398.     }

  399.     /** Get the total ΔV capability at beginning of life.
  400.      * @return total ΔV capability at beginning of life
  401.      */
  402.     public double getBolDv() {
  403.         return bolDv;
  404.     }

  405.     /** Set the total ΔV capability at beginning of life.
  406.      * @param bolDv total ΔV capability at beginning of life
  407.      */
  408.     public void setBolDv(final double bolDv) {
  409.         refuseFurtherComments();
  410.         this.bolDv = bolDv;
  411.     }

  412.     /** Get the total ΔV remaining for spacecraft.
  413.      * @return total ΔV remaining for spacecraft
  414.      */
  415.     public double getRemainingDv() {
  416.         return remainingDv;
  417.     }

  418.     /** Set the total ΔV remaining for spacecraft.
  419.      * @param remainingDv total ΔV remaining for spacecraft
  420.      */
  421.     public void setRemainingDv(final double remainingDv) {
  422.         refuseFurtherComments();
  423.         this.remainingDv = remainingDv;
  424.     }

  425.     /** Get the inertia matrix.
  426.      * @return the inertia matrix
  427.      */
  428.     public RealMatrix getInertiaMatrix() {
  429.         return inertiaMatrix;
  430.     }

  431.     /** Set an entry in the inertia matrix.
  432.      * <p>
  433.      * Both I(j, k) and I(k, j) are set.
  434.      * </p>
  435.      * @param j row index (must be between 0 and 3 (inclusive)
  436.      * @param k column index (must be between 0 and 3 (inclusive)
  437.      * @param entry value of the matrix entry
  438.      */
  439.     public void setInertiaMatrixEntry(final int j, final int k, final double entry) {
  440.         refuseFurtherComments();
  441.         inertiaMatrix.setEntry(j, k, entry);
  442.         inertiaMatrix.setEntry(k, j, entry);
  443.     }

  444. }