Class RinexClockParser
- java.lang.Object
-
- org.orekit.files.rinex.clock.RinexClockParser
-
public class RinexClockParser extends Object
A parser for the clock file from the IGS. This parser handles versions 2.0 to 3.04 of the RINEX clock files.It is able to manage some mistakes in file writing and format compliance such as wrong date format, misplaced header blocks or missing information.
A time system should be specified in the file. However, if it is not, default time system will be chosen regarding the satellite system. If it is mixed or not specified, default time system will be UTC.
Caution, files with missing information in header can lead to wrong data dates and station positions. It is advised to check the correctness and format compliance of the clock file to be parsed.
- Since:
- 11.0
- Author:
- Thomas Paulet
- See Also:
- 3.00 clock file format, 3.02 clock file format, 3.04 clock file format
-
-
Constructor Summary
Constructors Constructor Description RinexClockParser()
Create an clock file parser using default values.RinexClockParser(Function<? super String,? extends Frame> frameBuilder)
Create a clock file parser and specify the frame builder.RinexClockParser(Function<? super String,? extends Frame> frameBuilder, TimeScales timeScales)
Constructor, build the IGS clock file parser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RinexClock
parse(BufferedReader reader, String fileName)
Parse an IGS clock file from a stream.RinexClock
parse(InputStream stream)
Parse an IGS clock file from an input stream using the UTF-8 charset.RinexClock
parse(String fileName)
Parse an IGS clock file from a file on the local file system.
-
-
-
Constructor Detail
-
RinexClockParser
@DefaultDataContext public RinexClockParser()
Create an clock file parser using default values.This constructor uses the
default data context
.- See Also:
RinexClockParser(Function)
-
RinexClockParser
@DefaultDataContext public RinexClockParser(Function<? super String,? extends Frame> frameBuilder)
Create a clock file parser and specify the frame builder.This constructor uses the
default data context
.- Parameters:
frameBuilder
- is a function that can construct a frame from a clock file coordinate system string. The coordinate system can be any 5 character string e.g. ITR92, IGb08.- See Also:
RinexClockParser(Function, TimeScales)
-
RinexClockParser
public RinexClockParser(Function<? super String,? extends Frame> frameBuilder, TimeScales timeScales)
Constructor, build the IGS clock file parser.- Parameters:
frameBuilder
- is a function that can construct a frame from a clock file coordinate system string. The coordinate system can be any 5 character string e.g. ITR92, IGb08.timeScales
- the set of time scales used for parsing dates.
-
-
Method Detail
-
parse
public RinexClock parse(InputStream stream) throws IOException
Parse an IGS clock file from an input stream using the UTF-8 charset.This method creates a
BufferedReader
from the stream and as such this method may read more data than necessary fromstream
and the additional data will be lost. The other parse methods do not have this issue.- Parameters:
stream
- to read the IGS clock file from- Returns:
- a parsed IGS clock file
- Throws:
IOException
- ifstream
throws one- See Also:
parse(String)
,parse(BufferedReader, String)
-
parse
public RinexClock parse(String fileName) throws IOException
Parse an IGS clock file from a file on the local file system.- Parameters:
fileName
- file name- Returns:
- a parsed IGS clock file
- Throws:
IOException
- if one is thrown while opening or reading fromfileName
- See Also:
parse(InputStream)
,parse(BufferedReader, String)
-
parse
public RinexClock parse(BufferedReader reader, String fileName) throws IOException
Parse an IGS clock file from a stream.- Parameters:
reader
- containing the clock filefileName
- file name- Returns:
- a parsed IGS clock file
- Throws:
IOException
- ifreader
throws one- See Also:
parse(InputStream)
,parse(String)
-
-