Class IIRVVector

java.lang.Object
org.orekit.files.iirv.IIRVVector
All Implemented Interfaces:
Comparable<IIRVVector>

public class IIRVVector extends Object implements Comparable<IIRVVector>
A vector containing ephemeris state, epoch, and metadata information that, when taken as a series, comprises an object.

See IIRVMessage for documentation on the structure of a single IIRV vector within an IIRV message body.

Since:
13.0
Author:
Nick LaFarge
See Also:
  • Field Details

    • LINE_SEPARATOR

      public static final String LINE_SEPARATOR
      Line separator: two ASCII carriage returns and two ASCII line feeds.
      See Also:
    • LINE_1_PATTERN_METADATA_INCLUDED

      public static final Pattern LINE_1_PATTERN_METADATA_INCLUDED
      Regular expression for validating for line 1 when message metadata is included.

      Message metadata fields refer to the first four terms defined for an IIRV vector:

    • LINE_1_PATTERN_METADATA_OMITTED

      public static final Pattern LINE_1_PATTERN_METADATA_OMITTED
      Regular expression for validating for line 1 when message metadata is omitted.

      Message metadata fields refer to the first four terms defined for an IIRV vector:

    • LINE_2_PATTERN

      public static final Pattern LINE_2_PATTERN
      Regular expression for validating for line 2.
    • LINE_3_PATTERN

      public static final Pattern LINE_3_PATTERN
      Regular expression for validating for line 3.
    • LINE_4_PATTERN

      public static final Pattern LINE_4_PATTERN
      Regular expression for validating for line 4.
    • LINE_5_PATTERN

      public static final Pattern LINE_5_PATTERN
      Regular expression for validating for line 5.
    • LINE_6_PATTERN

      public static final Pattern LINE_6_PATTERN
      Regular expression for validating for line 6.
  • Constructor Details

    • IIRVVector

      public IIRVVector(MessageTypeTerm messageType, MessageIDTerm messageID, MessageSourceTerm messageSource, MessageClassTerm messageClass, OriginIdentificationTerm originIdentification, RoutingIndicatorTerm routingIndicator, VectorTypeTerm vectorType, DataSourceTerm dataSource, CoordinateSystemTerm coordinateSystem, SupportIdCodeTerm supportIdCode, VehicleIdCodeTerm vehicleIdCode, SequenceNumberTerm sequenceNumber, DayOfYearTerm dayOfYear, VectorEpochTerm vectorEpoch, PositionVectorComponentTerm xPosition, PositionVectorComponentTerm yPosition, PositionVectorComponentTerm zPosition, VelocityVectorComponentTerm xVelocity, VelocityVectorComponentTerm yVelocity, VelocityVectorComponentTerm zVelocity, MassTerm mass, CrossSectionalAreaTerm crossSectionalArea, DragCoefficientTerm dragCoefficient, SolarReflectivityCoefficientTerm solarReflectivityCoefficient, OriginatorRoutingIndicatorTerm originatorRoutingIndicatorTerm, UTCScale utc)
      Constructs an IIRV message from its composite terms.
      Parameters:
      messageType - Message type
      messageID - Message identification
      messageSource - Message source
      messageClass - Message class
      originIdentification - Origin identification
      routingIndicator - Destination routing indicator
      vectorType - Vector type
      dataSource - Data source
      coordinateSystem - Coordinate system
      supportIdCode - Support identification code
      vehicleIdCode - Vehicle identification code
      sequenceNumber - Sequence number
      dayOfYear - Day of year
      vectorEpoch - Vector epoch
      xPosition - X component of the position vector [m]
      yPosition - Y component of the position vector [m]
      zPosition - Z component of the position vector [m]
      xVelocity - X component of the velocity vector [m/s]
      yVelocity - Y component of the velocity vector [m/s]
      zVelocity - Z component of the velocity vector [m/s]
      mass - Satellite mass (kg)
      crossSectionalArea - Average satellite cross-sectional area [m^2]
      dragCoefficient - Drag coefficient [dimensionless]
      solarReflectivityCoefficient - Solar reflectivity coefficient [dimensionless]
      originatorRoutingIndicatorTerm - Originator of message (GCQU or GAQD)
      utc - UTC time scale
    • IIRVVector

      public IIRVVector(List<String> lines, UTCScale utc)
      Constructs an IIRV message object given a list of 6 lines of message body (omitting blank line feeds).
      Parameters:
      lines - Six-element list of lines in an IIRV message
      utc - UTC time scale
    • IIRVVector

      public IIRVVector(String line1, String line2, String line3, String line4, String line5, String line6, UTCScale utc)
      Constructs an IIRV message object given 6 lines of message body (omitting blank line feeds).
      Parameters:
      line1 - Line 1 of IIRV message body
      line2 - Line 2 of IIRV message body
      line3 - Line 3 of IIRV message body
      line4 - Line 4 of IIRV message body
      line5 - Line 5 of IIRV message body
      line6 - Line 6 of IIRV message body
      utc - UTC time scale
    • IIRVVector

      public IIRVVector(IIRVVector other)
      Copy constructor.
      Parameters:
      other - Other IIRVVector to create from.
  • Method Details

    • isFormatOK

      public static boolean isFormatOK(List<String> lines)
      Checks the format validity for each line using regular expressions.
      Parameters:
      lines - the six-element list of lines
      Returns:
      true if format is valid, false otherwise
    • isFormatOK

      public static boolean isFormatOK(String line1, String line2, String line3, String line4, String line5, String line6)
      Checks the format validity for each line using regular expressions.
      Parameters:
      line1 - Line 1 of IIRV message body
      line2 - Line 2 of IIRV message body
      line3 - Line 3 of IIRV message body
      line4 - Line 4 of IIRV message body
      line5 - Line 5 of IIRV message body
      line6 - Line 6 of IIRV message body
      Returns:
      true if format is valid, false otherwise
    • validateLines

      public static void validateLines(List<String> lines, boolean firstLineIncludesMessageMetadata)
      Check the format validity for each line using regular expressions.
      Parameters:
      lines - the six-element list of lines
      firstLineIncludesMessageMetadata - true if message metadata terms are included in the first line of the vector
    • validateLines

      public static void validateLines(String line1, String line2, String line3, String line4, String line5, String line6, boolean firstLineIncludesMessageMetadata)
      Check the format validity for each line using regular expressions.
      Parameters:
      line1 - Line 1 of IIRV message body
      line2 - Line 2 of IIRV message body
      line3 - Line 3 of IIRV message body
      line4 - Line 4 of IIRV message body
      line5 - Line 5 of IIRV message body
      line6 - Line 6 of IIRV message body
      firstLineIncludesMessageMetadata - true if message metadata terms are included in the first line of the vector
    • validateLine

      public static boolean validateLine(int lineIndex, String line)
      Check an input string against the specified line's regular expression, and validate the checksum for lines 2-5.
      Parameters:
      lineIndex - Line index to validate against (0-5)
      line - String to validate
      Returns:
      true if the inputted line string is valid, false otherwise.
    • compareTo

      public int compareTo(IIRVVector o)
      Compares two IIRV vectors for equality based on their string representations, include message metadata information.
      Specified by:
      compareTo in interface Comparable<IIRVVector>
    • equals

      public boolean equals(Object o)
      Compares two IIRV vectors for equality based on their string representations, include message metadata information.
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toIIRVString

      public String toIIRVString(boolean includeMessageMetadata)
      Combine each line to build a String containing the entire IIRV message (including carriage returns and line feeds).
      Parameters:
      includeMessageMetadata - If true, include message metadata terms (MessageTypeTerm, MessageIDTerm, MessageSourceTerm, MessageClassTerm) at the beginning of the first line.
      Returns:
      Full IIRV vector in String format
    • toIIRVStrings

      public List<String> toIIRVStrings(boolean includeMessageMetadata)
      Computes each IIRV lines as Strings, validate it, and return it in a list.
      Parameters:
      includeMessageMetadata - If true, include message metadata terms (MessageTypeTerm, MessageIDTerm, MessageSourceTerm, MessageClassTerm) at the beginning of the first line.
      Returns:
      List of IIRV lines as Strings
    • toHumanReadableLines

      public List<String> toHumanReadableLines()
      Computes each IIRV lines as Strings, with each IIRV vector term separated by a forward slash '/'.

      This method is intended to display more human-readable IIRV vectors, and should never be used for writing an actual IIRV message (see toIIRVStrings(boolean)).

      Returns:
      List of six human-readable IIRV lines, with each IIRV vector term separated by a forward slash '/'
    • buildLine1

      public String buildLine1(boolean includeMessageMetadata)
      Builds the first line of the IIRV vector, not including ASCII carriage returns and line feeds.
      Only includes message type, id, source, and class if this is the first IIRV in the sequence, i.e., sequenceNumber=0
      Parameters:
      includeMessageMetadata - If true, include message metadata terms (MessageTypeTerm, MessageIDTerm, MessageSourceTerm, MessageClassTerm) at the beginning of the line.
      Returns:
      Line 1 of IIRV vector
    • buildLine2

      public String buildLine2()
      Builds the second line of the IIRV vector, not including ASCII carriage returns and line feeds.
      Returns:
      Line 2 of IIRV vector
    • buildLine3

      public String buildLine3()
      Builds the third line of the IIRV vector, not including ASCII carriage returns and line feeds.
      Returns:
      Line 3 of IIRV vector
    • buildLine4

      public String buildLine4()
      Builds the fourth line of the IIRV vector, not including ASCII carriage returns and line feeds.
      Returns:
      Line 4 of IIRV vector
    • buildLine5

      public String buildLine5()
      Builds the fifth line of the IIRV vector, not including ASCII carriage returns and line feeds.
      Returns:
      Line 5 of IIRV vector
    • buildLine6

      public String buildLine6()
      Builds the sixth line of the IIRV vector, not including ASCII carriage returns and line feeds.
      Returns:
      Line 6 of IIRV vector
    • getAbsoluteDate

      public AbsoluteDate getAbsoluteDate(int year)
      Creates an AbsoluteDate instance (in UTC), with time components given by the VectorEpochTerm, and date components from the DayOfYearTerm / inputted year.
      Parameters:
      year - Year associated with the created
      Returns:
      created AbsoluteDate instance
    • getPositionVector

      public Vector3D getPositionVector()
      Gets a position vector [x y z], represented as a Vector3D instance.

      Data supplied by the PositionVectorComponentTerm values; See getXPosition(), getYPosition(), getZPosition().

      Returns:
      Vector containing x,y,z position components
    • getVelocityVector

      public Vector3D getVelocityVector()
      Gets a velocity vector [vx vy vz], represented as a Vector3D instance.

      Data supplied by the VelocityVectorComponentTerm values; See getXVelocity(), getYVelocity(), getZVelocity().

      Returns:
      Vector containing x,y,z velocity components
    • getTimeStampedPVCoordinates

      public TimeStampedPVCoordinates getTimeStampedPVCoordinates(int year)
      Gets the state vector and time data as a TimeStampedPVCoordinates instance.

      Position and velocity data supplied by the x,y,z position components (PositionVectorComponentTerm) and vx, vy, vz velocity components (VelocityVectorComponentTerm). Epoch data given by DayOfYearTerm VectorEpochTerm.

      Parameters:
      year - The year of the corresponding coordinates (IIRV vector does not contain year information)
      Returns:
      Newly created TimeStampedPVCoordinates instance populated with data from the IIRV vector terms.
    • getPVCoordinates

      public PVCoordinates getPVCoordinates()
      Gets the state vector as a PVCoordinates instance.

      Position and velocity data supplied by the x,y,z position components (PositionVectorComponentTerm) and vx, vy, vz velocity components (VelocityVectorComponentTerm).

      Returns:
      Newly created PVCoordinates instance populated with data from the IIRV vector terms.
    • getFrame

      public Frame getFrame(DataContext context)
      Returns the Frame associated with the IIRV vector based on its CoordinateSystemTerm.
      Parameters:
      context - data context used to retrieve frames
      Returns:
      coordinate system
      See Also:
    • getFrame

      @DefaultDataContext public Frame getFrame()
      Returns the Frame associated with the IIRV vector based on its CoordinateSystemTerm.
      Returns:
      coordinate system
      See Also:
    • getMessageType

      public MessageTypeTerm getMessageType()
      Gets the message type term.
      Returns:
      the message type term
    • getMessageID

      public MessageIDTerm getMessageID()
      Gets the message ID term.
      Returns:
      the message ID term
    • getMessageSource

      public MessageSourceTerm getMessageSource()
      Gets the message source term.
      Returns:
      the message source term
    • getMessageClass

      public MessageClassTerm getMessageClass()
      Gets the message class term.
      Returns:
      the message class term
    • getMessageStart

      public MessageStartConstantTerm getMessageStart()
      Gets the message start term.
      Returns:
      the message start term
    • getOriginIdentification

      public OriginIdentificationTerm getOriginIdentification()
      Gets the origin identification term.
      Returns:
      the origin identification term
    • getRoutingIndicator

      public RoutingIndicatorTerm getRoutingIndicator()
      Gets the routing indicator term.
      Returns:
      the routing indicator term
    • getVectorType

      public VectorTypeTerm getVectorType()
      Gets the vector type term.
      Returns:
      the vector type term
    • getDataSource

      public DataSourceTerm getDataSource()
      Gets the data source term.
      Returns:
      the data source term
    • getTransferType

      public TransferTypeConstantTerm getTransferType()
      Gets the transfer type term.
      Returns:
      the transfer type term
    • getCoordinateSystem

      public CoordinateSystemTerm getCoordinateSystem()
      Gets the coordinate system term.
      Returns:
      the coordinate system term
    • getSupportIdCode

      public SupportIdCodeTerm getSupportIdCode()
      Gets the support ID code term.
      Returns:
      the support ID code term
    • getVehicleIdCode

      public VehicleIdCodeTerm getVehicleIdCode()
      Gets the vehicle ID code term.
      Returns:
      the vehicle ID code term
    • getSequenceNumber

      public SequenceNumberTerm getSequenceNumber()
      Gets the sequence number term.
      Returns:
      the sequence number term
    • getDayOfYear

      public DayOfYearTerm getDayOfYear()
      Gets the day of year term.
      Returns:
      the day of year term
    • getVectorEpoch

      public VectorEpochTerm getVectorEpoch()
      Gets the vector epoch term.
      Returns:
      the vector epoch term
    • getLine2CheckSum

      public CheckSumTerm getLine2CheckSum()
      Gets the checksum value for line 2.
      Returns:
      the checksum value for line 2
    • getXPosition

      public PositionVectorComponentTerm getXPosition()
      Gets the x component of position.
      Returns:
      the x component of position
    • getYPosition

      public PositionVectorComponentTerm getYPosition()
      Gets the y component of position.
      Returns:
      the y component of position
    • getZPosition

      public PositionVectorComponentTerm getZPosition()
      Gets the z component of position.
      Returns:
      the z component of position
    • getLine3CheckSum

      public CheckSumTerm getLine3CheckSum()
      Gets the checksum term for line 3.
      Returns:
      the checksum term for line 3
    • getXVelocity

      public VelocityVectorComponentTerm getXVelocity()
      Gets the x component of velocity.
      Returns:
      the x component of velocity
    • getYVelocity

      public VelocityVectorComponentTerm getYVelocity()
      Gets the y component of velocity.
      Returns:
      the y component of velocity
    • getZVelocity

      public VelocityVectorComponentTerm getZVelocity()
      Gets the z component of velocity.
      Returns:
      the z component of velocity
    • getLine4CheckSum

      public CheckSumTerm getLine4CheckSum()
      Gets the checksum value for line 4 term.
      Returns:
      the checksum value for line 4 term
    • getMass

      public MassTerm getMass()
      Gets the mass term.
      Returns:
      the mass term
    • getCrossSectionalArea

      public CrossSectionalAreaTerm getCrossSectionalArea()
      Gets the cross-sectional area term.
      Returns:
      the cross-sectional area term
    • getDragCoefficient

      public DragCoefficientTerm getDragCoefficient()
      Gets the drag coefficient term.
      Returns:
      the drag coefficient term
    • getSolarReflectivityCoefficient

      public SolarReflectivityCoefficientTerm getSolarReflectivityCoefficient()
      Gets the solar reflectivity coefficient term.
      Returns:
      the solar reflectivity coefficient term
    • getLine5CheckSum

      public CheckSumTerm getLine5CheckSum()
      Gets the checksum term for line 5.
      Returns:
      the checksum term for line 5
    • getMessageEnd

      public MessageEndConstantTerm getMessageEnd()
      Gets the "ITERM" message end term.
      Returns:
      the "ITERM" message end term
    • getSpareTerm

      public SpareConstantTerm getSpareTerm()
      Gets the spare character term (ASCII space).
      Returns:
      the spare character term (ASCII space)
    • getOriginatorRoutingIndicator

      public OriginatorRoutingIndicatorTerm getOriginatorRoutingIndicator()
      Gets the originator routing indicator term.
      Returns:
      the originator routing indicator term