public abstract class ADMParser 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 |
ADMParser(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.
|
ADMFile |
parse(InputStream stream)
Parse a CCSDS Attitude Data Message.
|
abstract ADMFile |
parse(InputStream stream,
String fileName)
Parse a CCSDS Attitude Data Message.
|
ADMFile |
parse(String fileName)
Parse a CCSDS Attitude Data Message.
|
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,
APMFile general,
List<String> comment)
Parse a general state data key = value entry.
|
protected boolean |
parseHeaderEntry(org.orekit.files.ccsds.KeyValue keyValue,
ADMFile admFile,
List<String> comment)
Parse an entry from the header.
|
protected boolean |
parseMetaDataEntry(org.orekit.files.ccsds.KeyValue keyValue,
ADMMetaData metaData,
List<String> comment)
Parse a meta-data key = value entry.
|
protected double |
toRadians(org.orekit.files.ccsds.KeyValue keyValue)
Convert a
KeyValue in degrees to a real value in randians. |
abstract ADMParser |
withConventions(IERSConventions newConventions)
Set IERS conventions.
|
abstract ADMParser |
withDataContext(DataContext newDataContext)
Set the data context.
|
abstract ADMParser |
withInternationalDesignator(int newLaunchYear,
int newLaunchNumber,
String newLaunchPiece)
Set international designator.
|
abstract ADMParser |
withMissionReferenceDate(AbsoluteDate newMissionReferenceDate)
Set initial date.
|
abstract ADMParser |
withMu(double newMu)
Set gravitational coefficient.
|
abstract ADMParser |
withSimpleEOP(boolean newSimpleEOP)
Set EOP interpolation method.
|
protected ADMParser(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 ADMParser withMissionReferenceDate(AbsoluteDate newMissionReferenceDate)
newMissionReferenceDate
- mission reference date to use while parsinggetMissionReferenceDate()
public AbsoluteDate getMissionReferenceDate()
withMissionReferenceDate(AbsoluteDate)
public abstract ADMParser withMu(double newMu)
newMu
- gravitational coefficient to use while parsinggetMu()
public double getMu()
withMu(double)
public abstract ADMParser withConventions(IERSConventions newConventions)
newConventions
- IERS conventions to use while parsinggetConventions()
public IERSConventions getConventions()
withConventions(IERSConventions)
public abstract ADMParser withSimpleEOP(boolean newSimpleEOP)
newSimpleEOP
- if true, tidal effects are ignored when interpolating EOPisSimpleEOP()
public boolean isSimpleEOP()
withSimpleEOP(boolean)
public abstract ADMParser 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 ADMParser withDataContext(DataContext newDataContext)
newDataContext
- used for frames, time scales, and celestial bodies.public ADMFile parse(String fileName)
fileName
- name of the file containing the messagepublic ADMFile parse(InputStream stream)
stream
- stream containing messagepublic abstract ADMFile 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, ADMFile admFile, List<String> comment)
keyValue
- key = value pairadmFile
- 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, ADMMetaData 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, APMFile 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 AbsoluteDate parseDate(String date, CcsdsTimeScale timeSystem)
date
- date to parse, as the value of a CCSDS key=value linetimeSystem
- time system to useprotected double toRadians(org.orekit.files.ccsds.KeyValue keyValue)
KeyValue
in degrees to a real value in randians.keyValue
- key valueCopyright © 2002-2020 CS GROUP. All rights reserved.