IIRVBuilder.java

  1. /* Copyright 2024-2025 The Johns Hopkins University Applied Physics Laboratory
  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.iirv;

  18. import org.orekit.errors.OrekitIllegalArgumentException;
  19. import org.orekit.errors.OrekitMessages;
  20. import org.orekit.files.iirv.terms.CoordinateSystemTerm;
  21. import org.orekit.files.iirv.terms.CrossSectionalAreaTerm;
  22. import org.orekit.files.iirv.terms.DataSourceTerm;
  23. import org.orekit.files.iirv.terms.DayOfYearTerm;
  24. import org.orekit.files.iirv.terms.DragCoefficientTerm;
  25. import org.orekit.files.iirv.terms.MassTerm;
  26. import org.orekit.files.iirv.terms.MessageClassTerm;
  27. import org.orekit.files.iirv.terms.MessageIDTerm;
  28. import org.orekit.files.iirv.terms.MessageSourceTerm;
  29. import org.orekit.files.iirv.terms.MessageTypeTerm;
  30. import org.orekit.files.iirv.terms.OriginIdentificationTerm;
  31. import org.orekit.files.iirv.terms.OriginatorRoutingIndicatorTerm;
  32. import org.orekit.files.iirv.terms.PositionVectorComponentTerm;
  33. import org.orekit.files.iirv.terms.RoutingIndicatorTerm;
  34. import org.orekit.files.iirv.terms.SequenceNumberTerm;
  35. import org.orekit.files.iirv.terms.SolarReflectivityCoefficientTerm;
  36. import org.orekit.files.iirv.terms.SupportIdCodeTerm;
  37. import org.orekit.files.iirv.terms.VectorEpochTerm;
  38. import org.orekit.files.iirv.terms.VectorTypeTerm;
  39. import org.orekit.files.iirv.terms.VehicleIdCodeTerm;
  40. import org.orekit.files.iirv.terms.VelocityVectorComponentTerm;
  41. import org.orekit.time.AbsoluteDate;
  42. import org.orekit.time.UTCScale;
  43. import org.orekit.utils.TimeStampedPVCoordinates;

  44. import java.util.ArrayList;
  45. import java.util.List;

  46. /**
  47.  * Builder for {@link IIRVVector}.
  48.  *
  49.  * @author Nick LaFarge
  50.  * @since 13.0
  51.  */
  52. public class IIRVBuilder {

  53.     /** UTC time scale. */
  54.     private final UTCScale utc;
  55.     /**
  56.      * Message type, default: "00".
  57.      */
  58.     private MessageTypeTerm messageType = MessageTypeTerm.DEFAULT;
  59.     /**
  60.      * Message Identification, default: "0000000".
  61.      */
  62.     private MessageIDTerm messageID = new MessageIDTerm(0);
  63.     /**
  64.      * Message source, default: "0".
  65.      */
  66.     private MessageSourceTerm messageSource = MessageSourceTerm.DEFAULT;
  67.     /**
  68.      * Message class, default: "10" [nominal].
  69.      */
  70.     private MessageClassTerm messageClass = MessageClassTerm.NOMINAL;
  71.     /**
  72.      * Origin identification, default: " " [NASA Goddard Space Flight Center].
  73.      */
  74.     private OriginIdentificationTerm originIdentification = OriginIdentificationTerm.GSFC;
  75.     /**
  76.      * Destination routing indicator, default: "MANY".
  77.      */
  78.     private RoutingIndicatorTerm routingIndicator = RoutingIndicatorTerm.MANY;
  79.     /**
  80.      * Vector type, default: "1" [Free flight].
  81.      */
  82.     private VectorTypeTerm vectorType = VectorTypeTerm.FREE_FLIGHT;
  83.     /**
  84.      * Source of data, default: "1" [nominal/planning].
  85.      */
  86.     private DataSourceTerm dataSource = DataSourceTerm.NOMINAL;
  87.     /**
  88.      * Coordinate system, default: "1" [Geocentric True-of-Date Rotating (GTOD)].
  89.      */
  90.     private CoordinateSystemTerm coordinateSystem = CoordinateSystemTerm.GEOCENTRIC_TRUE_OF_DATE_ROTATING;
  91.     /**
  92.      * Support ID Code, default: "0000".
  93.      */
  94.     private SupportIdCodeTerm supportIdCode = new SupportIdCodeTerm("0000");
  95.     /**
  96.      * Vehicle ID Code, default: "01".
  97.      */
  98.     private VehicleIdCodeTerm vehicleIdCode = new VehicleIdCodeTerm("01");
  99.     /**
  100.      * Sequence number, default: "000".
  101.      */
  102.     private SequenceNumberTerm sequenceNumber = new SequenceNumberTerm(0);
  103.     /**
  104.      * Satellite mass (kg), default: "00156170" [unused].
  105.      */
  106.     private MassTerm mass = MassTerm.UNUSED;
  107.     /**
  108.      * Average satellite cross-sectional area (m^2), default: "00000" [unused].
  109.      */
  110.     private CrossSectionalAreaTerm crossSectionalArea = CrossSectionalAreaTerm.UNUSED;
  111.     /**
  112.      * Drag coefficient (dimensionless), default: "0000" [unused].
  113.      */
  114.     private DragCoefficientTerm dragCoefficient = DragCoefficientTerm.UNUSED;
  115.     /**
  116.      * Solar reflectivity coefficient (dimensionless), default: "00000000" [unused].
  117.      */
  118.     private SolarReflectivityCoefficientTerm solarReflectivityCoefficient = SolarReflectivityCoefficientTerm.UNUSED;
  119.     /**
  120.      * Originator of message (GCQU or GAQD), default: "GAQD".
  121.      */
  122.     private OriginatorRoutingIndicatorTerm originatorRoutingIndicator = OriginatorRoutingIndicatorTerm.GAQD;

  123.     /**
  124.      * Constructs an {@link IIRVBuilder} instance with a UTC timescale and default values for all parameters.
  125.      *
  126.      * @param utc UTC time scale
  127.      */
  128.     public IIRVBuilder(final UTCScale utc) {
  129.         this.utc = utc;
  130.     }

  131.     /**
  132.      * Constructs an IIRV object using the configured parameters.
  133.      *
  134.      * @param dayOfYear   Day of year, 001 to 366
  135.      * @param vectorEpoch Vector epoch in UTC
  136.      * @param xPosition   X component of the position vector [m]
  137.      * @param yPosition   Y component of the position vector [m]
  138.      * @param zPosition   Z component of the position vector [m]
  139.      * @param xVelocity   X component of the velocity vector [m/s]
  140.      * @param yVelocity   Y component of the velocity vector [m/s]
  141.      * @param zVelocity   Z component of the velocity vector [m/s]
  142.      * @return the newly constructed IIRV object
  143.      */
  144.     public IIRVVector buildVector(final DayOfYearTerm dayOfYear,
  145.                                   final VectorEpochTerm vectorEpoch,
  146.                                   final PositionVectorComponentTerm xPosition,
  147.                                   final PositionVectorComponentTerm yPosition,
  148.                                   final PositionVectorComponentTerm zPosition,
  149.                                   final VelocityVectorComponentTerm xVelocity,
  150.                                   final VelocityVectorComponentTerm yVelocity,
  151.                                   final VelocityVectorComponentTerm zVelocity) {
  152.         return new IIRVVector(
  153.             messageType, messageID, messageSource, messageClass, originIdentification, routingIndicator, // Line 1
  154.             vectorType, dataSource, coordinateSystem, supportIdCode, vehicleIdCode, sequenceNumber, dayOfYear, vectorEpoch, // Line 2
  155.             xPosition, yPosition, zPosition, // Line 3
  156.             xVelocity, yVelocity, zVelocity, // Line 4
  157.             mass, crossSectionalArea, dragCoefficient, solarReflectivityCoefficient, // Line 5
  158.             originatorRoutingIndicator, // Line 6
  159.             utc
  160.         );
  161.     }

  162.     /**
  163.      * Constructs an IIRV vector using the configured parameters, with position, velocity, and time variables derived
  164.      * from instances of {@link TimeStampedPVCoordinates} and {@link AbsoluteDate}.
  165.      *
  166.      * @param timeStampedPVCoordinates position and velocity components at a particular epoch corresponding to the
  167.      *                                 IIRV vector
  168.      * @return the newly constructed IIRV object at the given coordinates
  169.      */
  170.     public IIRVVector buildVector(final TimeStampedPVCoordinates timeStampedPVCoordinates) {

  171.         // Retrieve the epoch associated with the given coordinates
  172.         final AbsoluteDate epoch = timeStampedPVCoordinates.getDate();

  173.         // Construct the IIRV time variable terms
  174.         final DayOfYearTerm dayOfYear = new DayOfYearTerm(epoch, utc);
  175.         final VectorEpochTerm vectorEpoch = new VectorEpochTerm(epoch, utc);

  176.         // Construct the position component terms
  177.         final PositionVectorComponentTerm xPosition = new PositionVectorComponentTerm(timeStampedPVCoordinates.getPosition().getX());
  178.         final PositionVectorComponentTerm yPosition = new PositionVectorComponentTerm(timeStampedPVCoordinates.getPosition().getY());
  179.         final PositionVectorComponentTerm zPosition = new PositionVectorComponentTerm(timeStampedPVCoordinates.getPosition().getZ());

  180.         // Construct the velocity component terms
  181.         final VelocityVectorComponentTerm xVelocity = new VelocityVectorComponentTerm(timeStampedPVCoordinates.getVelocity().getX());
  182.         final VelocityVectorComponentTerm yVelocity = new VelocityVectorComponentTerm(timeStampedPVCoordinates.getVelocity().getY());
  183.         final VelocityVectorComponentTerm zVelocity = new VelocityVectorComponentTerm(timeStampedPVCoordinates.getVelocity().getZ());

  184.         // Construct an IIRV vector with the given terms
  185.         return new IIRVVector(
  186.             messageType, messageID, messageSource, messageClass, originIdentification, routingIndicator, // Line 1
  187.             vectorType, dataSource, coordinateSystem, supportIdCode, vehicleIdCode, sequenceNumber, dayOfYear, vectorEpoch, // Line 2
  188.             xPosition, yPosition, zPosition, // Line 3
  189.             xVelocity, yVelocity, zVelocity, // Line 4
  190.             mass, crossSectionalArea, dragCoefficient, solarReflectivityCoefficient, // Line 5
  191.             originatorRoutingIndicator, // Line 6
  192.             utc
  193.         );
  194.     }

  195.     /**
  196.      * Constructs an {@link IIRVMessage} where each {@link IIRVVector} in initialized from the inputted list of
  197.      * {@link TimeStampedPVCoordinates}.
  198.      *
  199.      * @param timeStampedPVCoordinates list of time-stamped position and velocity vectors to populate the message
  200.      * @param <C>                      type of the Cartesian coordinates
  201.      * @return the newly constructed {@link IIRVMessage} containing the given coordinates
  202.      */
  203.     public <C extends TimeStampedPVCoordinates> IIRVMessage buildIIRVMessage(final List<C> timeStampedPVCoordinates) {
  204.         final ArrayList<IIRVVector> vectors = new ArrayList<>();
  205.         int incrementalSequenceNumber = 0;
  206.         for (TimeStampedPVCoordinates coordinates : timeStampedPVCoordinates) {
  207.             // Add coordinate to the list of vectors with the current sequence number
  208.             setSequenceNumber(incrementalSequenceNumber);
  209.             vectors.add(buildVector(coordinates));
  210.             incrementalSequenceNumber++;
  211.         }
  212.         return new IIRVMessage(vectors);
  213.     }


  214.     /**
  215.      * Constructs an {@link IIRVEphemerisFile} from the inputted list of {@link TimeStampedPVCoordinates}, inferring
  216.      * the start year from the first coordinate's {@link org.orekit.time.AbsoluteDate}.
  217.      * <p>
  218.      * See {@link #buildIIRVMessage(List)} for {@link IIRVMessage} construction details.
  219.      *
  220.      * @param timeStampedPVCoordinates list of time-stamped position and velocity vectors to populate the message
  221.      * @param <C>                      type of the Cartesian coordinates
  222.      * @return the newly constructed {@link IIRVEphemerisFile} containing the given coordinates
  223.      */
  224.     public <C extends TimeStampedPVCoordinates> IIRVEphemerisFile buildEphemerisFile(final List<C> timeStampedPVCoordinates) {
  225.         final int year = timeStampedPVCoordinates.get(0).getDate().getComponents(utc).getDate().getYear();
  226.         return new IIRVEphemerisFile(year, buildIIRVMessage(timeStampedPVCoordinates));
  227.     }

  228.     /**
  229.      * Gets the current {@link MassTerm} value.
  230.      *
  231.      * @return the current {@link MassTerm} value.
  232.      */
  233.     public MassTerm getMass() {
  234.         return mass;
  235.     }

  236.     /**
  237.      * Overrides the default Mass attribute for the {@link IIRVVector} object being built.
  238.      * <p>
  239.      * Units: kg
  240.      *
  241.      * @param mass mass value (kg) for the IIRV message
  242.      */
  243.     public void setMass(final MassTerm mass) {
  244.         this.mass = mass;
  245.     }

  246.     /**
  247.      * Overrides the default Mass attribute for the {@link IIRVVector} object being built.
  248.      * <p>
  249.      * Units: kg
  250.      *
  251.      * @param mass mass value (kg) for the IIRV message
  252.      */
  253.     public void setMass(final String mass) {
  254.         this.mass = new MassTerm(mass);
  255.     }

  256.     /**
  257.      * Overrides the default Mass attribute for the {@link IIRVVector} object being built.
  258.      * <p>
  259.      * Units: kg
  260.      *
  261.      * @param mass mass value (kg) for the IIRV message
  262.      */
  263.     public void setMass(final double mass) {
  264.         this.mass = new MassTerm(mass);
  265.     }

  266.     /**
  267.      * Gets the current {@link MessageTypeTerm} value.
  268.      *
  269.      * @return the current {@link MessageTypeTerm} value.
  270.      */
  271.     public MessageTypeTerm getMessageType() {
  272.         return messageType;
  273.     }

  274.     /**
  275.      * Overrides the default {@link MessageTypeTerm} attribute for the {@link IIRVVector} object being built.
  276.      *
  277.      * @param messageType {@link MessageTypeTerm} for the IIRV message
  278.      */
  279.     public void setMessageType(final String messageType) {
  280.         this.messageType = new MessageTypeTerm(messageType);
  281.     }

  282.     /**
  283.      * Overrides the default {@link MessageTypeTerm} attribute for the {@link IIRVVector} object being built.
  284.      *
  285.      * @param messageType {@link MessageTypeTerm} for the IIRV message
  286.      */
  287.     public void setMessageType(final MessageTypeTerm messageType) {
  288.         this.messageType = messageType;
  289.     }

  290.     /**
  291.      * Gets the current {@link MessageSourceTerm} value.
  292.      *
  293.      * @return the current {@link MessageSourceTerm} value.
  294.      */
  295.     public MessageSourceTerm getMessageSource() {
  296.         return messageSource;
  297.     }

  298.     /**
  299.      * Overrides the default {@link MessageSourceTerm} attribute for the {@link IIRVVector} object being built.
  300.      *
  301.      * @param messageSource {@link MessageSourceTerm} for the IIRV message
  302.      */
  303.     public void setMessageSource(final String messageSource) {
  304.         this.messageSource = new MessageSourceTerm(messageSource);
  305.     }

  306.     /**
  307.      * Overrides the default {@link MessageSourceTerm} attribute for the {@link IIRVVector} object being built.
  308.      *
  309.      * @param messageSource {@link MessageSourceTerm} for the IIRV message
  310.      */
  311.     public void setMessageSource(final MessageSourceTerm messageSource) {
  312.         this.messageSource = messageSource;
  313.     }

  314.     /**
  315.      * Gets the current {@link MessageIDTerm} value.
  316.      *
  317.      * @return the current {@link MessageIDTerm} value.
  318.      */
  319.     public MessageIDTerm getMessageID() {
  320.         return messageID;
  321.     }

  322.     /**
  323.      * Overrides the default MessageID attribute for the {@link IIRVVector} object being built.
  324.      *
  325.      * @param messageID message ID value for the IIRV message
  326.      */
  327.     public void setMessageID(final MessageIDTerm messageID) {
  328.         this.messageID = messageID;
  329.     }

  330.     /**
  331.      * Overrides the default MessageID attribute for the {@link IIRVVector} object being built.
  332.      *
  333.      * @param messageID message ID value for the IIRV message
  334.      */
  335.     public void setMessageID(final String messageID) {
  336.         this.messageID = new MessageIDTerm(messageID);
  337.     }

  338.     /**
  339.      * Overrides the default MessageID attribute for the {@link IIRVVector} object being built.
  340.      *
  341.      * @param messageID message ID value for the IIRV message
  342.      */
  343.     public void setMessageID(final long messageID) {
  344.         this.messageID = new MessageIDTerm(messageID);
  345.     }

  346.     /**
  347.      * Gets the current {@link MessageClassTerm} value.
  348.      *
  349.      * @return the current {@link MessageClassTerm} value.
  350.      */
  351.     public MessageClassTerm getMessageClass() {
  352.         return messageClass;
  353.     }

  354.     /**
  355.      * Overrides the default MessageClass attribute for the {@link IIRVVector} object being built.
  356.      *
  357.      * @param messageClass message class value for the IIRV message
  358.      */
  359.     public void setMessageClass(final MessageClassTerm messageClass) {
  360.         this.messageClass = messageClass;
  361.     }

  362.     /**
  363.      * Overrides the default MessageClass attribute for the {@link IIRVVector} object being built.
  364.      *
  365.      * @param messageClass message class value for the IIRV message
  366.      */
  367.     public void setMessageClass(final String messageClass) {
  368.         this.messageClass = new MessageClassTerm(messageClass);
  369.     }

  370.     /**
  371.      * Overrides the default MessageClass attribute for the {@link IIRVVector} object being built.
  372.      *
  373.      * @param messageClass message class value for the IIRV message
  374.      */
  375.     public void setMessageClass(final long messageClass) {
  376.         this.messageClass = new MessageClassTerm(messageClass);
  377.     }

  378.     /**
  379.      * Gets the current {@link OriginIdentificationTerm} value.
  380.      *
  381.      * @return the current {@link OriginIdentificationTerm} value.
  382.      */
  383.     public OriginIdentificationTerm getOriginIdentification() {
  384.         return originIdentification;
  385.     }

  386.     /**
  387.      * Overrides the default OriginIdentification attribute for the {@link IIRVVector} object being built.
  388.      *
  389.      * @param originIdentification origin identification value for the IIRV message
  390.      */
  391.     public void setOriginIdentification(final OriginIdentificationTerm originIdentification) {
  392.         this.originIdentification = originIdentification;
  393.     }

  394.     /**
  395.      * Overrides the default OriginIdentification attribute for the {@link IIRVVector} object being built.
  396.      *
  397.      * @param originIdentification origin identification value for the IIRV message
  398.      */
  399.     public void setOriginIdentification(final String originIdentification) {
  400.         this.originIdentification = new OriginIdentificationTerm(originIdentification);
  401.     }

  402.     /**
  403.      * Gets the current {@link RoutingIndicatorTerm} value.
  404.      *
  405.      * @return the current {@link RoutingIndicatorTerm} value.
  406.      */
  407.     public RoutingIndicatorTerm getRoutingIndicator() {
  408.         return routingIndicator;
  409.     }

  410.     /**
  411.      * Overrides the default RoutingIndicator attribute for the {@link IIRVVector} object being built.
  412.      *
  413.      * @param routingIndicator routing indicator term value for the IIRV message
  414.      */
  415.     public void setRoutingIndicator(final RoutingIndicatorTerm routingIndicator) {
  416.         this.routingIndicator = routingIndicator;
  417.     }

  418.     /**
  419.      * Overrides the default RoutingIndicator attribute for the {@link IIRVVector} object being built.
  420.      *
  421.      * @param routingIndicator routing indicator term value for the IIRV message
  422.      */
  423.     public void setRoutingIndicator(final String routingIndicator) {
  424.         this.routingIndicator = new RoutingIndicatorTerm(routingIndicator);
  425.     }

  426.     /**
  427.      * Gets the current {@link VectorTypeTerm} value.
  428.      *
  429.      * @return the current {@link VectorTypeTerm} value.
  430.      */
  431.     public VectorTypeTerm getVectorType() {
  432.         return vectorType;
  433.     }

  434.     /**
  435.      * Overrides the default VectorType attribute for the {@link IIRVVector} object being built.
  436.      *
  437.      * @param vectorType vector type term value for the IIRV message
  438.      */
  439.     public void setVectorType(final VectorTypeTerm vectorType) {
  440.         this.vectorType = vectorType;
  441.     }

  442.     /**
  443.      * Overrides the default VectorType attribute for the {@link IIRVVector} object being built.
  444.      *
  445.      * @param vectorType vector type term value for the IIRV message
  446.      */
  447.     public void setVectorType(final String vectorType) {
  448.         this.vectorType = new VectorTypeTerm(vectorType);
  449.     }

  450.     /**
  451.      * Overrides the default VectorType attribute for the {@link IIRVVector} object being built.
  452.      *
  453.      * @param vectorType vector type term value for the IIRV message
  454.      */
  455.     public void setVectorType(final long vectorType) {
  456.         this.vectorType = new VectorTypeTerm(vectorType);
  457.     }

  458.     /**
  459.      * Gets the current {@link DataSourceTerm} value.
  460.      *
  461.      * @return the current {@link DataSourceTerm} value.
  462.      */
  463.     public DataSourceTerm getDataSource() {
  464.         return dataSource;
  465.     }

  466.     /**
  467.      * Overrides the default DataSource attribute for the {@link IIRVVector} object being built.
  468.      *
  469.      * @param dataSource data source term value for the IIRV message
  470.      */
  471.     public void setDataSource(final DataSourceTerm dataSource) {
  472.         this.dataSource = dataSource;
  473.     }

  474.     /**
  475.      * Overrides the default DataSource attribute for the {@link IIRVVector} object being built.
  476.      *
  477.      * @param dataSource data source term value for the IIRV message
  478.      */
  479.     public void setDataSource(final long dataSource) {
  480.         this.dataSource = new DataSourceTerm(dataSource);
  481.     }

  482.     /**
  483.      * Overrides the default DataSource attribute for the {@link IIRVVector} object being built.
  484.      *
  485.      * @param dataSource data source term value for the IIRV message
  486.      */
  487.     public void setDataSource(final String dataSource) {
  488.         this.dataSource = new DataSourceTerm(dataSource);
  489.     }

  490.     /**
  491.      * Gets the current {@link CoordinateSystemTerm} value.
  492.      *
  493.      * @return the current {@link CoordinateSystemTerm} value.
  494.      */
  495.     public CoordinateSystemTerm getCoordinateSystem() {
  496.         return coordinateSystem;
  497.     }

  498.     /**
  499.      * Overrides the default CoordinateSystem attribute for the {@link IIRVVector} object being built.
  500.      *
  501.      * @param coordinateSystem coordinate system term value for the IIRV message
  502.      */
  503.     public void setCoordinateSystem(final CoordinateSystemTerm coordinateSystem) {
  504.         this.coordinateSystem = coordinateSystem;
  505.     }

  506.     /**
  507.      * Overrides the default CoordinateSystem attribute for the {@link IIRVVector} object being built.
  508.      *
  509.      * @param coordinateSystem coordinate system term value for the IIRV message
  510.      */
  511.     public void setCoordinateSystem(final String coordinateSystem) {
  512.         this.coordinateSystem = new CoordinateSystemTerm(coordinateSystem);
  513.     }

  514.     /**
  515.      * Overrides the default CoordinateSystem attribute for the {@link IIRVVector} object being built.
  516.      *
  517.      * @param coordinateSystem coordinate system term value for the IIRV message
  518.      */
  519.     public void setCoordinateSystem(final long coordinateSystem) {
  520.         this.coordinateSystem = new CoordinateSystemTerm(coordinateSystem);
  521.     }

  522.     /**
  523.      * Gets the current {@link SupportIdCodeTerm} value.
  524.      *
  525.      * @return the current {@link SupportIdCodeTerm} value.
  526.      */
  527.     public SupportIdCodeTerm getSupportIdCode() {
  528.         return supportIdCode;
  529.     }

  530.     /**
  531.      * Overrides the default SupportIdCode attribute for the {@link IIRVVector} object being built.
  532.      *
  533.      * @param supportIdCode support id code value for the IIRV message
  534.      */
  535.     public void setSupportIdCode(final SupportIdCodeTerm supportIdCode) {
  536.         this.supportIdCode = supportIdCode;
  537.     }

  538.     /**
  539.      * Overrides the default SupportIdCode attribute for the {@link IIRVVector} object being built.
  540.      *
  541.      * @param supportIdCode support id code value for the IIRV message
  542.      */
  543.     public void setSupportIdCode(final String supportIdCode) {
  544.         this.supportIdCode = new SupportIdCodeTerm(supportIdCode);
  545.     }

  546.     /**
  547.      * Overrides the default SupportIdCode attribute for the {@link IIRVVector} object being built.
  548.      *
  549.      * @param supportIdCode support id code value for the IIRV message
  550.      */
  551.     public void setSupportIdCode(final long supportIdCode) {
  552.         this.supportIdCode = new SupportIdCodeTerm(supportIdCode);
  553.     }

  554.     /**
  555.      * Gets the current {@link VehicleIdCodeTerm} value.
  556.      *
  557.      * @return the current {@link VehicleIdCodeTerm} value.
  558.      */
  559.     public VehicleIdCodeTerm getVehicleIdCode() {
  560.         return vehicleIdCode;
  561.     }

  562.     /**
  563.      * Overrides the default VehicleIdCode attribute for the {@link IIRVVector} object being built.
  564.      *
  565.      * @param vehicleIdCode vehicle id code value for the IIRV message
  566.      */
  567.     public void setVehicleIdCode(final VehicleIdCodeTerm vehicleIdCode) {
  568.         this.vehicleIdCode = vehicleIdCode;
  569.     }

  570.     /**
  571.      * Overrides the default VehicleIdCode attribute for the {@link IIRVVector} object being built.
  572.      *
  573.      * @param vehicleIdCode vehicle id code value for the IIRV message
  574.      */
  575.     public void setVehicleIdCode(final String vehicleIdCode) {
  576.         this.vehicleIdCode = new VehicleIdCodeTerm(vehicleIdCode);
  577.     }

  578.     /**
  579.      * Overrides the default VehicleIdCode attribute for the {@link IIRVVector} object being built.
  580.      *
  581.      * @param vehicleIdCode vehicle id code value for the IIRV message
  582.      */
  583.     public void setVehicleIdCode(final long vehicleIdCode) {
  584.         this.vehicleIdCode = new VehicleIdCodeTerm(vehicleIdCode);
  585.     }

  586.     /**
  587.      * Gets the current {@link SequenceNumberTerm} value.
  588.      *
  589.      * @return the current {@link SequenceNumberTerm} value.
  590.      */
  591.     public SequenceNumberTerm getSequenceNumber() {
  592.         return sequenceNumber;
  593.     }

  594.     /**
  595.      * Overrides the default SequenceNumber attribute for the {@link IIRVVector} object being built.
  596.      *
  597.      * @param sequenceNumber sequence number value for the IIRV message
  598.      */
  599.     public void setSequenceNumber(final SequenceNumberTerm sequenceNumber) {
  600.         this.sequenceNumber = sequenceNumber;
  601.     }

  602.     /**
  603.      * Overrides the default SequenceNumber attribute for the {@link IIRVVector} object being built.
  604.      *
  605.      * @param sequenceNumber sequence number value for the IIRV message
  606.      */
  607.     public void setSequenceNumber(final String sequenceNumber) {
  608.         this.sequenceNumber = new SequenceNumberTerm(sequenceNumber);
  609.     }

  610.     /**
  611.      * Overrides the default SequenceNumber attribute for the {@link IIRVVector} object being built.
  612.      *
  613.      * @param sequenceNumber sequence number value for the IIRV message
  614.      */
  615.     public void setSequenceNumber(final long sequenceNumber) {
  616.         if (sequenceNumber > SequenceNumberTerm.MAX_SEQUENCE_NUMBER) {
  617.             throw new OrekitIllegalArgumentException(OrekitMessages.IIRV_EXCEEDS_MAX_VECTORS, sequenceNumber);
  618.         }
  619.         this.sequenceNumber = new SequenceNumberTerm(sequenceNumber);
  620.     }

  621.     /**
  622.      * Gets the current {@link CrossSectionalAreaTerm} value.
  623.      *
  624.      * @return the current {@link CrossSectionalAreaTerm} value.
  625.      */
  626.     public CrossSectionalAreaTerm getCrossSectionalArea() {
  627.         return crossSectionalArea;
  628.     }

  629.     /**
  630.      * Overrides the default {@link CrossSectionalAreaTerm} attribute for the {@link IIRVVector} object being built.
  631.      * <p>
  632.      * Units: m^2
  633.      *
  634.      * @param crossSectionalArea cross-sectional area value (m^2) for the IIRV message
  635.      */
  636.     public void setCrossSectionalArea(final CrossSectionalAreaTerm crossSectionalArea) {
  637.         this.crossSectionalArea = crossSectionalArea;
  638.     }

  639.     /**
  640.      * Overrides the default {@link CrossSectionalAreaTerm} attribute for the {@link IIRVVector} object being built.
  641.      * <p>
  642.      * Units: m^2
  643.      * <p>
  644.      * See {@link CrossSectionalAreaTerm#CrossSectionalAreaTerm(String)}
  645.      *
  646.      * @param crossSectionalArea cross-sectional area value (m^2) for the IIRV message
  647.      */
  648.     public void setCrossSectionalArea(final String crossSectionalArea) {
  649.         this.crossSectionalArea = new CrossSectionalAreaTerm(crossSectionalArea);
  650.     }

  651.     /**
  652.      * Overrides the default {@link CrossSectionalAreaTerm} attribute for the {@link IIRVVector} object being built.
  653.      * <p>
  654.      * Units: m^2
  655.      * <p>
  656.      * See {@link CrossSectionalAreaTerm#CrossSectionalAreaTerm(double)}
  657.      *
  658.      * @param crossSectionalArea cross-sectional area value (m^2) for the IIRV message
  659.      */
  660.     public void setCrossSectionalArea(final double crossSectionalArea) {
  661.         this.crossSectionalArea = new CrossSectionalAreaTerm(crossSectionalArea);
  662.     }

  663.     /**
  664.      * Gets the current {@link DragCoefficientTerm} value.
  665.      *
  666.      * @return the current {@link DragCoefficientTerm} value.
  667.      */
  668.     public DragCoefficientTerm getDragCoefficient() {
  669.         return dragCoefficient;
  670.     }

  671.     /**
  672.      * Overrides the default {@link DragCoefficientTerm} attribute for the {@link IIRVVector} object being built.
  673.      * <p>
  674.      * Units: dimensionless
  675.      *
  676.      * @param dragCoefficient drag coefficient value (dimensionless) for the IIRV message
  677.      */
  678.     public void setDragCoefficient(final DragCoefficientTerm dragCoefficient) {
  679.         this.dragCoefficient = dragCoefficient;
  680.     }

  681.     /**
  682.      * Overrides the default {@link DragCoefficientTerm} attribute for the {@link IIRVVector} object being built.
  683.      * <p>
  684.      * Units: dimensionless
  685.      * <p>
  686.      * See {@link DragCoefficientTerm#DragCoefficientTerm(String)}
  687.      *
  688.      * @param dragCoefficient drag coefficient value (dimensionless) for the IIRV message
  689.      */
  690.     public void setDragCoefficient(final String dragCoefficient) {
  691.         this.dragCoefficient = new DragCoefficientTerm(dragCoefficient);
  692.     }

  693.     /**
  694.      * Overrides the default {@link DragCoefficientTerm} attribute for the {@link IIRVVector} object being built.
  695.      * <p>
  696.      * Units: dimensionless
  697.      * <p>
  698.      * See {@link DragCoefficientTerm#DragCoefficientTerm(double)}
  699.      *
  700.      * @param dragCoefficient drag coefficient value (dimensionless) for the IIRV message
  701.      */
  702.     public void setDragCoefficient(final double dragCoefficient) {
  703.         this.dragCoefficient = new DragCoefficientTerm(dragCoefficient);
  704.     }

  705.     /**
  706.      * Gets the current {@link SolarReflectivityCoefficientTerm} value.
  707.      *
  708.      * @return the current {@link SolarReflectivityCoefficientTerm} value.
  709.      */
  710.     public SolarReflectivityCoefficientTerm getSolarReflectivityCoefficient() {
  711.         return solarReflectivityCoefficient;
  712.     }

  713.     /**
  714.      * Overrides the default {@link SolarReflectivityCoefficientTerm} attribute for the {@link IIRVVector} object being built.
  715.      * <p>
  716.      * Units: dimensionless
  717.      *
  718.      * @param solarReflectivityCoefficient solar reflectivity coefficient value (dimensionless) for the IIRV message
  719.      */
  720.     public void setSolarReflectivityCoefficient(final SolarReflectivityCoefficientTerm solarReflectivityCoefficient) {
  721.         this.solarReflectivityCoefficient = solarReflectivityCoefficient;
  722.     }

  723.     /**
  724.      * Overrides the default {@link SolarReflectivityCoefficientTerm} attribute for the {@link IIRVVector} object being built.
  725.      * <p>
  726.      * Units: dimensionless
  727.      * <p>
  728.      * See {@link SolarReflectivityCoefficientTerm#SolarReflectivityCoefficientTerm(String)}
  729.      *
  730.      * @param solarReflectivityCoefficient solar reflectivity coefficient value (dimensionless) for the IIRV message
  731.      */
  732.     public void setSolarReflectivityCoefficient(final String solarReflectivityCoefficient) {
  733.         this.solarReflectivityCoefficient = new SolarReflectivityCoefficientTerm(solarReflectivityCoefficient);
  734.     }

  735.     /**
  736.      * Overrides the default {@link SolarReflectivityCoefficientTerm} attribute for the {@link IIRVVector} object being built.
  737.      * <p>
  738.      * Units: dimensionless
  739.      * <p>
  740.      * See {@link SolarReflectivityCoefficientTerm#SolarReflectivityCoefficientTerm(double)}
  741.      *
  742.      * @param solarReflectivityCoefficient solar reflectivity coefficient value (dimensionless) for the IIRV message
  743.      */
  744.     public void setSolarReflectivityCoefficient(final double solarReflectivityCoefficient) {
  745.         this.solarReflectivityCoefficient = new SolarReflectivityCoefficientTerm(solarReflectivityCoefficient);
  746.     }

  747.     /**
  748.      * Gets the current {@link OriginatorRoutingIndicatorTerm} value.
  749.      *
  750.      * @return the current {@link OriginatorRoutingIndicatorTerm} value.
  751.      */
  752.     public OriginatorRoutingIndicatorTerm getOriginatorRoutingIndicator() {
  753.         return originatorRoutingIndicator;
  754.     }

  755.     /**
  756.      * Overrides the default {@link OriginatorRoutingIndicatorTerm} attribute for the {@link IIRVVector} object being built.
  757.      *
  758.      * @param originatorRoutingIndicator originator routing indicator value for the IIRV message
  759.      */
  760.     public void setOriginatorRoutingIndicator(final OriginatorRoutingIndicatorTerm originatorRoutingIndicator) {
  761.         this.originatorRoutingIndicator = originatorRoutingIndicator;
  762.     }

  763.     /**
  764.      * Overrides the default {@link OriginatorRoutingIndicatorTerm} attribute for the {@link IIRVVector} object being built.
  765.      * <p>
  766.      * See {@link OriginatorRoutingIndicatorTerm#OriginatorRoutingIndicatorTerm(String)}
  767.      *
  768.      * @param originatorRoutingIndicator originator routing indicator value for the IIRV message
  769.      */
  770.     public void setOriginatorRoutingIndicator(final String originatorRoutingIndicator) {
  771.         this.originatorRoutingIndicator = new OriginatorRoutingIndicatorTerm(originatorRoutingIndicator);
  772.     }

  773.     /**
  774.      * Returns the satellite ID (set to the value of the {@link VehicleIdCodeTerm}).
  775.      *
  776.      * @return the satellite ID
  777.      */
  778.     public String getSatelliteID() {
  779.         return vehicleIdCode.toEncodedString();
  780.     }


  781. }