APMFile.java

  1. /* Copyright 2002-2020 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;

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

  21. import org.hipparchus.complex.Quaternion;
  22. import org.hipparchus.geometry.euclidean.threed.Vector3D;
  23. import org.orekit.time.AbsoluteDate;

  24. /**
  25.  * This class stocks all the information of the Attitude Parameter Message (APM) File parsed
  26.  * by APMParser. It contains the header and the metadata and a the data lines.
  27.  * @author Bryan Cazabonne
  28.  * @since 10.2
  29.  */
  30. public class APMFile extends ADMFile {

  31.     /** Meta-data. */
  32.     private final ADMMetaData metaData;

  33.     /** Epoch of the data. */
  34.     private AbsoluteDate epoch;

  35.     /** Reference frame specifying one frame of the transformation. */
  36.     private String qFrameA;

  37.     /** Reference frame specifying the second portion of the transformation. */
  38.     private String qFrameB;

  39.     /** Rotation direction of the attitude quaternion. */
  40.     private String qDir;

  41.     /** Quaternion. */
  42.     private Quaternion quaternion;

  43.     /** Derivative of the Quaternion. */
  44.     private Quaternion quaternionDot;

  45.     /** Name of the reference frame specifying one frame of the transformation. */
  46.     private String eulerFrameA;

  47.     /** Name of the reference frame specifying the second portion of the transformation. */
  48.     private String eulerFrameB;

  49.     /** Rotation direction of the attitude Euler angles. */
  50.     private String eulerDir;

  51.     /**
  52.      * Rotation order of the {@link #eulerFrameA} to {@link #eulerFrameB} or vice versa.
  53.      * (e.g., 312, where X=1, Y=2, Z=3)
  54.      */
  55.     private String eulerRotSeq;

  56.     /** Frame of reference in which the {@link #rotationAngles} are expressed. */
  57.     private String rateFrame;

  58.     /** Euler angles [rad]. */
  59.     private Vector3D rotationAngles;

  60.     /** Rotation rate [rad/s]. */
  61.     private Vector3D rotationRates;

  62.     /** Name of the reference frame specifying one frame of the transformation. */
  63.     private String spinFrameA;

  64.     /** Name of the reference frame specifying the second portion of the transformation. */
  65.     private String spinFrameB;

  66.     /** Rotation direction of the Spin angles. */
  67.     private String spinDir;

  68.     /** Right ascension of spin axis vector (rad). */
  69.     private double spinAlpha;

  70.     /** Declination of the spin axis vector (rad). */
  71.     private double spinDelta;

  72.     /** Phase of the satellite about the spin axis (rad). */
  73.     private double spinAngle;

  74.     /** Angular velocity of satellite around spin axis (rad/s). */
  75.     private double spinAngleVel;

  76.     /** Nutation angle of spin axis (rad). */
  77.     private double nutation;

  78.     /** Body nutation period of the spin axis (s). */
  79.     private double nutationPer;

  80.     /** Inertial nutation phase (rad). */
  81.     private double nutationPhase;

  82.     /** Coordinate system for the inertia tensor. */
  83.     private String inertiaRefFrame;

  84.     /** Moment of Inertia about the 1-axis (kg.m²). */
  85.     private double i11;

  86.     /** Moment of Inertia about the 2-axis (kg.m²). */
  87.     private double i22;

  88.     /** Moment of Inertia about the 3-axis (kg.m²). */
  89.     private double i33;

  90.     /** Inertia Cross Product of the 1 and 2 axes (kg.m²). */
  91.     private double i12;

  92.     /** Inertia Cross Product of the 1 and 3 axes (kg.m²). */
  93.     private double i13;

  94.     /** Inertia Cross Product of the 2 and 3 axes (kg.m²). */
  95.     private double i23;

  96.     /** Epoch comments. The list contains a string for each line of comment. */
  97.     private List<String> epochComment;

  98.     /** Euler comments. The list contains a string for each line of comment. */
  99.     private List<String> eulerComment;

  100.     /** Spin comments. The list contains a string for each line of comment. */
  101.     private List<String> spinComment;

  102.     /** Spacecraft comments. The list contains a string for each line of comment. */
  103.     private List<String> spacecraftComment;

  104.     /** Maneuvers. */
  105.     private List<APMManeuver> maneuvers;

  106.     /**
  107.      * APMFile constructor.
  108.      */
  109.     public APMFile() {
  110.         this.metaData          = new ADMMetaData(this);
  111.         this.epochComment      = Collections.emptyList();
  112.         this.eulerComment      = Collections.emptyList();
  113.         this.spinComment       = Collections.emptyList();
  114.         this.spacecraftComment = Collections.emptyList();
  115.         this.maneuvers         = new ArrayList<>();
  116.         this.rotationAngles    = Vector3D.ZERO;
  117.         this.rotationRates     = Vector3D.ZERO;
  118.         this.quaternion        = new Quaternion(0.0, 0.0, 0.0, 0.0);
  119.         this.quaternionDot     = new Quaternion(0.0, 0.0, 0.0, 0.0);
  120.     }

  121.     /**
  122.      * Get the meta data.
  123.      * @return meta data
  124.      */
  125.     public ADMMetaData getMetaData() {
  126.         return metaData;
  127.     }

  128.     /**
  129.      * Get the epoch of the data.
  130.      * @return epoch the epoch
  131.      */
  132.     public AbsoluteDate getEpoch() {
  133.         return epoch;
  134.     }

  135.     /**
  136.      * Set the epoch of the data.
  137.      * @param epoch the epoch to be set
  138.      */
  139.     public void setEpoch(final AbsoluteDate epoch) {
  140.         this.epoch = epoch;
  141.     }

  142.     /**
  143.      * Get the reference frame specifying one frame of the transformation.
  144.      * @return the reference frame A
  145.      */
  146.     public String getQuaternionFrameAString() {
  147.         return qFrameA;
  148.     }

  149.     /**
  150.      * Set the reference frame specifying one frame of the transformation.
  151.      * @param frameA the frame to be set
  152.      */
  153.     public void setQuaternionFrameAString(final String frameA) {
  154.         this.qFrameA = frameA;
  155.     }

  156.     /**
  157.      * Get the reference frame specifying the second portion of the transformation.
  158.      * @return the reference frame B
  159.      */
  160.     public String getQuaternionFrameBString() {
  161.         return qFrameB;
  162.     }

  163.     /**
  164.      * Set the reference frame specifying the second portion of the transformation.
  165.      * @param frameB the frame to be set
  166.      */
  167.     public void setQuaternionFrameBString(final String frameB) {
  168.         this.qFrameB = frameB;
  169.     }

  170.     /**
  171.      * Get the rotation direction of the attitude quaternion.
  172.      * @return the rotation direction of the attitude quaternion
  173.      */
  174.     public String getAttitudeQuaternionDirection() {
  175.         return qDir;
  176.     }

  177.     /**
  178.      * Set the rotation direction of the attitude quaternion.
  179.      * @param direction rotation direction to be set
  180.      */
  181.     public void setAttitudeQuaternionDirection(final String direction) {
  182.         this.qDir = direction;
  183.     }

  184.     /**
  185.      * Get the quaternion.
  186.      * @return quaternion
  187.      */
  188.     public Quaternion getQuaternion() {
  189.         return quaternion;
  190.     }

  191.     /**
  192.      * Set the quaternion.
  193.      * @param q quaternion to set
  194.      */
  195.     public void setQuaternion(final Quaternion q) {
  196.         this.quaternion = q;
  197.     }

  198.     /**
  199.      * Get the derivative of the quaternion.
  200.      * @return the derivative of the quaternion
  201.      */
  202.     public Quaternion getQuaternionDot() {
  203.         return quaternionDot;
  204.     }

  205.     /**
  206.      * Set the derivative of the quaternion.
  207.      * @param qDot quaternion to set
  208.      */
  209.     public void setQuaternionDot(final Quaternion qDot) {
  210.         this.quaternionDot = qDot;
  211.     }

  212.     /**
  213.      * Get the reference frame specifying one frame of the transformation.
  214.      * @return reference frame A
  215.      */
  216.     public String getEulerFrameAString() {
  217.         return eulerFrameA;
  218.     }

  219.     /**
  220.      * Set the reference frame specifying one frame of the transformation.
  221.      * @param frame the frame to be set
  222.      */
  223.     public void setEulerFrameAString(final String frame) {
  224.         this.eulerFrameA = frame;
  225.     }

  226.     /**
  227.      * Get the reference frame specifying the second portion of the transformation.
  228.      * @return reference frame B
  229.      */
  230.     public String getEulerFrameBString() {
  231.         return eulerFrameB;
  232.     }

  233.     /**
  234.      * Set the reference frame specifying the second portion of the transformation.
  235.      * @param frame the frame to be set
  236.      */
  237.     public void setEulerFrameBString(final String frame) {
  238.         this.eulerFrameB = frame;
  239.     }

  240.     /**
  241.      * Get the rotation direction of the attitude Euler angles (A2B or B2A).
  242.      * @return the rotation direction
  243.      */
  244.     public String getEulerDirection() {
  245.         return eulerDir;
  246.     }

  247.     /**
  248.      * Set the rotation direction of the attitude Euler angles (A2B or B2A).
  249.      * @param direction direction to be set
  250.      */
  251.     public void setEulerDirection(final String direction) {
  252.         this.eulerDir = direction;
  253.     }

  254.     /**
  255.      * Get the rotation order of Euler angles (X=1, Y=2, Z=3).
  256.      * @return rotation order
  257.      */
  258.     public String getEulerRotSeq() {
  259.         return eulerRotSeq;
  260.     }

  261.     /**
  262.      * Set the rotation order for Euler angles (X=1, Y=2, Z=3).
  263.      * @param eulerRotSeq order to be setS
  264.      */
  265.     public void setEulerRotSeq(final String eulerRotSeq) {
  266.         this.eulerRotSeq = eulerRotSeq;
  267.     }

  268.     /**
  269.      * Get the frame of reference in which the Euler angles are expressed.
  270.      * @return the frame of reference
  271.      */
  272.     public String getRateFrameString() {
  273.         return rateFrame;
  274.     }

  275.     /**
  276.      * Set the frame of reference in which the Euler angles are expressed.
  277.      * @param frame frame to be set
  278.      */
  279.     public void setRateFrameString(final String frame) {
  280.         this.rateFrame = frame;
  281.     }

  282.     /**
  283.      * Get the coordinates of the Euler angles (rad).
  284.      * @return rotation angles
  285.      */
  286.     public Vector3D getRotationAngles() {
  287.         return rotationAngles;
  288.     }

  289.     /**
  290.      * Set the coordinates of the Euler angles (rad).
  291.      * @param rotationAngles coordinates to be set
  292.      */
  293.     public void setRotationAngles(final Vector3D rotationAngles) {
  294.         this.rotationAngles = rotationAngles;
  295.     }

  296.     /**
  297.      * Get the rates of the Euler angles (rad/s).
  298.      * @return rotation rates
  299.      */
  300.     public Vector3D getRotationRates() {
  301.         return rotationRates;
  302.     }

  303.     /**
  304.      * Set the rates of the Euler angles (rad/s).
  305.      * @param rotationRates coordinates to be set
  306.      */
  307.     public void setRotationRates(final Vector3D rotationRates) {
  308.         this.rotationRates = rotationRates;
  309.     }

  310.     /**
  311.      * Get the reference frame specifying one frame of the transformation (spin).
  312.      * @return reference frame
  313.      */
  314.     public String getSpinFrameAString() {
  315.         return spinFrameA;
  316.     }

  317.     /**
  318.      * Set the reference frame specifying one frame of the transformation (spin).
  319.      * @param frame frame to be set
  320.      */
  321.     public void setSpinFrameAString(final String frame) {
  322.         this.spinFrameA = frame;
  323.     }

  324.     /**
  325.      * Get the reference frame specifying the second portion of the transformation (spin).
  326.      * @return reference frame
  327.      */
  328.     public String getSpinFrameBString() {
  329.         return spinFrameB;
  330.     }

  331.     /**
  332.      * Set the reference frame specifying the second portion of the transformation (spin).
  333.      * @param frame frame to be set
  334.      */
  335.     public void setSpinFrameBString(final String frame) {
  336.         this.spinFrameB = frame;
  337.     }

  338.     /**
  339.      * Get the rotation direction of the Spin angles.
  340.      * @return the rotation direction
  341.      */
  342.     public String getSpinDirection() {
  343.         return spinDir;
  344.     }

  345.     /**
  346.      * Set the rotation direction of the Spin angles.
  347.      * @param direction rotation direction to be set
  348.      */
  349.     public void setSpinDirection(final String direction) {
  350.         this.spinDir = direction;
  351.     }

  352.     /**
  353.      * Get the right ascension of spin axis vector (rad).
  354.      * @return the right ascension of spin axis vector
  355.      */
  356.     public double getSpinAlpha() {
  357.         return spinAlpha;
  358.     }

  359.     /**
  360.      * Set the right ascension of spin axis vector (rad).
  361.      * @param spinAlpha value to be set
  362.      */
  363.     public void setSpinAlpha(final double spinAlpha) {
  364.         this.spinAlpha = spinAlpha;
  365.     }

  366.     /**
  367.      * Get the declination of the spin axis vector (rad).
  368.      * @return the declination of the spin axis vector (rad).
  369.      */
  370.     public double getSpinDelta() {
  371.         return spinDelta;
  372.     }

  373.     /**
  374.      * Set the declination of the spin axis vector (rad).
  375.      * @param spinDelta value to be set
  376.      */
  377.     public void setSpinDelta(final double spinDelta) {
  378.         this.spinDelta = spinDelta;
  379.     }


  380.     /**
  381.      * Get the phase of the satellite about the spin axis (rad).
  382.      * @return the phase of the satellite about the spin axis
  383.      */
  384.     public double getSpinAngle() {
  385.         return spinAngle;
  386.     }

  387.     /**
  388.      * Set the phase of the satellite about the spin axis (rad).
  389.      * @param spinAngle value to be set
  390.      */
  391.     public void setSpinAngle(final double spinAngle) {
  392.         this.spinAngle = spinAngle;
  393.     }

  394.     /**
  395.      * Get the angular velocity of satellite around spin axis (rad/s).
  396.      * @return the angular velocity of satellite around spin axis
  397.      */
  398.     public double getSpinAngleVel() {
  399.         return spinAngleVel;
  400.     }

  401.     /**
  402.      * Set the angular velocity of satellite around spin axis (rad/s).
  403.      * @param spinAngleVel value to be set
  404.      */
  405.     public void setSpinAngleVel(final double spinAngleVel) {
  406.         this.spinAngleVel = spinAngleVel;
  407.     }

  408.     /**
  409.      * Get the nutation angle of spin axis (rad).
  410.      * @return the nutation angle of spin axis
  411.      */
  412.     public double getNutation() {
  413.         return nutation;
  414.     }

  415.     /**
  416.      * Set the nutation angle of spin axis (rad).
  417.      * @param nutation the nutation angle to be set
  418.      */
  419.     public void setNutation(final double nutation) {
  420.         this.nutation = nutation;
  421.     }

  422.     /**
  423.      * Get the body nutation period of the spin axis (s).
  424.      * @return the body nutation period of the spin axis
  425.      */
  426.     public double getNutationPeriod() {
  427.         return nutationPer;
  428.     }

  429.     /**
  430.      * Set the body nutation period of the spin axis (s).
  431.      * @param period the nutation period to be set
  432.      */
  433.     public void setNutationPeriod(final double period) {
  434.         this.nutationPer = period;
  435.     }

  436.     /**
  437.      * Get the inertial nutation phase (rad).
  438.      * @return the inertial nutation phase
  439.      */
  440.     public double getNutationPhase() {
  441.         return nutationPhase;
  442.     }

  443.     /**
  444.      * Set the inertial nutation phase (rad).
  445.      * @param nutationPhase the nutation phase to be set
  446.      */
  447.     public void setNutationPhase(final double nutationPhase) {
  448.         this.nutationPhase = nutationPhase;
  449.     }

  450.     /**
  451.      * Get the coordinate system for the inertia tensor.
  452.      * @return the coordinate system for the inertia tensor
  453.      */
  454.     public String getInertiaRefFrameString() {
  455.         return inertiaRefFrame;
  456.     }

  457.     /**
  458.      * Set the coordinate system for the inertia tensor.
  459.      * @param frame frame to be set
  460.      */
  461.     public void setInertiaRefFrameString(final String frame) {
  462.         this.inertiaRefFrame = frame;
  463.     }

  464.     /**
  465.      * Get the moment of Inertia about the 1-axis (N.m²).
  466.      * @return the moment of Inertia about the 1-axis.
  467.      */
  468.     public double getI11() {
  469.         return i11;
  470.     }

  471.     /**
  472.      * Set the moment of Inertia about the 1-axis (N.m²).
  473.      * @param i11 moment of Inertia about the 1-axis
  474.      */
  475.     public void setI11(final double i11) {
  476.         this.i11 = i11;
  477.     }

  478.     /**
  479.      * Get the moment of Inertia about the 2-axis (N.m²).
  480.      * @return the moment of Inertia about the 2-axis.
  481.      */
  482.     public double getI22() {
  483.         return i22;
  484.     }

  485.     /**
  486.      * Set the moment of Inertia about the 2-axis (N.m²).
  487.      * @param i22 moment of Inertia about the 2-axis
  488.      */
  489.     public void setI22(final double i22) {
  490.         this.i22 = i22;
  491.     }

  492.     /**
  493.      * Get the moment of Inertia about the 3-axis (N.m²).
  494.      * @return the moment of Inertia about the 3-axis.
  495.      */
  496.     public double getI33() {
  497.         return i33;
  498.     }

  499.     /**
  500.      * Set the moment of Inertia about the 3-axis (N.m²).
  501.      * @param i33 moment of Inertia about the 3-axis
  502.      */
  503.     public void setI33(final double i33) {
  504.         this.i33 = i33;
  505.     }

  506.     /**
  507.      * Get the moment of Inertia about the 1 and 2 axes (N.m²).
  508.      * @return the moment of Inertia about the 1 and 2 axes.
  509.      */
  510.     public double getI12() {
  511.         return i12;
  512.     }

  513.     /**
  514.      * Set the moment of Inertia about the 1 and 2 axes (N.m²).
  515.      * @param i12 moment of Inertia about the 1 and 2 axes
  516.      */
  517.     public void setI12(final double i12) {
  518.         this.i12 = i12;
  519.     }

  520.     /**
  521.      * Get the moment of Inertia about the 1 and 3 axes (N.m²).
  522.      * @return the moment of Inertia about the 1 and 3 axes.
  523.      */
  524.     public double getI13() {
  525.         return i13;
  526.     }

  527.     /**
  528.      * Set the moment of Inertia about the 1 and 3 axes (N.m²).
  529.      * @param i13 moment of Inertia about the 1 and 3 axes
  530.      */
  531.     public void setI13(final double i13) {
  532.         this.i13 = i13;
  533.     }

  534.     /**
  535.      * Get the moment of Inertia about the 2 and 3 axes (N.m²).
  536.      * @return the moment of Inertia about the 2 and 3 axes.
  537.      */
  538.     public double getI23() {
  539.         return i23;
  540.     }

  541.     /**
  542.      * Set the moment of Inertia about the 2 and 3 axes (N.m²).
  543.      * @param i23 moment of Inertia about the 2 and 3 axes
  544.      */
  545.     public void setI23(final double i23) {
  546.         this.i23 = i23;
  547.     }

  548.     /**
  549.      * Get the comment for epoch.
  550.      * @return comment for epoch
  551.      */
  552.     public List<String> getEpochComment() {
  553.         return Collections.unmodifiableList(epochComment);
  554.     }

  555.     /**
  556.      * Set the comment for epoch.
  557.      * @param comment comment to set
  558.      */
  559.     public void setEpochComment(final List<String> comment) {
  560.         epochComment = new ArrayList<>(comment);
  561.     }

  562.     /**
  563.      * Get the comment for Euler angles.
  564.      * @return comment for Euler angles
  565.      */
  566.     public List<String> getEulerComment() {
  567.         return Collections.unmodifiableList(eulerComment);
  568.     }

  569.     /**
  570.      * Set the comment for Euler angles.
  571.      * @param comment comment to set
  572.      */
  573.     public void setEulerComment(final List<String> comment) {
  574.         eulerComment = new ArrayList<>(comment);
  575.     }

  576.     /**
  577.      * Get the comment for spin data.
  578.      * @return comment for spin data
  579.      */
  580.     public List<String> getSpinComment() {
  581.         return Collections.unmodifiableList(spinComment);
  582.     }

  583.     /**
  584.      * Set the comment for spin data.
  585.      * @param comment comment to set
  586.      */
  587.     public void setSpinComment(final List<String> comment) {
  588.         spinComment = new ArrayList<>(comment);
  589.     }

  590.     /**
  591.      * Get the comment for spacecraft.
  592.      * @return comment for spacecraft
  593.      */
  594.     public List<String> getSpacecraftComment() {
  595.         return Collections.unmodifiableList(spacecraftComment);
  596.     }

  597.     /**
  598.      * Set the comment for spacecraft.
  599.      * @param comment comment to set
  600.      */
  601.     public void setSpacecraftComment(final List<String> comment) {
  602.         spacecraftComment = new ArrayList<>(comment);
  603.     }

  604.     /**
  605.      * Get the number of maneuvers present in the APM.
  606.      * @return the number of maneuvers
  607.      */
  608.     public int getNbManeuvers() {
  609.         return maneuvers.size();
  610.     }

  611.     /**
  612.      * Get a list of all maneuvers.
  613.      * @return unmodifiable list of all maneuvers.
  614.      */
  615.     public List<APMManeuver> getManeuvers() {
  616.         return Collections.unmodifiableList(maneuvers);
  617.     }

  618.     /**
  619.      * Get a maneuver.
  620.      * @param index maneuver index, counting from 0
  621.      * @return maneuver
  622.      */
  623.     public APMManeuver getManeuver(final int index) {
  624.         return maneuvers.get(index);
  625.     }

  626.     /**
  627.      * Add a maneuver.
  628.      * @param maneuver maneuver to be set
  629.      */
  630.     public void addManeuver(final APMManeuver maneuver) {
  631.         maneuvers.add(maneuver);
  632.     }

  633.     /**
  634.      * Get boolean testing whether the APM contains at least one maneuver.
  635.      * @return true if APM contains at least one maneuver
  636.      *         false otherwise
  637.      */
  638.     public boolean getHasManeuver() {
  639.         return !maneuvers.isEmpty();
  640.     }

  641.     /**
  642.      * Get the comment for meta-data.
  643.      * @return comment for meta-data
  644.      */
  645.     public List<String> getMetaDataComment() {
  646.         return metaData.getComment();
  647.     }

  648.     /**
  649.      * Maneuver in an APM file.
  650.      */
  651.     public static class APMManeuver {

  652.         /** Epoch of start of maneuver . */
  653.         private AbsoluteDate epochStart;

  654.         /** Coordinate system for the torque vector, for absolute frames. */
  655.         private String refFrame;

  656.         /** Duration (value is 0 for impulsive maneuver). */
  657.         private double duration;

  658.         /** Torque vector (N.m). */
  659.         private Vector3D torque;

  660.         /** Maneuvers data comment, each string in the list corresponds to one line of comment. */
  661.         private List<String> comment;

  662.         /**
  663.          * Simple constructor.
  664.          */
  665.         public APMManeuver() {
  666.             this.torque  = Vector3D.ZERO;
  667.             this.comment = Collections.emptyList();
  668.         }

  669.         /**
  670.          * Get epoch start.
  671.          * @return epoch start
  672.          */
  673.         public AbsoluteDate getEpochStart() {
  674.             return epochStart;
  675.         }

  676.         /**
  677.          * Set epoch start.
  678.          * @param epochStart epoch start
  679.          */
  680.         public void setEpochStart(final AbsoluteDate epochStart) {
  681.             this.epochStart = epochStart;
  682.         }

  683.         /**
  684.          * Get Coordinate system for the torque vector, for absolute frames.
  685.          * @return coordinate system for the torque vector, for absolute frames
  686.          */
  687.         public String getRefFrameString() {
  688.             return refFrame;
  689.         }

  690.         /**
  691.          * Set Coordinate system for the torque vector, for absolute frames.
  692.          * @param frame coordinate system for the torque vector, for absolute frames
  693.          */
  694.         public void setRefFrameString(final String frame) {
  695.             this.refFrame = frame;
  696.         }

  697.         /**
  698.          * Get duration (value is 0 for impulsive maneuver).
  699.          * @return duration (value is 0 for impulsive maneuver)
  700.          */
  701.         public double getDuration() {
  702.             return duration;
  703.         }

  704.         /**
  705.          * Set duration (value is 0 for impulsive maneuver).
  706.          * @param duration duration (value is 0 for impulsive maneuver)
  707.          */
  708.         public void setDuration(final double duration) {
  709.             this.duration = duration;
  710.         }

  711.         /**
  712.          * Get the torque vector (N.m).
  713.          * @return torque vector
  714.          */
  715.         public Vector3D getTorque() {
  716.             return torque;
  717.         }

  718.         /**
  719.          * Set the torque vector (N.m).
  720.          * @param vector torque vector
  721.          */
  722.         public void setTorque(final Vector3D vector) {
  723.             this.torque = vector;
  724.         }

  725.         /**
  726.          * Get the maneuvers data comment, each string in the list corresponds to one line of comment.
  727.          * @return maneuvers data comment, each string in the list corresponds to one line of comment
  728.          */
  729.         public List<String> getComment() {
  730.             return Collections.unmodifiableList(comment);
  731.         }

  732.         /**
  733.          * Set the maneuvers data comment, each string in the list corresponds to one line of comment.
  734.          * @param comment maneuvers data comment, each string in the list corresponds to one line of comment
  735.          */
  736.         public void setComment(final List<String> comment) {
  737.             this.comment = new ArrayList<>(comment);
  738.         }

  739.     }

  740. }