public abstract class ODMParser extends Object
This base 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.
Modifier | Constructor | Description |
---|---|---|
protected |
ODMParser(AbsoluteDate missionReferenceDate,
double mu,
IERSConventions conventions,
boolean simpleEOP,
int launchYear,
int launchNumber,
String launchPiece) |
Complete constructor.
|
Modifier and Type | Method | Description |
---|---|---|
IERSConventions |
getConventions() |
Get IERS conventions.
|
int |
getLaunchNumber() |
Get the launch number.
|
String |
getLaunchPiece() |
Get the piece of launch.
|
int |
getLaunchYear() |
Get the launch year.
|
AbsoluteDate |
getMissionReferenceDate() |
Get initial date.
|
double |
getMu() |
Get gravitational coefficient.
|
boolean |
isSimpleEOP() |
Get EOP interpolation method.
|
ODMFile |
parse(InputStream stream) |
Parse a CCSDS Orbit Data Message.
|
abstract ODMFile |
parse(InputStream stream,
String fileName) |
Parse a CCSDS Orbit Data Message.
|
ODMFile |
parse(String fileName) |
Parse a CCSDS Orbit Data Message.
|
protected CCSDSFrame |
parseCCSDSFrame(String frameName) |
Parse a CCSDS frame.
|
protected boolean |
parseComment(org.orekit.files.ccsds.KeyValue keyValue,
List<String> comment) |
Parse a comment line.
|
protected AbsoluteDate |
parseDate(String date,
CcsdsTimeScale timeSystem) |
Parse a date.
|
protected boolean |
parseGeneralStateDataEntry(org.orekit.files.ccsds.KeyValue keyValue,
OGMFile general,
List<String> comment) |
Parse a general state data key = value entry.
|
protected boolean |
parseHeaderEntry(org.orekit.files.ccsds.KeyValue keyValue,
ODMFile odmFile,
List<String> comment) |
Parse an entry from the header.
|
protected boolean |
parseMetaDataEntry(org.orekit.files.ccsds.KeyValue keyValue,
ODMMetaData metaData,
List<String> comment) |
Parse a meta-data key = value entry.
|
abstract ODMParser |
withConventions(IERSConventions newConventions) |
Set IERS conventions.
|
abstract ODMParser |
withInternationalDesignator(int newLaunchYear,
int newLaunchNumber,
String newLaunchPiece) |
Set international designator.
|
abstract ODMParser |
withMissionReferenceDate(AbsoluteDate newMissionReferenceDate) |
Set initial date.
|
abstract ODMParser |
withMu(double newMu) |
Set gravitational coefficient.
|
abstract ODMParser |
withSimpleEOP(boolean newSimpleEOP) |
Set EOP interpolation method.
|
protected ODMParser(AbsoluteDate missionReferenceDate, double mu, IERSConventions conventions, boolean simpleEOP, int launchYear, int launchNumber, String launchPiece)
missionReferenceDate
- reference date for Mission Elapsed Time or Mission Relative Time time systemsmu
- gravitational coefficientconventions
- IERS ConventionssimpleEOP
- if true, tidal effects are ignored when interpolating EOPlaunchYear
- launch year for TLEslaunchNumber
- launch number for TLEslaunchPiece
- piece of launch (from "A" to "ZZZ") for TLEspublic abstract ODMParser withMissionReferenceDate(AbsoluteDate newMissionReferenceDate)
newMissionReferenceDate
- mission reference date to use while parsinggetMissionReferenceDate()
public AbsoluteDate getMissionReferenceDate()
withMissionReferenceDate(AbsoluteDate)
public abstract ODMParser withMu(double newMu)
newMu
- gravitational coefficient to use while parsinggetMu()
public double getMu()
withMu(double)
public abstract ODMParser withConventions(IERSConventions newConventions)
newConventions
- IERS conventions to use while parsinggetConventions()
public IERSConventions getConventions()
withConventions(IERSConventions)
public abstract ODMParser withSimpleEOP(boolean newSimpleEOP)
newSimpleEOP
- if true, tidal effects are ignored when interpolating EOPisSimpleEOP()
public boolean isSimpleEOP()
withSimpleEOP(boolean)
public abstract ODMParser withInternationalDesignator(int newLaunchYear, int newLaunchNumber, String newLaunchPiece)
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).
newLaunchYear
- launch yearnewLaunchNumber
- launch numbernewLaunchPiece
- piece of launch (from "A" to "ZZZ")public int getLaunchYear()
public int getLaunchNumber()
public String getLaunchPiece()
public ODMFile parse(String fileName) throws OrekitException
fileName
- name of the file containing the messageOrekitException
- if orbit message cannot be parsedpublic ODMFile parse(InputStream stream) throws OrekitException
stream
- stream containing messageOrekitException
- if orbit message cannot be parsedpublic abstract ODMFile parse(InputStream stream, String fileName) throws OrekitException
stream
- stream containing messagefileName
- name of the file containing the message (for error messages)OrekitException
- if orbit message cannot be parsedprotected boolean parseComment(org.orekit.files.ccsds.KeyValue keyValue, List<String> comment)
keyValue
- key=value pair containing the commentcomment
- placeholder where the current comment line should be addedprotected boolean parseHeaderEntry(org.orekit.files.ccsds.KeyValue keyValue, ODMFile odmFile, List<String> comment) throws OrekitException
keyValue
- key = value pairodmFile
- instance to update with parsed entrycomment
- previous comment lines, will be emptied if used by the keywordOrekitException
- if UTC time scale cannot be retrieved to parse creation dateprotected boolean parseMetaDataEntry(org.orekit.files.ccsds.KeyValue keyValue, ODMMetaData metaData, List<String> comment) throws OrekitException
keyValue
- key = value pairmetaData
- instance to update with parsed entrycomment
- previous comment lines, will be emptied if used by the keywordOrekitException
- if center body or frame cannot be retrievedprotected boolean parseGeneralStateDataEntry(org.orekit.files.ccsds.KeyValue keyValue, OGMFile general, List<String> comment) throws OrekitException
keyValue
- key = value pairgeneral
- instance to update with parsed entrycomment
- previous comment lines, will be emptied if used by the keywordOrekitException
- if center body or frame cannot be retrievedprotected CCSDSFrame parseCCSDSFrame(String frameName)
frameName
- name of the frame, as the value of a CCSDS key=value lineprotected AbsoluteDate parseDate(String date, CcsdsTimeScale timeSystem) throws OrekitException
date
- date to parse, as the value of a CCSDS key=value linetimeSystem
- time system to useOrekitException
- if some time scale cannot be retrievedCopyright © 2002-2018 CS Systèmes d'information. All rights reserved.