OrbitManeuver.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 org.hipparchus.geometry.euclidean.threed.Vector3D;
  19. import org.orekit.files.ccsds.definitions.OnOff;
  20. import org.orekit.time.AbsoluteDate;
  21. import org.orekit.time.TimeStamped;

  22. /** Maneuver entry.
  23.  * @author Luc Maisonobe
  24.  * @since 11.0
  25.  */
  26. public class OrbitManeuver implements TimeStamped {

  27.     /** Maneuver date. */
  28.     private AbsoluteDate date;

  29.     /** Duration. */
  30.     private double duration;

  31.     /** Mass change. */
  32.     private double deltaMass;

  33.     /** Acceleration. */
  34.     private double[] acceleration;

  35.     /** Interpolation mode between current and next acceleration line. */
  36.     private OnOff accelerationInterpolation;

  37.     /** One σ percent error on acceleration magnitude. */
  38.     private double accelerationMagnitudeSigma;

  39.     /** One σ angular off-nominal acceleration direction. */
  40.     private double accelerationDirectionSigma;

  41.     /** Velocity increment. */
  42.     private double[] dV;

  43.     /** One σ percent error on ΔV magnitude. */
  44.     private double dvMagSigma;

  45.     /** One σ angular off-nominal ΔV direction. */
  46.     private double dvDirSigma;

  47.     /** Thrust. */
  48.     private double[] thrust;

  49.     /** Thrust efficiency η typically between 0.0 and 1.0. */
  50.     private double thrustEfficiency;

  51.     /** Interpolation mode between current and next acceleration line. */
  52.     private OnOff thrustInterpolation;

  53.     /** Thrust specific impulse. */
  54.     private double thrustIsp;

  55.     /** One σ percent error on thrust magnitude. */
  56.     private double thrustMagnitudeSigma;

  57.     /** One σ angular off-nominal thrust direction. */
  58.     private double thrustDirectionSigma;

  59.     /** Identifier of resulting "child" object deployed from this host. */
  60.     private String deployId;

  61.     /** Velocity increment of deployed "child" object. */
  62.     private double[] deployDv;

  63.     /** Decrement in host mass as a result of deployment (shall be ≤ 0). */
  64.     private double deployMass;

  65.     /** One σ percent error on deployment ΔV magnitude. */
  66.     private double deployDvSigma;

  67.     /** One σ angular off-nominal deployment vector direction. */
  68.     private double deployDirSigma;

  69.     /** Ratio of child-to-host ΔV vectors. */
  70.     private double deployDvRatio;

  71.     /** Typical (50th percentile) product of drag coefficient times cross-sectional area of deployed "child" object. */
  72.     private double deployDvCda;

  73.     /** Build an uninitialized maneuver.
  74.      */
  75.     public OrbitManeuver() {
  76.         acceleration = new double[3];
  77.         dV           = new double[3];
  78.         thrust       = new double[3];
  79.         deployDv     = new double[3];
  80.     }

  81.     /** {@inheritDoc} */
  82.     @Override
  83.     public AbsoluteDate getDate() {
  84.         return date;
  85.     }

  86.     /** Set date.
  87.      * @param date maneuver date
  88.      */
  89.     public void setDate(final AbsoluteDate date) {
  90.         this.date = date;
  91.     }

  92.     /** Get duration.
  93.      * @return duration
  94.      */
  95.     public double getDuration() {
  96.         return duration;
  97.     }

  98.     /** Set duration.
  99.      * @param duration duration
  100.      */
  101.     public void setDuration(final double duration) {
  102.         this.duration = duration;
  103.     }

  104.     /** Get mass change.
  105.      * @return mass change
  106.      */
  107.     public double getDeltaMass() {
  108.         return deltaMass;
  109.     }

  110.     /** Set mass change.
  111.      * @param deltaMass mass change
  112.      */
  113.     public void setDeltaMass(final double deltaMass) {
  114.         this.deltaMass = deltaMass;
  115.     }

  116.     /** Get acceleration.
  117.      * @return acceleration
  118.      */
  119.     public Vector3D getAcceleration() {
  120.         return new Vector3D(acceleration);
  121.     }

  122.     /** Set acceleration component.
  123.      * @param i component index
  124.      * @param ai i<sup>th</sup> component of acceleration
  125.      */
  126.     public void setAcceleration(final int i, final double ai) {
  127.         acceleration[i] = ai;
  128.     }

  129.     /** Get interpolation mode between current and next acceleration line.
  130.      * @return interpolation mode between current and next acceleration line
  131.      */
  132.     public OnOff getAccelerationInterpolation() {
  133.         return accelerationInterpolation;
  134.     }

  135.     /** Set interpolation mode between current and next acceleration line.
  136.      * @param accelerationInterpolation interpolation mode between current and next acceleration line
  137.      */
  138.     public void setAccelerationInterpolation(final OnOff accelerationInterpolation) {
  139.         this.accelerationInterpolation = accelerationInterpolation;
  140.     }

  141.     /** Get one σ percent error on acceleration magnitude.
  142.      * @return one σ percent error on acceleration magnitude
  143.      */
  144.     public double getAccelerationMagnitudeSigma() {
  145.         return accelerationMagnitudeSigma;
  146.     }

  147.     /** Set one σ percent error on acceleration magnitude.
  148.      * @param accelerationMagnitudeSigma one σ percent error on acceleration magnitude
  149.      */
  150.     public void setAccelerationMagnitudeSigma(final double accelerationMagnitudeSigma) {
  151.         this.accelerationMagnitudeSigma = accelerationMagnitudeSigma;
  152.     }

  153.     /** Get one σ angular off-nominal acceleration direction.
  154.      * @return one σ angular off-nominal acceleration direction
  155.      */
  156.     public double getAccelerationDirectionSigma() {
  157.         return accelerationDirectionSigma;
  158.     }

  159.     /** Set one σ angular off-nominal acceleration direction.
  160.      * @param accelerationDirectionSigma one σ angular off-nominal acceleration direction
  161.      */
  162.     public void setAccelerationDirectionSigma(final double accelerationDirectionSigma) {
  163.         this.accelerationDirectionSigma = accelerationDirectionSigma;
  164.     }

  165.     /** Get velocity increment.
  166.      * @return velocity increment
  167.      */
  168.     public Vector3D getDv() {
  169.         return new Vector3D(dV);
  170.     }

  171.     /** Set velocity increment component.
  172.      * @param i component index
  173.      * @param dVi i<sup>th</sup> component of velocity increment
  174.      */
  175.     public void setDv(final int i, final double dVi) {
  176.         dV[i] = dVi;
  177.     }

  178.     /** Get one σ percent error on ΔV  magnitude.
  179.      * @return one σ percent error on ΔV  magnitude
  180.      */
  181.     public double getDvMagSigma() {
  182.         return dvMagSigma;
  183.     }

  184.     /** Set one σ percent error on ΔV  magnitude.
  185.      * @param dvMagSigma one σ percent error on ΔV  magnitude
  186.      */
  187.     public void setDvMagSigma(final double dvMagSigma) {
  188.         this.dvMagSigma = dvMagSigma;
  189.     }

  190.     /** Get one σ angular off-nominal ΔV direction.
  191.      * @return one σ angular off-nominal ΔV direction
  192.      */
  193.     public double getDvDirSigma() {
  194.         return dvDirSigma;
  195.     }

  196.     /** Set one σ angular off-nominal ΔV direction.
  197.      * @param dvDirSigma one σ angular off-nominal ΔV direction
  198.      */
  199.     public void setDvDirSigma(final double dvDirSigma) {
  200.         this.dvDirSigma = dvDirSigma;
  201.     }

  202.     /** Get thrust.
  203.      * @return thrust
  204.      */
  205.     public Vector3D getThrust() {
  206.         return new Vector3D(thrust);
  207.     }

  208.     /** Set thrust component.
  209.      * @param i component index
  210.      * @param ti i<sup>th</sup> component of thrust
  211.      */
  212.     public void setThrust(final int i, final double ti) {
  213.         thrust[i] = ti;
  214.     }

  215.     /** Get thrust efficiency η.
  216.      * @return thrust efficiency η (typically between 0.0 and 1.0)
  217.      */
  218.     public double getThrustEfficiency() {
  219.         return thrustEfficiency;
  220.     }

  221.     /** Set thrust efficiency η.
  222.      * @param thrustEfficiency thrust efficiency η (typically between 0.0 and 1.0)
  223.      */
  224.     public void setThrustEfficiency(final double thrustEfficiency) {
  225.         this.thrustEfficiency = thrustEfficiency;
  226.     }

  227.     /** Get interpolation mode between current and next thrust line.
  228.      * @return interpolation mode between current and next thrust line
  229.      */
  230.     public OnOff getThrustInterpolation() {
  231.         return thrustInterpolation;
  232.     }

  233.     /** Set interpolation mode between current and next thrust line.
  234.      * @param thrustInterpolation interpolation mode between current and next thrust line
  235.      */
  236.     public void setThrustInterpolation(final OnOff thrustInterpolation) {
  237.         this.thrustInterpolation = thrustInterpolation;
  238.     }

  239.     /** Get thrust specific impulse.
  240.      * @return thrust specific impulse
  241.      */
  242.     public double getThrustIsp() {
  243.         return thrustIsp;
  244.     }

  245.     /** Set thrust specific impulse.
  246.      * @param thrustIsp thrust specific impulse
  247.      */
  248.     public void setThrustIsp(final double thrustIsp) {
  249.         this.thrustIsp = thrustIsp;
  250.     }

  251.     /** Get one σ percent error on thrust magnitude.
  252.      * @return one σ percent error on thrust magnitude
  253.      */
  254.     public double getThrustMagnitudeSigma() {
  255.         return thrustMagnitudeSigma;
  256.     }

  257.     /** Set one σ percent error on thrust magnitude.
  258.      * @param thrustMagnitudeSigma one σ percent error on thrust magnitude
  259.      */
  260.     public void setThrustMagnitudeSigma(final double thrustMagnitudeSigma) {
  261.         this.thrustMagnitudeSigma = thrustMagnitudeSigma;
  262.     }

  263.     /** Get one σ angular off-nominal thrust direction.
  264.      * @return one σ angular off-nominal thrust direction
  265.      */
  266.     public double getThrustDirectionSigma() {
  267.         return thrustDirectionSigma;
  268.     }

  269.     /** Set one σ angular off-nominal thrust direction.
  270.      * @param thrustDirectionSigma one σ angular off-nominal thrust direction
  271.      */
  272.     public void setThrustDirectionSigma(final double thrustDirectionSigma) {
  273.         this.thrustDirectionSigma = thrustDirectionSigma;
  274.     }

  275.     /** Get identifier of resulting "child" object deployed from this host.
  276.      * @return identifier of resulting "child" object deployed from this host
  277.      */
  278.     public String getDeployId() {
  279.         return deployId;
  280.     }

  281.     /** Set identifier of resulting "child" object deployed from this host.
  282.      * @param deployId identifier of resulting "child" object deployed from this host
  283.      */
  284.     public void setDeployId(final String deployId) {
  285.         this.deployId = deployId;
  286.     }

  287.     /** Get velocity increment of deployed "child" object.
  288.      * @return velocity increment of deployed "child" object
  289.      */
  290.     public Vector3D getDeployDv() {
  291.         return new Vector3D(deployDv);
  292.     }

  293.     /** Set velocity increment component of deployed "child" object.
  294.      * @param i component index
  295.      * @param deployDvi i<sup>th</sup> component of velocity increment of deployed "child" object
  296.      */
  297.     public void setDeployDv(final int i, final double deployDvi) {
  298.         deployDv[i] = deployDvi;
  299.     }

  300.     /** Get decrement in host mass as a result of deployment.
  301.      * @return decrement in host mass as a result of deployment (shall be ≤ 0)
  302.      */
  303.     public double getDeployMass() {
  304.         return deployMass;
  305.     }

  306.     /** Set decrement in host mass as a result of deployment.
  307.      * @param deployMass decrement in host mass as a result of deployment (shall be ≤ 0)
  308.      */
  309.     public void setDeployMass(final double deployMass) {
  310.         this.deployMass = deployMass;
  311.     }

  312.     /** Get one σ percent error on deployment ΔV magnitude.
  313.      * @return one σ percent error on deployment ΔV magnitude
  314.      */
  315.     public double getDeployDvSigma() {
  316.         return deployDvSigma;
  317.     }

  318.     /** Set one σ percent error on deployment ΔV magnitude.
  319.      * @param deployDvSigma one σ percent error on deployment ΔV magnitude
  320.      */
  321.     public void setDeployDvSigma(final double deployDvSigma) {
  322.         this.deployDvSigma = deployDvSigma;
  323.     }

  324.     /** Get one σ angular off-nominal deployment vector direction.
  325.      * @return one σ angular off-nominal deployment vector direction
  326.      */
  327.     public double getDeployDirSigma() {
  328.         return deployDirSigma;
  329.     }

  330.     /** Set one σ angular off-nominal deployment vector direction.
  331.      * @param deployDirSigma one σ angular off-nominal deployment vector direction
  332.      */
  333.     public void setDeployDirSigma(final double deployDirSigma) {
  334.         this.deployDirSigma = deployDirSigma;
  335.     }

  336.     /** Get ratio of child-to-host ΔV vectors.
  337.      * @return ratio of child-to-host ΔV vectors
  338.      */
  339.     public double getDeployDvRatio() {
  340.         return deployDvRatio;
  341.     }

  342.     /** Set ratio of child-to-host ΔV vectors.
  343.      * @param deployDvRatio ratio of child-to-host ΔV vectors
  344.      */
  345.     public void setDeployDvRatio(final double deployDvRatio) {
  346.         this.deployDvRatio = deployDvRatio;
  347.     }

  348.     /** Get typical (50th percentile) product of drag coefficient times cross-sectional area of deployed "child" object.
  349.      * @return typical (50th percentile) product of drag coefficient times cross-sectional area of deployed "child" object
  350.      */
  351.     public double getDeployDvCda() {
  352.         return deployDvCda;
  353.     }

  354.     /** Set typical (50th percentile) product of drag coefficient times cross-sectional area of deployed "child" object.
  355.      * @param deployDvCda typical (50th percentile) product of drag coefficient times cross-sectional area of deployed "child" object
  356.      */
  357.     public void setDeployDvCda(final double deployDvCda) {
  358.         this.deployDvCda = deployDvCda;
  359.     }

  360. }