Class RinexUtils
- java.lang.Object
-
- org.orekit.files.rinex.utils.parsing.RinexUtils
-
public class RinexUtils extends Object
Utilities for RINEX various messages files.- Since:
- 12.0
- Author:
- Luc Maisonobe
-
-
Field Summary
Fields Modifier and Type Field Description static intLABEL_INDEXIndex of label in header lines.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intconvert2DigitsYear(int yy)Convert a 2 digits year to a complete year.static StringgetLabel(String line)Get the trimmed label from a header line.static booleanmatchesLabel(String line, String label)Check if a header line matches an expected label.static voidparseComment(int lineNumber, String line, RinexFile<?> rinexFile)Parse a comment.static doubleparseDouble(String line, int startIndex, int size)Parse a double value.static intparseInt(String line, int startIndex, int size)Parse an integer value.static voidparseProgramRunByDate(String line, int lineNumber, String name, TimeScales timeScales, RinexBaseHeader header)Parse program, run/by and date.static StringparseString(String line, int startIndex, int size)Parse a string value.static voidparseVersionFileTypeSatelliteSystem(String line, String name, RinexBaseHeader header, double... supportedVersions)Parse version, file type and satellite system.
-
-
-
Field Detail
-
LABEL_INDEX
public static final int LABEL_INDEX
Index of label in header lines.- See Also:
- Constant Field Values
-
-
Method Detail
-
getLabel
public static String getLabel(String line)
Get the trimmed label from a header line.- Parameters:
line- header line to parse- Returns:
- trimmed label
-
matchesLabel
public static boolean matchesLabel(String line, String label)
Check if a header line matches an expected label.- Parameters:
line- header line to checklabel- expected label- Returns:
- true if line matches expected label
-
parseVersionFileTypeSatelliteSystem
public static void parseVersionFileTypeSatelliteSystem(String line, String name, RinexBaseHeader header, double... supportedVersions)
Parse version, file type and satellite system.- Parameters:
line- line to parsename- file name (for error message generation)header- header to fill with parsed datasupportedVersions- supported versions
-
parseProgramRunByDate
public static void parseProgramRunByDate(String line, int lineNumber, String name, TimeScales timeScales, RinexBaseHeader header)
Parse program, run/by and date.- Parameters:
line- line to parselineNumber- line numbername- file name (for error message generation)timeScales- the set of time scales used for parsing dates.header- header to fill with parsed data
-
parseComment
public static void parseComment(int lineNumber, String line, RinexFile<?> rinexFile)Parse a comment.- Parameters:
lineNumber- line numberline- line to parserinexFile- rinex file
-
parseDouble
public static double parseDouble(String line, int startIndex, int size)
Parse a double value.- Parameters:
line- line to parsestartIndex- start indexsize- size of the value- Returns:
- the parsed value
-
parseInt
public static int parseInt(String line, int startIndex, int size)
Parse an integer value.- Parameters:
line- line to parsestartIndex- start indexsize- size of the value- Returns:
- the parsed value
-
parseString
public static String parseString(String line, int startIndex, int size)
Parse a string value.- Parameters:
line- line to parsestartIndex- start indexsize- size of the value- Returns:
- the parsed value
-
convert2DigitsYear
public static int convert2DigitsYear(int yy)
Convert a 2 digits year to a complete year.- Parameters:
yy- year between 0 and 99- Returns:
- complete year
- Since:
- 12.0
-
-