Class IIRVVector
- All Implemented Interfaces:
Comparable<IIRVVector>
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final PatternRegular expression for validating for line 1 when message metadata is included.static final PatternRegular expression for validating for line 1 when message metadata is omitted.static final PatternRegular expression for validating for line 2.static final PatternRegular expression for validating for line 3.static final PatternRegular expression for validating for line 4.static final PatternRegular expression for validating for line 5.static final PatternRegular expression for validating for line 6.static final StringLine separator: two ASCII carriage returns and two ASCII line feeds. -
Constructor Summary
ConstructorsConstructorDescriptionIIRVVector(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).IIRVVector(List<String> lines, UTCScale utc) Constructs an IIRV message object given a list of 6 lines of message body (omitting blank line feeds).IIRVVector(IIRVVector other) Copy constructor.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. -
Method Summary
Modifier and TypeMethodDescriptionbuildLine1(boolean includeMessageMetadata) Builds the first line of the IIRV vector, not including ASCII carriage returns and line feeds.Builds the second line of the IIRV vector, not including ASCII carriage returns and line feeds.Builds the third line of the IIRV vector, not including ASCII carriage returns and line feeds.Builds the fourth line of the IIRV vector, not including ASCII carriage returns and line feeds.Builds the fifth line of the IIRV vector, not including ASCII carriage returns and line feeds.Builds the sixth line of the IIRV vector, not including ASCII carriage returns and line feeds.intCompares two IIRV vectors for equality based on their string representations, include message metadata information.booleanCompares two IIRV vectors for equality based on their string representations, include message metadata information.getAbsoluteDate(int year) Creates anAbsoluteDateinstance (in UTC), with time components given by theVectorEpochTerm, and date components from theDayOfYearTerm/ inputted year.Gets the coordinate system term.Gets the cross-sectional area term.Gets the data source term.Gets the day of year term.Gets the drag coefficient term.getFrame()Returns theFrameassociated with the IIRV vector based on itsCoordinateSystemTerm.getFrame(DataContext context) Returns theFrameassociated with the IIRV vector based on itsCoordinateSystemTerm.Gets the checksum value for line 2.Gets the checksum term for line 3.Gets the checksum value for line 4 term.Gets the checksum term for line 5.getMass()Gets the mass term.Gets the message class term.Gets the "ITERM" message end term.Gets the message ID term.Gets the message source term.Gets the message start term.Gets the message type term.Gets the originator routing indicator term.Gets the origin identification term.Gets a position vector [x y z], represented as aVector3Dinstance.Gets the state vector as aPVCoordinatesinstance.Gets the routing indicator term.Gets the sequence number term.Gets the solar reflectivity coefficient term.Gets the spare character term (ASCII space).Gets the support ID code term.getTimeStampedPVCoordinates(int year) Gets the state vector and time data as aTimeStampedPVCoordinatesinstance.Gets the transfer type term.Gets the vector epoch term.Gets the vector type term.Gets the vehicle ID code term.Gets a velocity vector [vx vy vz], represented as aVector3Dinstance.Gets the x component of position.Gets the x component of velocity.Gets the y component of position.Gets the y component of velocity.Gets the z component of position.Gets the z component of velocity.inthashCode()static booleanChecks the format validity for each line using regular expressions.static booleanisFormatOK(List<String> lines) Checks the format validity for each line using regular expressions.Computes each IIRV lines as Strings, with each IIRV vector term separated by a forward slash '/'.toIIRVString(boolean includeMessageMetadata) Combine each line to build a String containing the entire IIRV message (including carriage returns and line feeds).toIIRVStrings(boolean includeMessageMetadata) Computes each IIRV lines as Strings, validate it, and return it in a list.toString()static booleanvalidateLine(int lineIndex, String line) Check an input string against the specified line's regular expression, and validate the checksum for lines 2-5.static voidvalidateLines(String line1, String line2, String line3, String line4, String line5, String line6, boolean firstLineIncludesMessageMetadata) Check the format validity for each line using regular expressions.static voidvalidateLines(List<String> lines, boolean firstLineIncludesMessageMetadata) Check the format validity for each line using regular expressions.
-
Field Details
-
LINE_SEPARATOR
Line separator: two ASCII carriage returns and two ASCII line feeds.- See Also:
-
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
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
Regular expression for validating for line 2. -
LINE_3_PATTERN
Regular expression for validating for line 3. -
LINE_4_PATTERN
Regular expression for validating for line 4. -
LINE_5_PATTERN
Regular expression for validating for line 5. -
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 typemessageID- Message identificationmessageSource- Message sourcemessageClass- Message classoriginIdentification- Origin identificationroutingIndicator- Destination routing indicatorvectorType- Vector typedataSource- Data sourcecoordinateSystem- Coordinate systemsupportIdCode- Support identification codevehicleIdCode- Vehicle identification codesequenceNumber- Sequence numberdayOfYear- Day of yearvectorEpoch- Vector epochxPosition- 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
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 messageutc- 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 bodyline2- Line 2 of IIRV message bodyline3- Line 3 of IIRV message bodyline4- Line 4 of IIRV message bodyline5- Line 5 of IIRV message bodyline6- Line 6 of IIRV message bodyutc- UTC time scale
-
IIRVVector
Copy constructor.- Parameters:
other- Other IIRVVector to create from.
-
-
Method Details
-
isFormatOK
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 bodyline2- Line 2 of IIRV message bodyline3- Line 3 of IIRV message bodyline4- Line 4 of IIRV message bodyline5- Line 5 of IIRV message bodyline6- Line 6 of IIRV message body- Returns:
- true if format is valid, false otherwise
-
validateLines
Check the format validity for each line using regular expressions.- Parameters:
lines- the six-element list of linesfirstLineIncludesMessageMetadata- 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 bodyline2- Line 2 of IIRV message bodyline3- Line 3 of IIRV message bodyline4- Line 4 of IIRV message bodyline5- Line 5 of IIRV message bodyline6- Line 6 of IIRV message bodyfirstLineIncludesMessageMetadata- true if message metadata terms are included in the first line of the vector
-
validateLine
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
Compares two IIRV vectors for equality based on their string representations, include message metadata information.- Specified by:
compareToin interfaceComparable<IIRVVector>
-
equals
Compares two IIRV vectors for equality based on their string representations, include message metadata information. -
toString
-
hashCode
public int hashCode() -
toIIRVString
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
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
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
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
Builds the second line of the IIRV vector, not including ASCII carriage returns and line feeds.- Returns:
- Line 2 of IIRV vector
-
buildLine3
Builds the third line of the IIRV vector, not including ASCII carriage returns and line feeds.- Returns:
- Line 3 of IIRV vector
-
buildLine4
Builds the fourth line of the IIRV vector, not including ASCII carriage returns and line feeds.- Returns:
- Line 4 of IIRV vector
-
buildLine5
Builds the fifth line of the IIRV vector, not including ASCII carriage returns and line feeds.- Returns:
- Line 5 of IIRV vector
-
buildLine6
Builds the sixth line of the IIRV vector, not including ASCII carriage returns and line feeds.- Returns:
- Line 6 of IIRV vector
-
getAbsoluteDate
Creates anAbsoluteDateinstance (in UTC), with time components given by theVectorEpochTerm, and date components from theDayOfYearTerm/ inputted year.- Parameters:
year- Year associated with the created- Returns:
- created
AbsoluteDateinstance
-
getPositionVector
Gets a position vector [x y z], represented as aVector3Dinstance.Data supplied by the
PositionVectorComponentTermvalues; SeegetXPosition(),getYPosition(),getZPosition().- Returns:
- Vector containing x,y,z position components
-
getVelocityVector
Gets a velocity vector [vx vy vz], represented as aVector3Dinstance.Data supplied by the
VelocityVectorComponentTermvalues; SeegetXVelocity(),getYVelocity(),getZVelocity().- Returns:
- Vector containing x,y,z velocity components
-
getTimeStampedPVCoordinates
Gets the state vector and time data as aTimeStampedPVCoordinatesinstance.Position and velocity data supplied by the x,y,z position components (
PositionVectorComponentTerm) and vx, vy, vz velocity components (VelocityVectorComponentTerm). Epoch data given byDayOfYearTermVectorEpochTerm.- Parameters:
year- The year of the corresponding coordinates (IIRV vector does not contain year information)- Returns:
- Newly created
TimeStampedPVCoordinatesinstance populated with data from the IIRV vector terms.
-
getPVCoordinates
Gets the state vector as aPVCoordinatesinstance.Position and velocity data supplied by the x,y,z position components (
PositionVectorComponentTerm) and vx, vy, vz velocity components (VelocityVectorComponentTerm).- Returns:
- Newly created
PVCoordinatesinstance populated with data from the IIRV vector terms.
-
getFrame
Returns theFrameassociated with the IIRV vector based on itsCoordinateSystemTerm.- Parameters:
context- data context used to retrieve frames- Returns:
- coordinate system
- See Also:
-
getFrame
Returns theFrameassociated with the IIRV vector based on itsCoordinateSystemTerm.- Returns:
- coordinate system
- See Also:
-
getMessageType
Gets the message type term.- Returns:
- the message type term
-
getMessageID
Gets the message ID term.- Returns:
- the message ID term
-
getMessageSource
Gets the message source term.- Returns:
- the message source term
-
getMessageClass
Gets the message class term.- Returns:
- the message class term
-
getMessageStart
Gets the message start term.- Returns:
- the message start term
-
getOriginIdentification
Gets the origin identification term.- Returns:
- the origin identification term
-
getRoutingIndicator
Gets the routing indicator term.- Returns:
- the routing indicator term
-
getVectorType
Gets the vector type term.- Returns:
- the vector type term
-
getDataSource
Gets the data source term.- Returns:
- the data source term
-
getTransferType
Gets the transfer type term.- Returns:
- the transfer type term
-
getCoordinateSystem
Gets the coordinate system term.- Returns:
- the coordinate system term
-
getSupportIdCode
Gets the support ID code term.- Returns:
- the support ID code term
-
getVehicleIdCode
Gets the vehicle ID code term.- Returns:
- the vehicle ID code term
-
getSequenceNumber
Gets the sequence number term.- Returns:
- the sequence number term
-
getDayOfYear
Gets the day of year term.- Returns:
- the day of year term
-
getVectorEpoch
Gets the vector epoch term.- Returns:
- the vector epoch term
-
getLine2CheckSum
Gets the checksum value for line 2.- Returns:
- the checksum value for line 2
-
getXPosition
Gets the x component of position.- Returns:
- the x component of position
-
getYPosition
Gets the y component of position.- Returns:
- the y component of position
-
getZPosition
Gets the z component of position.- Returns:
- the z component of position
-
getLine3CheckSum
Gets the checksum term for line 3.- Returns:
- the checksum term for line 3
-
getXVelocity
Gets the x component of velocity.- Returns:
- the x component of velocity
-
getYVelocity
Gets the y component of velocity.- Returns:
- the y component of velocity
-
getZVelocity
Gets the z component of velocity.- Returns:
- the z component of velocity
-
getLine4CheckSum
Gets the checksum value for line 4 term.- Returns:
- the checksum value for line 4 term
-
getMass
Gets the mass term.- Returns:
- the mass term
-
getCrossSectionalArea
Gets the cross-sectional area term.- Returns:
- the cross-sectional area term
-
getDragCoefficient
Gets the drag coefficient term.- Returns:
- the drag coefficient term
-
getSolarReflectivityCoefficient
Gets the solar reflectivity coefficient term.- Returns:
- the solar reflectivity coefficient term
-
getLine5CheckSum
Gets the checksum term for line 5.- Returns:
- the checksum term for line 5
-
getMessageEnd
Gets the "ITERM" message end term.- Returns:
- the "ITERM" message end term
-
getSpareTerm
Gets the spare character term (ASCII space).- Returns:
- the spare character term (ASCII space)
-
getOriginatorRoutingIndicator
Gets the originator routing indicator term.- Returns:
- the originator routing indicator term
-