public class SP3Parser extends Object implements EphemerisFileParser
Note: this parser is thread-safe, so calling parse(java.io.InputStream)
from
different threads is allowed.
Constructor and Description |
---|
SP3Parser()
Create an SP3 parser using default values.
|
SP3Parser(double mu,
int interpolationSamples,
Function<? super String,? extends Frame> frameBuilder)
Create an SP3 parser and specify the extra information needed to create a
Propagator from the ephemeris data. |
SP3Parser(double mu,
int interpolationSamples,
Function<? super String,? extends Frame> frameBuilder,
TimeScales timeScales)
Create an SP3 parser and specify the extra information needed to create a
Propagator from the ephemeris data. |
Modifier and Type | Method and Description |
---|---|
SP3File |
parse(BufferedReader reader,
String fileName)
Parse an ephemeris file from a stream.
|
SP3File |
parse(InputStream stream)
Parse a SP3 file from an input stream using the UTF-8 charset.
|
SP3File |
parse(String fileName)
Parse an ephemeris file from a file on the local file system.
|
@DefaultDataContext public SP3Parser()
This constructor uses the default data context
.
SP3Parser(double, int, Function)
@DefaultDataContext public SP3Parser(double mu, int interpolationSamples, Function<? super String,? extends Frame> frameBuilder)
Propagator
from the ephemeris data.
This constructor uses the default data context
.
mu
- is the standard gravitational parameter to use for
creating Orbits
from
the ephemeris data. See Constants
.interpolationSamples
- is the number of samples to use when interpolating.frameBuilder
- is a function that can construct a frame from an SP3
coordinate system string. The coordinate system can be
any 5 character string e.g. ITR92, IGb08.SP3Parser(double, int, Function, TimeScales)
public SP3Parser(double mu, int interpolationSamples, Function<? super String,? extends Frame> frameBuilder, TimeScales timeScales)
Propagator
from the ephemeris data.mu
- is the standard gravitational parameter to use for
creating Orbits
from
the ephemeris data. See Constants
.interpolationSamples
- is the number of samples to use when interpolating.frameBuilder
- is a function that can construct a frame from an SP3
coordinate system string. The coordinate system can betimeScales
- the set of time scales used for parsing dates.public SP3File parse(InputStream stream) throws IOException
This method creates a BufferedReader
from the stream and as such this
method may read more data than necessary from stream
and the additional
data will be lost. The other parse methods do not have this issue.
stream
- to read the SP3 file from.IOException
- if stream
throws one.parse(String)
,
parse(BufferedReader, String)
public SP3File parse(String fileName) throws IOException, OrekitException
EphemerisFileParser
For Implementors: Most subclasses should implement this method as follows, but there is no default implementation because most subclasses should use a specialized return type.
try (BufferedReader reader = Files.newBufferedReader(Paths.get(fileName))) { return parse(reader, fileName); }
parse
in interface EphemerisFileParser
fileName
- path to the ephemeris file.IOException
- if one is thrown while opening or reading from fileName
OrekitException
public SP3File parse(BufferedReader reader, String fileName) throws IOException
EphemerisFileParser
parse
in interface EphemerisFileParser
reader
- containing the ephemeris file.fileName
- to use in error messages.IOException
- if reader
throws one.Copyright © 2002-2020 CS GROUP. All rights reserved.