EphemerisFileParser
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 | 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. |
Modifier and Type | Method | 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.
|
public SP3Parser()
SP3Parser(double, int, Function)
public SP3Parser(double mu, int interpolationSamples, Function<? super String,? extends Frame> frameBuilder)
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 be
any 5 character string e.g. ITR92, IGb08.public SP3File parse(InputStream stream) throws OrekitException, 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.OrekitException
- if the ephemeris file cannot be parsed.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
- if the ephemeris file cannot be parsed.public SP3File parse(BufferedReader reader, String fileName) throws OrekitException, IOException
EphemerisFileParser
parse
in interface EphemerisFileParser
reader
- containing the ephemeris file.fileName
- to use in error messages.OrekitException
- if the ephemeris file cannot be parsed.IOException
- if reader
throws one.Copyright © 2002-2018 CS Systèmes d'information. All rights reserved.