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

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

  20. import org.orekit.bodies.CelestialBodies;
  21. import org.orekit.files.ccsds.definitions.BodyFacade;
  22. import org.orekit.files.ccsds.section.CommentsContainer;
  23. import org.orekit.time.AbsoluteDate;

  24. /** Perturbation parameters.
  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 Luc Maisonobe
  40.  * @since 11.0
  41.  */
  42. public class Perturbations extends CommentsContainer {

  43.     /** Name of atmospheric model. */
  44.     private String atmosphericModel;

  45.     /** Gravity model name. */
  46.     private String gravityModel;

  47.     /** Degree of the gravity model. */
  48.     private int gravityDegree;

  49.     /** Order of the gravity model. */
  50.     private int gravityOrder;

  51.     /** Oblate spheroid equatorial radius of central body. */
  52.     private double equatorialRadius;

  53.     /** Gravitational coefficient of attracting body. */
  54.     private double gm;

  55.     /** N-body perturbation bodies. */
  56.     private List<BodyFacade> nBodyPerturbations;

  57.     /** Central body angular rotation rate. */
  58.     private double centralBodyRotation;

  59.     /** Central body oblate spheroid oblateness. */
  60.     private double oblateFlattening;

  61.     /** Ocean tides model. */
  62.     private String oceanTidesModel;

  63.     /** Solid tides model. */
  64.     private String solidTidesModel;

  65.     /** Reduction theory used for precession and nutation modeling. */
  66.     private String reductionTheory;

  67.     /** Albedo model. */
  68.     private String albedoModel;

  69.     /** Albedo grid size. Optional in 502.0-B-3 with no default. */
  70.     private Integer albedoGridSize;

  71.     /** Shadow model used for solar radiation pressure. */
  72.     private ShadowModel shadowModel;

  73.     /** Celestial bodies casting shadow. */
  74.     private List<BodyFacade> shadowBodies;

  75.     /** Solar Radiation Pressure model. */
  76.     private String srpModel;

  77.     /** Space Weather data source. */
  78.     private String spaceWeatherSource;

  79.     /** Epoch of the Space Weather data. */
  80.     private AbsoluteDate spaceWeatherEpoch;

  81.     /** Interpolation method for Space Weather data. */
  82.     private String interpMethodSW;

  83.     /** Fixed (time invariant) value of the planetary 3-hour-range geomagnetic index Kₚ. */
  84.     private double fixedGeomagneticKp;

  85.     /** Fixed (time invariant) value of the planetary 3-hour-range geomagnetic index aₚ. */
  86.     private double fixedGeomagneticAp;

  87.     /** Fixed (time invariant) value of the planetary 1-hour-range geomagnetic index Dst. */
  88.     private double fixedGeomagneticDst;

  89.     /** Fixed (time invariant) value of the Solar Flux Unit daily proxy F10.7. */
  90.     private double fixedF10P7;

  91.     /** Fixed (time invariant) value of the Solar Flux Unit 81-day running center-average proxy F10.7. */
  92.     private double fixedF10P7Mean;

  93.     /** Fixed (time invariant) value of the Solar Flux daily proxy M10.7. */
  94.     private double fixedM10P7;

  95.     /** Fixed (time invariant) value of the Solar Flux 81-day running center-average proxy M10.7. */
  96.     private double fixedM10P7Mean;

  97.     /** Fixed (time invariant) value of the Solar Flux daily proxy S10.7. */
  98.     private double fixedS10P7;

  99.     /** Fixed (time invariant) value of the Solar Flux 81-day running center-average proxy S10.7. */
  100.     private double fixedS10P7Mean;

  101.     /** Fixed (time invariant) value of the Solar Flux daily proxy Y10.7. */
  102.     private double fixedY10P7;

  103.     /** Fixed (time invariant) value of the Solar Flux 81-day running center-average proxy Y10.7. */
  104.     private double fixedY10P7Mean;

  105.     /** Simple constructor.
  106.      * @param celestialBodies factory for celestial bodies
  107.      */
  108.     public Perturbations(final CelestialBodies celestialBodies) {
  109.         // we don't call the setXxx() methods in order to avoid
  110.         // calling refuseFurtherComments as a side effect
  111.         equatorialRadius    = Double.NaN;
  112.         gm                  = Double.NaN;
  113.         centralBodyRotation = Double.NaN;
  114.         oblateFlattening    = Double.NaN;
  115.         fixedGeomagneticKp  = Double.NaN;
  116.         fixedGeomagneticAp  = Double.NaN;
  117.         fixedGeomagneticDst = Double.NaN;
  118.         fixedF10P7          = Double.NaN;
  119.         fixedF10P7Mean      = Double.NaN;
  120.         fixedM10P7          = Double.NaN;
  121.         fixedM10P7Mean      = Double.NaN;
  122.         fixedS10P7          = Double.NaN;
  123.         fixedS10P7Mean      = Double.NaN;
  124.         fixedY10P7          = Double.NaN;
  125.         fixedY10P7Mean      = Double.NaN;
  126.         // In 502.0-B-3 (p. 6-50) SHADOW_BODIES is optional with no default
  127.         shadowBodies = Collections.emptyList();
  128.     }

  129.     /** Get name of atmospheric model.
  130.      * @return name of atmospheric model
  131.      */
  132.     public String getAtmosphericModel() {
  133.         return atmosphericModel;
  134.     }

  135.     /** Set name of atmospheric model.
  136.      * @param atmosphericModel name of atmospheric model
  137.      */
  138.     public void setAtmosphericModel(final String atmosphericModel) {
  139.         this.atmosphericModel = atmosphericModel;
  140.     }

  141.     /** Get gravity model name.
  142.      * @return gravity model name
  143.      */
  144.     public String getGravityModel() {
  145.         return gravityModel;
  146.     }

  147.     /** Get degree of the gravity model.
  148.      * @return degree of the gravity model
  149.      */
  150.     public int getGravityDegree() {
  151.         return gravityDegree;
  152.     }

  153.     /** Get order of the gravity model.
  154.      * @return order of the gravity model
  155.      */
  156.     public int getGravityOrder() {
  157.         return gravityOrder;
  158.     }

  159.     /** Set gravity model.
  160.      * @param name name of the model
  161.      * @param degree degree of the model
  162.      * @param order order of the model
  163.      */
  164.     public void setGravityModel(final String name, final int degree, final int order) {
  165.         this.gravityModel  = name;
  166.         this.gravityDegree = degree;
  167.         this.gravityOrder  = order;
  168.     }

  169.     /** Get oblate spheroid equatorial radius of central body.
  170.      * @return oblate spheroid equatorial radius of central body
  171.      */
  172.     public double getEquatorialRadius() {
  173.         return equatorialRadius;
  174.     }

  175.     /** Set oblate spheroid equatorial radius of central body.
  176.      * @param equatorialRadius oblate spheroid equatorial radius of central body
  177.      */
  178.     public void setEquatorialRadius(final double equatorialRadius) {
  179.         this.equatorialRadius = equatorialRadius;
  180.     }

  181.     /** Get gravitational coefficient of attracting body.
  182.      * @return gravitational coefficient of attracting body
  183.      */
  184.     public double getGm() {
  185.         return gm;
  186.     }

  187.     /** Set gravitational coefficient of attracting body.
  188.      * @param gm gravitational coefficient of attracting body
  189.      */
  190.     public void setGm(final double gm) {
  191.         this.gm = gm;
  192.     }

  193.     /** Get n-body perturbation bodies.
  194.      * @return n-body perturbation bodies
  195.      */
  196.     public List<BodyFacade> getNBodyPerturbations() {
  197.         return nBodyPerturbations;
  198.     }

  199.     /** Set n-body perturbation bodies.
  200.      * @param nBody n-body perturbation bodies
  201.      */
  202.     public void setNBodyPerturbations(final List<BodyFacade> nBody) {
  203.         this.nBodyPerturbations = nBody;
  204.     }

  205.     /** Get central body angular rotation rate.
  206.      * @return central body angular rotation rate
  207.      */
  208.     public double getCentralBodyRotation() {
  209.         return centralBodyRotation;
  210.     }

  211.     /** Set central body angular rotation rate.
  212.      * @param centralBodyRotation central body angular rotation rate
  213.      */
  214.     public void setCentralBodyRotation(final double centralBodyRotation) {
  215.         this.centralBodyRotation = centralBodyRotation;
  216.     }

  217.     /** Get central body oblate spheroid oblateness.
  218.      * @return central body oblate spheroid oblateness
  219.      */
  220.     public double getOblateFlattening() {
  221.         return oblateFlattening;
  222.     }

  223.     /** Set central body oblate spheroid oblateness.
  224.      * @param oblateFlattening central body oblate spheroid oblateness
  225.      */
  226.     public void setOblateFlattening(final double oblateFlattening) {
  227.         this.oblateFlattening = oblateFlattening;
  228.     }

  229.     /** Get ocean tides model.
  230.      * @return ocean tides model
  231.      */
  232.     public String getOceanTidesModel() {
  233.         return oceanTidesModel;
  234.     }

  235.     /** Set ocean tides model.
  236.      * @param oceanTidesModel ocean tides model
  237.      */
  238.     public void setOceanTidesModel(final String oceanTidesModel) {
  239.         this.oceanTidesModel = oceanTidesModel;
  240.     }

  241.     /** Get solid tides model.
  242.      * @return solid tides model
  243.      */
  244.     public String getSolidTidesModel() {
  245.         return solidTidesModel;
  246.     }

  247.     /** Set solid tides model.
  248.      * @param solidTidesModel solid tides model
  249.      */
  250.     public void setSolidTidesModel(final String solidTidesModel) {
  251.         this.solidTidesModel = solidTidesModel;
  252.     }

  253.     /** Get reduction theory used for precession and nutation modeling.
  254.      * @return reduction theory used for precession and nutation modeling
  255.      */
  256.     public String getReductionTheory() {
  257.         return reductionTheory;
  258.     }

  259.     /** Set reduction theory used for precession and nutation modeling.
  260.      * @param reductionTheory reduction theory used for precession and nutation modeling
  261.      */
  262.     public void setReductionTheory(final String reductionTheory) {
  263.         this.reductionTheory = reductionTheory;
  264.     }

  265.     /** Get albedo model.
  266.      * @return albedo model
  267.      */
  268.     public String getAlbedoModel() {
  269.         return albedoModel;
  270.     }

  271.     /** Set albedo model.
  272.      * @param albedoModel albedo model
  273.      */
  274.     public void setAlbedoModel(final String albedoModel) {
  275.         this.albedoModel = albedoModel;
  276.     }

  277.     /** Get albedo grid size.
  278.      * @return albedo grid size
  279.      */
  280.     public Integer getAlbedoGridSize() {
  281.         return albedoGridSize;
  282.     }

  283.     /** Set albedo grid size.
  284.      * @param albedoGridSize albedo grid size
  285.      */
  286.     public void setAlbedoGridSize(final Integer albedoGridSize) {
  287.         this.albedoGridSize = albedoGridSize;
  288.     }

  289.     /** Get shadow model used for solar radiation pressure.
  290.      * @return shadow model used for solar radiation pressure
  291.      */
  292.     public ShadowModel getShadowModel() {
  293.         return shadowModel;
  294.     }

  295.     /** Set shadow model used for solar radiation pressure.
  296.      * @param shadowModel shadow model used for solar radiation pressure
  297.      */
  298.     public void setShadowModel(final ShadowModel shadowModel) {
  299.         this.shadowModel = shadowModel;
  300.     }

  301.     /** Get celestial bodies casting shadows.
  302.      * @return celestial bodies casting shadows
  303.      */
  304.     public List<BodyFacade> getShadowBodies() {
  305.         return shadowBodies;
  306.     }

  307.     /** Set celestial bodies casting shadows.
  308.      * @param shadowBodies celestial bodies casting shadows
  309.      */
  310.     public void setShadowBodies(final List<BodyFacade> shadowBodies) {
  311.         this.shadowBodies = shadowBodies;
  312.     }

  313.     /** Get Solar Radiation Pressure model.
  314.      * @return Solar Radiation Pressure model
  315.      */
  316.     public String getSrpModel() {
  317.         return srpModel;
  318.     }

  319.     /** Set Solar Radiation Pressure model.
  320.      * @param srpModel Solar Radiation Pressure model
  321.      */
  322.     public void setSrpModel(final String srpModel) {
  323.         this.srpModel = srpModel;
  324.     }

  325.     /** Get Space Weather data source.
  326.      * @return Space Weather data source
  327.      */
  328.     public String getSpaceWeatherSource() {
  329.         return spaceWeatherSource;
  330.     }

  331.     /** Set Space Weather data source.
  332.      * @param spaceWeatherSource Space Weather data source
  333.      */
  334.     public void setSpaceWeatherSource(final String spaceWeatherSource) {
  335.         this.spaceWeatherSource = spaceWeatherSource;
  336.     }

  337.     /** Get epoch of the Space Weather data.
  338.      * @return epoch of the Space Weather data
  339.      */
  340.     public AbsoluteDate getSpaceWeatherEpoch() {
  341.         return spaceWeatherEpoch;
  342.     }

  343.     /** Set epoch of the Space Weather data.
  344.      * @param spaceWeatherEpoch epoch of the Space Weather data
  345.      */
  346.     public void setSpaceWeatherEpoch(final AbsoluteDate spaceWeatherEpoch) {
  347.         this.spaceWeatherEpoch = spaceWeatherEpoch;
  348.     }

  349.     /** Get the interpolation method for Space Weather data.
  350.      * @return interpolation method for Space Weather data
  351.      */
  352.     public String getInterpMethodSW() {
  353.         return interpMethodSW;
  354.     }

  355.     /** Set the interpolation method for Space Weather data.
  356.      * @param interpMethodSW interpolation method for Space Weather data
  357.      */
  358.     public void setInterpMethodSW(final String interpMethodSW) {
  359.         refuseFurtherComments();
  360.         this.interpMethodSW = interpMethodSW;
  361.     }

  362.     /** Get fixed (time invariant) value of the planetary 3-hour-range geomagnetic index Kₚ.
  363.      * @return fixed (time invariant) value of the planetary 3-hour-range geomagnetic index Kₚ
  364.      */
  365.     public double getFixedGeomagneticKp() {
  366.         return fixedGeomagneticKp;
  367.     }

  368.     /** Set fixed (time invariant) value of the planetary 3-hour-range geomagnetic index Kₚ.
  369.      * @param fixedGeomagneticKp fixed (time invariant) value of the planetary 3-hour-range geomagnetic index Kₚ
  370.      */
  371.     public void setFixedGeomagneticKp(final double fixedGeomagneticKp) {
  372.         this.fixedGeomagneticKp = fixedGeomagneticKp;
  373.     }

  374.     /** Get fixed (time invariant) value of the planetary 3-hour-range geomagnetic index aₚ.
  375.      * @return fixed (time invariant) value of the planetary 3-hour-range geomagnetic index aₚ
  376.      */
  377.     public double getFixedGeomagneticAp() {
  378.         return fixedGeomagneticAp;
  379.     }

  380.     /** Set fixed (time invariant) value of the planetary 3-hour-range geomagnetic index aₚ.
  381.      * @param fixedGeomagneticAp fixed (time invariant) value of the planetary 3-hour-range geomagnetic index aₚ
  382.      */
  383.     public void setFixedGeomagneticAp(final double fixedGeomagneticAp) {
  384.         this.fixedGeomagneticAp = fixedGeomagneticAp;
  385.     }

  386.     /** Get fixed (time invariant) value of the planetary 1-hour-range geomagnetic index Dst.
  387.      * @return fixed (time invariant) value of the planetary 1-hour-range geomagnetic index Dst
  388.      */
  389.     public double getFixedGeomagneticDst() {
  390.         return fixedGeomagneticDst;
  391.     }

  392.     /** Set fixed (time invariant) value of the planetary 1-hour-range geomagnetic index Dst.
  393.      * @param fixedGeomagneticDst fixed (time invariant) value of the planetary 1-hour-range geomagnetic index Dst
  394.      */
  395.     public void setFixedGeomagneticDst(final double fixedGeomagneticDst) {
  396.         this.fixedGeomagneticDst = fixedGeomagneticDst;
  397.     }

  398.     /** Get fixed (time invariant) value of the Solar Flux Unit daily proxy F10.7.
  399.      * @return fixed (time invariant) value of the Solar Flux Unit daily proxy F10.7
  400.      */
  401.     public double getFixedF10P7() {
  402.         return fixedF10P7;
  403.     }

  404.     /** Set fixed (time invariant) value of the Solar Flux Unit daily proxy F10.7.
  405.      * @param fixedF10P7 fixed (time invariant) value of the Solar Flux Unit daily proxy F10.7
  406.      */
  407.     public void setFixedF10P7(final double fixedF10P7) {
  408.         this.fixedF10P7 = fixedF10P7;
  409.     }

  410.     /** Get fixed (time invariant) value of the Solar Flux Unit 81-day running center-average proxy F10.7.
  411.      * @return fixed (time invariant) value of the Solar Flux Unit 81-day running center-average proxy F10.7
  412.      */
  413.     public double getFixedF10P7Mean() {
  414.         return fixedF10P7Mean;
  415.     }

  416.     /** Set fixed (time invariant) value of the Solar Flux Unit 81-day running center-average proxy F10.7.
  417.      * @param fixedF10P7Mean fixed (time invariant) value of the Solar Flux Unit 81-day running center-average proxy F10.7
  418.      */
  419.     public void setFixedF10P7Mean(final double fixedF10P7Mean) {
  420.         this.fixedF10P7Mean = fixedF10P7Mean;
  421.     }

  422.     /** Get fixed (time invariant) value of the Solar Flux daily proxy M10.7.
  423.      * @return fixed (time invariant) value of the Solar Flux daily proxy M10.7
  424.      */
  425.     public double getFixedM10P7() {
  426.         return fixedM10P7;
  427.     }

  428.     /** Set fixed (time invariant) value of the Solar Flux daily proxy M10.7.
  429.      * @param fixedM10P7 fixed (time invariant) value of the Solar Flux daily proxy M10.7
  430.      */
  431.     public void setFixedM10P7(final double fixedM10P7) {
  432.         this.fixedM10P7 = fixedM10P7;
  433.     }

  434.     /** Get fixed (time invariant) value of the Solar Flux 81-day running center-average proxy M10.7.
  435.      * @return fixed (time invariant) value of the Solar Flux 81-day running center-average proxy M10.7
  436.      */
  437.     public double getFixedM10P7Mean() {
  438.         return fixedM10P7Mean;
  439.     }

  440.     /** Set fixed (time invariant) value of the Solar Flux 81-day running center-average proxy M10.7.
  441.      * @param fixedM10P7Mean fixed (time invariant) value of the Solar Flux 81-day running center-average proxy M10.7
  442.      */
  443.     public void setFixedM10P7Mean(final double fixedM10P7Mean) {
  444.         this.fixedM10P7Mean = fixedM10P7Mean;
  445.     }

  446.     /** Get fixed (time invariant) value of the Solar Flux daily proxy S10.7.
  447.      * @return fixed (time invariant) value of the Solar Flux daily proxy S10.7
  448.      */
  449.     public double getFixedS10P7() {
  450.         return fixedS10P7;
  451.     }

  452.     /** Set fixed (time invariant) value of the Solar Flux daily proxy S10.7.
  453.      * @param fixedS10P7 fixed (time invariant) value of the Solar Flux daily proxy S10.7
  454.      */
  455.     public void setFixedS10P7(final double fixedS10P7) {
  456.         this.fixedS10P7 = fixedS10P7;
  457.     }

  458.     /** Get fixed (time invariant) value of the Solar Flux 81-day running center-average proxy S10.7.
  459.      * @return fixed (time invariant) value of the Solar Flux 81-day running center-average proxy S10.7
  460.      */
  461.     public double getFixedS10P7Mean() {
  462.         return fixedS10P7Mean;
  463.     }

  464.     /** Set fixed (time invariant) value of the Solar Flux 81-day running center-average proxy S10.7.
  465.      * @param fixedS10P7Mean fixed (time invariant) value of the Solar Flux 81-day running center-average proxy S10.7
  466.      */
  467.     public void setFixedS10P7Mean(final double fixedS10P7Mean) {
  468.         this.fixedS10P7Mean = fixedS10P7Mean;
  469.     }

  470.     /** Get fixed (time invariant) value of the Solar Flux daily proxy Y10.7.
  471.      * @return fixed (time invariant) value of the Solar Flux daily proxy Y10.7
  472.      */
  473.     public double getFixedY10P7() {
  474.         return fixedY10P7;
  475.     }

  476.     /** Set fixed (time invariant) value of the Solar Flux daily proxy Y10.7.
  477.      * @param fixedY10P7 fixed (time invariant) value of the Solar Flux daily proxy Y10.7
  478.      */
  479.     public void setFixedY10P7(final double fixedY10P7) {
  480.         this.fixedY10P7 = fixedY10P7;
  481.     }

  482.     /** Get fixed (time invariant) value of the Solar Flux 81-day running center-average proxy Y10.7.
  483.      * @return fixed (time invariant) value of the Solar Flux 81-day running center-average proxy Y10.7
  484.      */
  485.     public double getFixedY10P7Mean() {
  486.         return fixedY10P7Mean;
  487.     }

  488.     /** Set fixed (time invariant) value of the Solar Flux 81-day running center-average proxy Y10.7.
  489.      * @param fixedY10P7Mean fixed (time invariant) value of the Solar Flux 81-day running center-average proxy Y10.7
  490.      */
  491.     public void setFixedY10P7Mean(final double fixedY10P7Mean) {
  492.         this.fixedY10P7Mean = fixedY10P7Mean;
  493.     }

  494. }