Class OEMParser
- java.lang.Object
-
- org.orekit.files.ccsds.ODMParser
-
- org.orekit.files.ccsds.OEMParser
-
- All Implemented Interfaces:
EphemerisFileParser
public class OEMParser extends ODMParser implements EphemerisFileParser
A parser for the CCSDS OEM (Orbit Ephemeris Message).- Since:
- 6.1
- Author:
- sports
-
-
Constructor Summary
Constructors Constructor Description OEMParser()
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OEMFile
parse(BufferedReader reader, String fileName)
Parse an ephemeris file from a stream.OEMFile
parse(InputStream stream)
Parse a CCSDS Orbit Data Message.OEMFile
parse(InputStream stream, String fileName)
Parse a CCSDS Orbit Data Message.OEMFile
parse(String fileName)
Parse a CCSDS Orbit Data Message.OEMParser
withConventions(IERSConventions newConventions)
Set IERS conventions.OEMParser
withInternationalDesignator(int newLaunchYear, int newLaunchNumber, String newLaunchPiece)
Set international designator.OEMParser
withMissionReferenceDate(AbsoluteDate newMissionReferenceDate)
Set initial date.OEMParser
withMu(double newMu)
Set gravitational coefficient.OEMParser
withSimpleEOP(boolean newSimpleEOP)
Set EOP interpolation method.-
Methods inherited from class org.orekit.files.ccsds.ODMParser
getConventions, getLaunchNumber, getLaunchPiece, getLaunchYear, getMissionReferenceDate, getMu, isSimpleEOP, parseCCSDSFrame, parseComment, parseDate, parseGeneralStateDataEntry, parseHeaderEntry, parseMetaDataEntry
-
-
-
-
Constructor Detail
-
OEMParser
public OEMParser()
Simple constructor.This class is immutable, and hence thread safe. When parts must be changed, such as reference date for Mission Elapsed Time or Mission Relative Time time systems, or the gravitational coefficient or the IERS conventions, the various
withXxx
methods must be called, which create a new immutable instance with the new parameters. This is a combination of the builder design pattern and a fluent interface.The initial date for Mission Elapsed Time and Mission Relative Time time systems is not set here. If such time systems are used, it must be initialized before parsing by calling
withMissionReferenceDate(AbsoluteDate)
.The gravitational coefficient is not set here. If it is needed in order to parse Cartesian orbits where the value is not set in the CCSDS file, it must be initialized before parsing by calling
withMu(double)
.The IERS conventions to use is not set here. If it is needed in order to parse some reference frames or UT1 time scale, it must be initialized before parsing by calling
withConventions(IERSConventions)
.
-
-
Method Detail
-
withMissionReferenceDate
public OEMParser withMissionReferenceDate(AbsoluteDate newMissionReferenceDate)
Set initial date.- Specified by:
withMissionReferenceDate
in classODMParser
- Parameters:
newMissionReferenceDate
- mission reference date to use while parsing- Returns:
- a new instance, with mission reference date replaced
- See Also:
ODMParser.getMissionReferenceDate()
-
withMu
public OEMParser withMu(double newMu)
Set gravitational coefficient.- Specified by:
withMu
in classODMParser
- Parameters:
newMu
- gravitational coefficient to use while parsing- Returns:
- a new instance, with gravitational coefficient date replaced
- See Also:
ODMParser.getMu()
-
withConventions
public OEMParser withConventions(IERSConventions newConventions)
Set IERS conventions.- Specified by:
withConventions
in classODMParser
- Parameters:
newConventions
- IERS conventions to use while parsing- Returns:
- a new instance, with IERS conventions replaced
- See Also:
ODMParser.getConventions()
-
withSimpleEOP
public OEMParser withSimpleEOP(boolean newSimpleEOP)
Set EOP interpolation method.- Specified by:
withSimpleEOP
in classODMParser
- Parameters:
newSimpleEOP
- if true, tidal effects are ignored when interpolating EOP- Returns:
- a new instance, with EOP interpolation method replaced
- See Also:
ODMParser.isSimpleEOP()
-
withInternationalDesignator
public OEMParser withInternationalDesignator(int newLaunchYear, int newLaunchNumber, String newLaunchPiece)
Set international designator.This method may be used to ensure the launch year number and pieces are correctly set if they are not present in the CCSDS file header in the OBJECT_ID in the form YYYY-NNN-P{PP}. If they are already in the header, they will be parsed automatically regardless of this method being called or not (i.e. header information override information set here).
- Specified by:
withInternationalDesignator
in classODMParser
- Parameters:
newLaunchYear
- launch yearnewLaunchNumber
- launch numbernewLaunchPiece
- piece of launch (from "A" to "ZZZ")- Returns:
- a new instance, with TLE settings replaced
-
parse
public OEMFile parse(String fileName)
Parse a CCSDS Orbit Data Message.- Specified by:
parse
in interfaceEphemerisFileParser
- Overrides:
parse
in classODMParser
- Parameters:
fileName
- name of the file containing the message- Returns:
- parsed orbit
-
parse
public OEMFile parse(InputStream stream)
Parse a CCSDS Orbit Data Message.
-
parse
public OEMFile parse(InputStream stream, String fileName)
Parse a CCSDS Orbit Data Message.
-
parse
public OEMFile parse(BufferedReader reader, String fileName)
Description copied from interface:EphemerisFileParser
Parse an ephemeris file from a stream.- Specified by:
parse
in interfaceEphemerisFileParser
- Parameters:
reader
- containing the ephemeris file.fileName
- to use in error messages.- Returns:
- a parsed ephemeris file.
-
-