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 anobject
.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:
IIRVMessage
,IIRVEphemerisFile.IIRVEphemeris
-
-
Field Summary
Fields Modifier and Type Field Description static Pattern
LINE_1_PATTERN_METADATA_INCLUDED
Regular expression for validating for line 1 when message metadata is included.static Pattern
LINE_1_PATTERN_METADATA_OMITTED
Regular expression for validating for line 1 when message metadata is omitted.static Pattern
LINE_2_PATTERN
Regular expression for validating for line 2.static Pattern
LINE_3_PATTERN
Regular expression for validating for line 3.static Pattern
LINE_4_PATTERN
Regular expression for validating for line 4.static Pattern
LINE_5_PATTERN
Regular expression for validating for line 5.static Pattern
LINE_6_PATTERN
Regular expression for validating for line 6.static String
LINE_SEPARATOR
Line separator: two ASCII carriage returns and two ASCII line feeds.
-
Constructor Summary
Constructors Constructor Description 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).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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
buildLine1(boolean includeMessageMetadata)
Builds the first line of the IIRV vector, not including ASCII carriage returns and line feeds.String
buildLine2()
Builds the second line of the IIRV vector, not including ASCII carriage returns and line feeds.String
buildLine3()
Builds the third line of the IIRV vector, not including ASCII carriage returns and line feeds.String
buildLine4()
Builds the fourth line of the IIRV vector, not including ASCII carriage returns and line feeds.String
buildLine5()
Builds the fifth line of the IIRV vector, not including ASCII carriage returns and line feeds.String
buildLine6()
Builds the sixth line of the IIRV vector, not including ASCII carriage returns and line feeds.int
compareTo(IIRVVector o)
Compares two IIRV vectors for equality based on their string representations, include message metadata information.boolean
equals(Object o)
Compares two IIRV vectors for equality based on their string representations, include message metadata information.AbsoluteDate
getAbsoluteDate(int year)
Creates anAbsoluteDate
instance (in UTC), with time components given by theVectorEpochTerm
, and date components from theDayOfYearTerm
/ inputted year.CoordinateSystemTerm
getCoordinateSystem()
Gets the coordinate system term.CrossSectionalAreaTerm
getCrossSectionalArea()
Gets the cross-sectional area term.DataSourceTerm
getDataSource()
Gets the data source term.DayOfYearTerm
getDayOfYear()
Gets the day of year term.DragCoefficientTerm
getDragCoefficient()
Gets the drag coefficient term.Frame
getFrame()
Returns theFrame
associated with the IIRV vector based on itsCoordinateSystemTerm
.Frame
getFrame(DataContext context)
Returns theFrame
associated with the IIRV vector based on itsCoordinateSystemTerm
.CheckSumTerm
getLine2CheckSum()
Gets the checksum value for line 2.CheckSumTerm
getLine3CheckSum()
Gets the checksum term for line 3.CheckSumTerm
getLine4CheckSum()
Gets the checksum value for line 4 term.CheckSumTerm
getLine5CheckSum()
Gets the checksum term for line 5.MassTerm
getMass()
Gets the mass term.MessageClassTerm
getMessageClass()
Gets the message class term.MessageEndConstantTerm
getMessageEnd()
Gets the "ITERM" message end term.MessageIDTerm
getMessageID()
Gets the message ID term.MessageSourceTerm
getMessageSource()
Gets the message source term.MessageStartConstantTerm
getMessageStart()
Gets the message start term.MessageTypeTerm
getMessageType()
Gets the message type term.OriginatorRoutingIndicatorTerm
getOriginatorRoutingIndicator()
Gets the originator routing indicator term.OriginIdentificationTerm
getOriginIdentification()
Gets the origin identification term.Vector3D
getPositionVector()
Gets a position vector [x y z], represented as aVector3D
instance.PVCoordinates
getPVCoordinates()
Gets the state vector as aPVCoordinates
instance.RoutingIndicatorTerm
getRoutingIndicator()
Gets the routing indicator term.SequenceNumberTerm
getSequenceNumber()
Gets the sequence number term.SolarReflectivityCoefficientTerm
getSolarReflectivityCoefficient()
Gets the solar reflectivity coefficient term.SpareConstantTerm
getSpareTerm()
Gets the spare character term (ASCII space).SupportIdCodeTerm
getSupportIdCode()
Gets the support ID code term.TimeStampedPVCoordinates
getTimeStampedPVCoordinates(int year)
Gets the state vector and time data as aTimeStampedPVCoordinates
instance.TransferTypeConstantTerm
getTransferType()
Gets the transfer type term.VectorEpochTerm
getVectorEpoch()
Gets the vector epoch term.VectorTypeTerm
getVectorType()
Gets the vector type term.VehicleIdCodeTerm
getVehicleIdCode()
Gets the vehicle ID code term.Vector3D
getVelocityVector()
Gets a velocity vector [vx vy vz], represented as aVector3D
instance.PositionVectorComponentTerm
getXPosition()
Gets the x component of position.VelocityVectorComponentTerm
getXVelocity()
Gets the x component of velocity.PositionVectorComponentTerm
getYPosition()
Gets the y component of position.VelocityVectorComponentTerm
getYVelocity()
Gets the y component of velocity.PositionVectorComponentTerm
getZPosition()
Gets the z component of position.VelocityVectorComponentTerm
getZVelocity()
Gets the z component of velocity.int
hashCode()
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.static boolean
isFormatOK(List<String> lines)
Checks the format validity for each line using regular expressions.List<String>
toHumanReadableLines()
Computes each IIRV lines as Strings, with each IIRV vector term separated by a forward slash '/'.String
toIIRVString(boolean includeMessageMetadata)
Combine each line to build a String containing the entire IIRV message (including carriage returns and line feeds).List<String>
toIIRVStrings(boolean includeMessageMetadata)
Computes each IIRV lines as Strings, validate it, and return it in a list.String
toString()
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.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.static void
validateLines(List<String> lines, boolean firstLineIncludesMessageMetadata)
Check the format validity for each line using regular expressions.
-
-
-
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_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 Detail
-
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
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 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
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 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
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 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
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 interfaceComparable<IIRVVector>
-
equals
public boolean equals(Object o)
Compares two IIRV vectors for equality based on their string representations, include message metadata information.
-
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 anAbsoluteDate
instance (in UTC), with time components given by theVectorEpochTerm
, and date components from theDayOfYearTerm
/ 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 aVector3D
instance.Data supplied by the
PositionVectorComponentTerm
values; SeegetXPosition()
,getYPosition()
,getZPosition()
.- Returns:
- Vector containing x,y,z position components
-
getVelocityVector
public Vector3D getVelocityVector()
Gets a velocity vector [vx vy vz], represented as aVector3D
instance.Data supplied by the
VelocityVectorComponentTerm
values; SeegetXVelocity()
,getYVelocity()
,getZVelocity()
.- Returns:
- Vector containing x,y,z velocity components
-
getTimeStampedPVCoordinates
public TimeStampedPVCoordinates getTimeStampedPVCoordinates(int year)
Gets the state vector and time data as aTimeStampedPVCoordinates
instance.Position and velocity data supplied by the x,y,z position components (
PositionVectorComponentTerm
) and vx, vy, vz velocity components (VelocityVectorComponentTerm
). Epoch data given byDayOfYearTerm
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 aPVCoordinates
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 theFrame
associated with the IIRV vector based on itsCoordinateSystemTerm
.- Parameters:
context
- data context used to retrieve frames- Returns:
- coordinate system
- See Also:
CoordinateSystemTerm.getFrame(org.orekit.data.DataContext)
-
getFrame
@DefaultDataContext public Frame getFrame()
Returns theFrame
associated with the IIRV vector based on itsCoordinateSystemTerm
.- Returns:
- coordinate system
- See Also:
CoordinateSystemTerm.getFrame(org.orekit.data.DataContext)
-
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
-
-