Class IIRVVector

    • Field Detail

      • LINE_SEPARATOR

        public static final String LINE_SEPARATOR
        Line separator: two ASCII carriage returns and two ASCII line feeds.
        See Also:
        Constant Field Values
      • 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 Detail

      • 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 Detail

      • 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
      • 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
      • 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