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 and Description |
---|---|
protected |
ODMParser(AbsoluteDate missionReferenceDate,
double mu,
IERSConventions conventions,
boolean simpleEOP,
int launchYear,
int launchNumber,
String launchPiece)
Deprecated.
|
protected |
ODMParser(AbsoluteDate missionReferenceDate,
double mu,
IERSConventions conventions,
boolean simpleEOP,
int launchYear,
int launchNumber,
String launchPiece,
DataContext dataContext)
Complete constructor.
|
Modifier and Type | Method and Description |
---|---|
IERSConventions |
getConventions()
Get IERS conventions.
|
DataContext |
getDataContext()
Get the data context used for getting frames, time scales, and celestial bodies.
|
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 |
withDataContext(DataContext newDataContext)
Set the data context.
|
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.
|
@Deprecated @DefaultDataContext protected ODMParser(AbsoluteDate missionReferenceDate, double mu, IERSConventions conventions, boolean simpleEOP, int launchYear, int launchNumber, String launchPiece)
ODMParser(AbsoluteDate, double, IERSConventions, boolean,
int, int, String, DataContext)
instead.This method uses the default data context
.
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 TLEsODMParser(AbsoluteDate, double, IERSConventions, boolean, int, int, String, DataContext)
protected ODMParser(AbsoluteDate missionReferenceDate, double mu, IERSConventions conventions, boolean simpleEOP, int launchYear, int launchNumber, String launchPiece, DataContext dataContext)
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 TLEsdataContext
- used to retrieve frames and time scales.public 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 DataContext getDataContext()
public abstract ODMParser withDataContext(DataContext newDataContext)
newDataContext
- used for frames, time scales, and celestial bodies.public ODMFile parse(String fileName)
fileName
- name of the file containing the messagepublic ODMFile parse(InputStream stream)
stream
- stream containing messagepublic abstract ODMFile parse(InputStream stream, String fileName)
stream
- stream containing messagefileName
- name of the file containing the message (for error messages)protected 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)
keyValue
- key = value pairodmFile
- instance to update with parsed entrycomment
- previous comment lines, will be emptied if used by the keywordprotected boolean parseMetaDataEntry(org.orekit.files.ccsds.KeyValue keyValue, ODMMetaData metaData, List<String> comment)
keyValue
- key = value pairmetaData
- instance to update with parsed entrycomment
- previous comment lines, will be emptied if used by the keywordprotected boolean parseGeneralStateDataEntry(org.orekit.files.ccsds.KeyValue keyValue, OGMFile general, List<String> comment)
keyValue
- key = value pairgeneral
- instance to update with parsed entrycomment
- previous comment lines, will be emptied if used by the keywordprotected CCSDSFrame parseCCSDSFrame(String frameName)
frameName
- name of the frame, as the value of a CCSDS key=value lineprotected AbsoluteDate parseDate(String date, CcsdsTimeScale timeSystem)
date
- date to parse, as the value of a CCSDS key=value linetimeSystem
- time system to useCopyright © 2002-2020 CS GROUP. All rights reserved.