Perturbations.java

  1. /* Copyright 2002-2022 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.  * @author Luc Maisonobe
  26.  * @since 11.0
  27.  */
  28. public class Perturbations extends CommentsContainer {

  29.     /** Name of atmospheric model. */
  30.     private String atmosphericModel;

  31.     /** Gravity model name. */
  32.     private String gravityModel;

  33.     /** Degree of the gravity model. */
  34.     private int gravityDegree;

  35.     /** Order of the gravity model. */
  36.     private int gravityOrder;

  37.     /** Oblate spheroid equatorial radius of central body. */
  38.     private double equatorialRadius;

  39.     /** Gravitational coefficient of attracting body. */
  40.     private double gm;

  41.     /** N-body perturbation bodies. */
  42.     private List<BodyFacade> nBodyPerturbations;

  43.     /** Central body angular rotation rate. */
  44.     private double centralBodyRotation;

  45.     /** Central body oblate spheroid oblateness. */
  46.     private double oblateFlattening;

  47.     /** Ocean tides model. */
  48.     private String oceanTidesModel;

  49.     /** Solid tides model. */
  50.     private String solidTidesModel;

  51.     /** Reduction theory used for precession and nutation modeling. */
  52.     private String reductionTheory;

  53.     /** Albedo model. */
  54.     private String albedoModel;

  55.     /** Albedo grid size. */
  56.     private int albedoGridSize;

  57.     /** Shadow model used for solar radiation pressure. */
  58.     private ShadowModel shadowModel;

  59.     /** Celestial bodies casting shadow. */
  60.     private List<BodyFacade> shadowBodies;

  61.     /** Solar Radiation Pressure model. */
  62.     private String srpModel;

  63.     /** Space Weather data source. */
  64.     private String spaceWeatherSource;

  65.     /** Epoch of the Space Weather data. */
  66.     private AbsoluteDate spaceWeatherEpoch;

  67.     /** Interpolation method for Space Weather data. */
  68.     private String interpMethodSW;

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

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

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

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

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

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

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

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

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

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

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

  91.     /** Simple constructor.
  92.      * @param celestialBodies factory for celestial bodies
  93.      */
  94.     public Perturbations(final CelestialBodies celestialBodies) {
  95.         // we don't call the setXxx() methods in order to avoid
  96.         // calling refuseFurtherComments as a side effect
  97.         equatorialRadius    = Double.NaN;
  98.         gm                  = Double.NaN;
  99.         centralBodyRotation = Double.NaN;
  100.         oblateFlattening    = Double.NaN;
  101.         fixedGeomagneticKp  = Double.NaN;
  102.         fixedGeomagneticAp  = Double.NaN;
  103.         fixedGeomagneticDst = Double.NaN;
  104.         fixedF10P7          = Double.NaN;
  105.         fixedF10P7Mean      = Double.NaN;
  106.         fixedM10P7          = Double.NaN;
  107.         fixedM10P7Mean      = Double.NaN;
  108.         fixedS10P7          = Double.NaN;
  109.         fixedS10P7Mean      = Double.NaN;
  110.         fixedY10P7          = Double.NaN;
  111.         fixedY10P7Mean      = Double.NaN;
  112.         shadowBodies = Collections.singletonList(new BodyFacade(celestialBodies.getEarth().getName(),
  113.                                                                 celestialBodies.getEarth()));
  114.     }

  115.     /** Get name of atmospheric model.
  116.      * @return name of atmospheric model
  117.      */
  118.     public String getAtmosphericModel() {
  119.         return atmosphericModel;
  120.     }

  121.     /** Set name of atmospheric model.
  122.      * @param atmosphericModel name of atmospheric model
  123.      */
  124.     public void setAtmosphericModel(final String atmosphericModel) {
  125.         this.atmosphericModel = atmosphericModel;
  126.     }

  127.     /** Get gravity model name.
  128.      * @return gravity model name
  129.      */
  130.     public String getGravityModel() {
  131.         return gravityModel;
  132.     }

  133.     /** Get degree of the gravity model.
  134.      * @return degree of the gravity model
  135.      */
  136.     public int getGravityDegree() {
  137.         return gravityDegree;
  138.     }

  139.     /** Get order of the gravity model.
  140.      * @return order of the gravity model
  141.      */
  142.     public int getGravityOrder() {
  143.         return gravityOrder;
  144.     }

  145.     /** Set gravity model.
  146.      * @param name name of the model
  147.      * @param degree degree of the model
  148.      * @param order order of the model
  149.      */
  150.     public void setGravityModel(final String name, final int degree, final int order) {
  151.         this.gravityModel  = name;
  152.         this.gravityDegree = degree;
  153.         this.gravityOrder  = order;
  154.     }

  155.     /** Get oblate spheroid equatorial radius of central body.
  156.      * @return oblate spheroid equatorial radius of central body
  157.      */
  158.     public double getEquatorialRadius() {
  159.         return equatorialRadius;
  160.     }

  161.     /** Set oblate spheroid equatorial radius of central body.
  162.      * @param equatorialRadius oblate spheroid equatorial radius of central body
  163.      */
  164.     public void setEquatorialRadius(final double equatorialRadius) {
  165.         this.equatorialRadius = equatorialRadius;
  166.     }

  167.     /** Get gravitational coefficient of attracting body.
  168.      * @return gravitational coefficient of attracting body
  169.      */
  170.     public double getGm() {
  171.         return gm;
  172.     }

  173.     /** Set gravitational coefficient of attracting body.
  174.      * @param gm gravitational coefficient of attracting body
  175.      */
  176.     public void setGm(final double gm) {
  177.         this.gm = gm;
  178.     }

  179.     /** Get n-body perturbation bodies.
  180.      * @return n-body perturbation bodies
  181.      */
  182.     public List<BodyFacade> getNBodyPerturbations() {
  183.         return nBodyPerturbations;
  184.     }

  185.     /** Set n-body perturbation bodies.
  186.      * @param nBody n-body perturbation bodies
  187.      */
  188.     public void setNBodyPerturbations(final List<BodyFacade> nBody) {
  189.         this.nBodyPerturbations = nBody;
  190.     }

  191.     /** Get central body angular rotation rate.
  192.      * @return central body angular rotation rate
  193.      */
  194.     public double getCentralBodyRotation() {
  195.         return centralBodyRotation;
  196.     }

  197.     /** Set central body angular rotation rate.
  198.      * @param centralBodyRotation central body angular rotation rate
  199.      */
  200.     public void setCentralBodyRotation(final double centralBodyRotation) {
  201.         this.centralBodyRotation = centralBodyRotation;
  202.     }

  203.     /** Get central body oblate spheroid oblateness.
  204.      * @return central body oblate spheroid oblateness
  205.      */
  206.     public double getOblateFlattening() {
  207.         return oblateFlattening;
  208.     }

  209.     /** Set central body oblate spheroid oblateness.
  210.      * @param oblateFlattening central body oblate spheroid oblateness
  211.      */
  212.     public void setOblateFlattening(final double oblateFlattening) {
  213.         this.oblateFlattening = oblateFlattening;
  214.     }

  215.     /** Get ocean tides model.
  216.      * @return ocean tides model
  217.      */
  218.     public String getOceanTidesModel() {
  219.         return oceanTidesModel;
  220.     }

  221.     /** Set ocean tides model.
  222.      * @param oceanTidesModel ocean tides model
  223.      */
  224.     public void setOceanTidesModel(final String oceanTidesModel) {
  225.         this.oceanTidesModel = oceanTidesModel;
  226.     }

  227.     /** Get solid tides model.
  228.      * @return solid tides model
  229.      */
  230.     public String getSolidTidesModel() {
  231.         return solidTidesModel;
  232.     }

  233.     /** Set solid tides model.
  234.      * @param solidTidesModel solid tides model
  235.      */
  236.     public void setSolidTidesModel(final String solidTidesModel) {
  237.         this.solidTidesModel = solidTidesModel;
  238.     }

  239.     /** Get reduction theory used for precession and nutation modeling.
  240.      * @return reduction theory used for precession and nutation modeling
  241.      */
  242.     public String getReductionTheory() {
  243.         return reductionTheory;
  244.     }

  245.     /** Set reduction theory used for precession and nutation modeling.
  246.      * @param reductionTheory reduction theory used for precession and nutation modeling
  247.      */
  248.     public void setReductionTheory(final String reductionTheory) {
  249.         this.reductionTheory = reductionTheory;
  250.     }

  251.     /** Get albedo model.
  252.      * @return albedo model
  253.      */
  254.     public String getAlbedoModel() {
  255.         return albedoModel;
  256.     }

  257.     /** Set albedo model.
  258.      * @param albedoModel albedo model
  259.      */
  260.     public void setAlbedoModel(final String albedoModel) {
  261.         this.albedoModel = albedoModel;
  262.     }

  263.     /** Get albedo grid size.
  264.      * @return albedo grid size
  265.      */
  266.     public int getAlbedoGridSize() {
  267.         return albedoGridSize;
  268.     }

  269.     /** Set albedo grid size.
  270.      * @param albedoGridSize albedo grid size
  271.      */
  272.     public void setAlbedoGridSize(final int albedoGridSize) {
  273.         this.albedoGridSize = albedoGridSize;
  274.     }

  275.     /** Get shadow model used for solar radiation pressure.
  276.      * @return shadow model used for solar radiation pressure
  277.      */
  278.     public ShadowModel getShadowModel() {
  279.         return shadowModel;
  280.     }

  281.     /** Set shadow model used for solar radiation pressure.
  282.      * @param shadowModel shadow model used for solar radiation pressure
  283.      */
  284.     public void setShadowModel(final ShadowModel shadowModel) {
  285.         this.shadowModel = shadowModel;
  286.     }

  287.     /** Get celestial bodies casting shadows.
  288.      * @return celestial bodies casting shadows
  289.      */
  290.     public List<BodyFacade> getShadowBodies() {
  291.         return shadowBodies;
  292.     }

  293.     /** Set celestial bodies casting shadows.
  294.      * @param shadowBodies celestial bodies casting shadows
  295.      */
  296.     public void setShadowBodies(final List<BodyFacade> shadowBodies) {
  297.         this.shadowBodies = shadowBodies;
  298.     }

  299.     /** Get Solar Radiation Pressure model.
  300.      * @return Solar Radiation Pressure model
  301.      */
  302.     public String getSrpModel() {
  303.         return srpModel;
  304.     }

  305.     /** Set Solar Radiation Pressure model.
  306.      * @param srpModel Solar Radiation Pressure model
  307.      */
  308.     public void setSrpModel(final String srpModel) {
  309.         this.srpModel = srpModel;
  310.     }

  311.     /** Get Space Weather data source.
  312.      * @return Space Weather data source
  313.      */
  314.     public String getSpaceWeatherSource() {
  315.         return spaceWeatherSource;
  316.     }

  317.     /** Set Space Weather data source.
  318.      * @param spaceWeatherSource Space Weather data source
  319.      */
  320.     public void setSpaceWeatherSource(final String spaceWeatherSource) {
  321.         this.spaceWeatherSource = spaceWeatherSource;
  322.     }

  323.     /** Get epoch of the Space Weather data.
  324.      * @return epoch of the Space Weather data
  325.      */
  326.     public AbsoluteDate getSpaceWeatherEpoch() {
  327.         return spaceWeatherEpoch;
  328.     }

  329.     /** Set epoch of the Space Weather data.
  330.      * @param spaceWeatherEpoch epoch of the Space Weather data
  331.      */
  332.     public void setSpaceWeatherEpoch(final AbsoluteDate spaceWeatherEpoch) {
  333.         this.spaceWeatherEpoch = spaceWeatherEpoch;
  334.     }

  335.     /** Get the interpolation method for Space Weather data.
  336.      * @return interpolation method for Space Weather data
  337.      */
  338.     public String getInterpMethodSW() {
  339.         return interpMethodSW;
  340.     }

  341.     /** Set the interpolation method for Space Weather data.
  342.      * @param interpMethodSW interpolation method for Space Weather data
  343.      */
  344.     public void setInterpMethodSW(final String interpMethodSW) {
  345.         refuseFurtherComments();
  346.         this.interpMethodSW = interpMethodSW;
  347.     }

  348.     /** Get fixed (time invariant) value of the planetary 3-hour-range geomagnetic index Kₚ.
  349.      * @return fixed (time invariant) value of the planetary 3-hour-range geomagnetic index Kₚ
  350.      */
  351.     public double getFixedGeomagneticKp() {
  352.         return fixedGeomagneticKp;
  353.     }

  354.     /** Set fixed (time invariant) value of the planetary 3-hour-range geomagnetic index Kₚ.
  355.      * @param fixedGeomagneticKp fixed (time invariant) value of the planetary 3-hour-range geomagnetic index Kₚ
  356.      */
  357.     public void setFixedGeomagneticKp(final double fixedGeomagneticKp) {
  358.         this.fixedGeomagneticKp = fixedGeomagneticKp;
  359.     }

  360.     /** Get fixed (time invariant) value of the planetary 3-hour-range geomagnetic index aₚ.
  361.      * @return fixed (time invariant) value of the planetary 3-hour-range geomagnetic index aₚ
  362.      */
  363.     public double getFixedGeomagneticAp() {
  364.         return fixedGeomagneticAp;
  365.     }

  366.     /** Set fixed (time invariant) value of the planetary 3-hour-range geomagnetic index aₚ.
  367.      * @param fixedGeomagneticAp fixed (time invariant) value of the planetary 3-hour-range geomagnetic index aₚ
  368.      */
  369.     public void setFixedGeomagneticAp(final double fixedGeomagneticAp) {
  370.         this.fixedGeomagneticAp = fixedGeomagneticAp;
  371.     }

  372.     /** Get fixed (time invariant) value of the planetary 1-hour-range geomagnetic index Dst.
  373.      * @return fixed (time invariant) value of the planetary 1-hour-range geomagnetic index Dst
  374.      */
  375.     public double getFixedGeomagneticDst() {
  376.         return fixedGeomagneticDst;
  377.     }

  378.     /** Set fixed (time invariant) value of the planetary 1-hour-range geomagnetic index Dst.
  379.      * @param fixedGeomagneticDst fixed (time invariant) value of the planetary 1-hour-range geomagnetic index Dst
  380.      */
  381.     public void setFixedGeomagneticDst(final double fixedGeomagneticDst) {
  382.         this.fixedGeomagneticDst = fixedGeomagneticDst;
  383.     }

  384.     /** Get fixed (time invariant) value of the Solar Flux Unit daily proxy F10.7.
  385.      * @return fixed (time invariant) value of the Solar Flux Unit daily proxy F10.7
  386.      */
  387.     public double getFixedF10P7() {
  388.         return fixedF10P7;
  389.     }

  390.     /** Set fixed (time invariant) value of the Solar Flux Unit daily proxy F10.7.
  391.      * @param fixedF10P7 fixed (time invariant) value of the Solar Flux Unit daily proxy F10.7
  392.      */
  393.     public void setFixedF10P7(final double fixedF10P7) {
  394.         this.fixedF10P7 = fixedF10P7;
  395.     }

  396.     /** Get fixed (time invariant) value of the Solar Flux Unit 81-day running center-average proxy F10.7.
  397.      * @return fixed (time invariant) value of the Solar Flux Unit 81-day running center-average proxy F10.7
  398.      */
  399.     public double getFixedF10P7Mean() {
  400.         return fixedF10P7Mean;
  401.     }

  402.     /** Set fixed (time invariant) value of the Solar Flux Unit 81-day running center-average proxy F10.7.
  403.      * @param fixedF10P7Mean fixed (time invariant) value of the Solar Flux Unit 81-day running center-average proxy F10.7
  404.      */
  405.     public void setFixedF10P7Mean(final double fixedF10P7Mean) {
  406.         this.fixedF10P7Mean = fixedF10P7Mean;
  407.     }

  408.     /** Get fixed (time invariant) value of the Solar Flux daily proxy M10.7.
  409.      * @return fixed (time invariant) value of the Solar Flux daily proxy M10.7
  410.      */
  411.     public double getFixedM10P7() {
  412.         return fixedM10P7;
  413.     }

  414.     /** Set fixed (time invariant) value of the Solar Flux daily proxy M10.7.
  415.      * @param fixedM10P7 fixed (time invariant) value of the Solar Flux daily proxy M10.7
  416.      */
  417.     public void setFixedM10P7(final double fixedM10P7) {
  418.         this.fixedM10P7 = fixedM10P7;
  419.     }

  420.     /** Get fixed (time invariant) value of the Solar Flux 81-day running center-average proxy M10.7.
  421.      * @return fixed (time invariant) value of the Solar Flux 81-day running center-average proxy M10.7
  422.      */
  423.     public double getFixedM10P7Mean() {
  424.         return fixedM10P7Mean;
  425.     }

  426.     /** Set fixed (time invariant) value of the Solar Flux 81-day running center-average proxy M10.7.
  427.      * @param fixedM10P7Mean fixed (time invariant) value of the Solar Flux 81-day running center-average proxy M10.7
  428.      */
  429.     public void setFixedM10P7Mean(final double fixedM10P7Mean) {
  430.         this.fixedM10P7Mean = fixedM10P7Mean;
  431.     }

  432.     /** Get fixed (time invariant) value of the Solar Flux daily proxy S10.7.
  433.      * @return fixed (time invariant) value of the Solar Flux daily proxy S10.7
  434.      */
  435.     public double getFixedS10P7() {
  436.         return fixedS10P7;
  437.     }

  438.     /** Set fixed (time invariant) value of the Solar Flux daily proxy S10.7.
  439.      * @param fixedS10P7 fixed (time invariant) value of the Solar Flux daily proxy S10.7
  440.      */
  441.     public void setFixedS10P7(final double fixedS10P7) {
  442.         this.fixedS10P7 = fixedS10P7;
  443.     }

  444.     /** Get fixed (time invariant) value of the Solar Flux 81-day running center-average proxy S10.7.
  445.      * @return fixed (time invariant) value of the Solar Flux 81-day running center-average proxy S10.7
  446.      */
  447.     public double getFixedS10P7Mean() {
  448.         return fixedS10P7Mean;
  449.     }

  450.     /** Set fixed (time invariant) value of the Solar Flux 81-day running center-average proxy S10.7.
  451.      * @param fixedS10P7Mean fixed (time invariant) value of the Solar Flux 81-day running center-average proxy S10.7
  452.      */
  453.     public void setFixedS10P7Mean(final double fixedS10P7Mean) {
  454.         this.fixedS10P7Mean = fixedS10P7Mean;
  455.     }

  456.     /** Get fixed (time invariant) value of the Solar Flux daily proxy Y10.7.
  457.      * @return fixed (time invariant) value of the Solar Flux daily proxy Y10.7
  458.      */
  459.     public double getFixedY10P7() {
  460.         return fixedY10P7;
  461.     }

  462.     /** Set fixed (time invariant) value of the Solar Flux daily proxy Y10.7.
  463.      * @param fixedY10P7 fixed (time invariant) value of the Solar Flux daily proxy Y10.7
  464.      */
  465.     public void setFixedY10P7(final double fixedY10P7) {
  466.         this.fixedY10P7 = fixedY10P7;
  467.     }

  468.     /** Get fixed (time invariant) value of the Solar Flux 81-day running center-average proxy Y10.7.
  469.      * @return fixed (time invariant) value of the Solar Flux 81-day running center-average proxy Y10.7
  470.      */
  471.     public double getFixedY10P7Mean() {
  472.         return fixedY10P7Mean;
  473.     }

  474.     /** Set fixed (time invariant) value of the Solar Flux 81-day running center-average proxy Y10.7.
  475.      * @param fixedY10P7Mean fixed (time invariant) value of the Solar Flux 81-day running center-average proxy Y10.7
  476.      */
  477.     public void setFixedY10P7Mean(final double fixedY10P7Mean) {
  478.         this.fixedY10P7Mean = fixedY10P7Mean;
  479.     }

  480. }