public class AEMParser extends ADMParser implements AttitudeEphemerisFileParser
Modifier and Type | Class and Description |
---|---|
static class |
AEMParser.AEMRotationOrder
Util class to convert the Euler rotation sequence to
RotationOrder . |
Constructor and Description |
---|
AEMParser()
Simple constructor.
|
AEMParser(DataContext dataContext)
Constructor with data context.
|
Modifier and Type | Method and Description |
---|---|
int |
getInterpolationDegree()
Get default interpolation degree.
|
AEMFile |
parse(BufferedReader reader,
String fileName)
Parse an attitude ephemeris file from a stream.
|
AEMFile |
parse(InputStream stream)
Parse a CCSDS Attitude Data Message.
|
AEMFile |
parse(InputStream stream,
String fileName)
Parse a CCSDS Attitude Data Message.
|
AEMFile |
parse(String fileName)
Parse a CCSDS Attitude Data Message.
|
void |
setLocalScBodyReferenceFrameA(Frame frame)
Set the local spacecraft body reference frame A.
|
void |
setLocalScBodyReferenceFrameB(Frame frame)
Set the local spacecraft body reference frame B.
|
AEMParser |
withConventions(IERSConventions newConventions)
Set IERS conventions.
|
AEMParser |
withDataContext(DataContext dataContext)
Set the data context.
|
AEMParser |
withInternationalDesignator(int newLaunchYear,
int newLaunchNumber,
String newLaunchPiece)
Set international designator.
|
AEMParser |
withInterpolationDegree(int newInterpolationDegree)
Set default interpolation degree.
|
AEMParser |
withMissionReferenceDate(AbsoluteDate newMissionReferenceDate)
Set initial date.
|
AEMParser |
withMu(double newMu)
Set gravitational coefficient.
|
AEMParser |
withSimpleEOP(boolean newSimpleEOP)
Set EOP interpolation method.
|
getConventions, getDataContext, getLaunchNumber, getLaunchPiece, getLaunchYear, getMissionReferenceDate, getMu, isSimpleEOP, parseComment, parseDate, parseGeneralStateDataEntry, parseHeaderEntry, parseMetaDataEntry, toRadians
@DefaultDataContext public AEMParser()
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 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)
.
The international designator parameters (launch year, launch number and
launch piece) are not set here. If they are needed, they must be initialized before
parsing by calling withInternationalDesignator(int, int, String)
The default interpolation degree is not set here. It is set to one by default. If another value
is needed it must be initialized before parsing by calling withInterpolationDegree(int)
This method uses the default data context
. See
withDataContext(DataContext)
.
public AEMParser(DataContext dataContext)
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 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)
.
The international designator parameters (launch year, launch number and
launch piece) are not set here. If they are needed, they must be initialized before
parsing by calling withInternationalDesignator(int, int, String)
The default interpolation degree is not set here. It is set to one by default. If another value
is needed it must be initialized before parsing by calling withInterpolationDegree(int)
dataContext
- used by the parser.AEMParser()
,
withDataContext(DataContext)
public AEMParser withMissionReferenceDate(AbsoluteDate newMissionReferenceDate)
withMissionReferenceDate
in class ADMParser
newMissionReferenceDate
- mission reference date to use while parsingADMParser.getMissionReferenceDate()
public AEMParser withMu(double newMu)
withMu
in class ADMParser
newMu
- gravitational coefficient to use while parsingADMParser.getMu()
public AEMParser withConventions(IERSConventions newConventions)
withConventions
in class ADMParser
newConventions
- IERS conventions to use while parsingADMParser.getConventions()
public AEMParser withSimpleEOP(boolean newSimpleEOP)
withSimpleEOP
in class ADMParser
newSimpleEOP
- if true, tidal effects are ignored when interpolating EOPADMParser.isSimpleEOP()
public AEMParser 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-NNNP{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).
withInternationalDesignator
in class ADMParser
newLaunchYear
- launch yearnewLaunchNumber
- launch numbernewLaunchPiece
- piece of launch (from "A" to "ZZZ")public AEMParser withDataContext(DataContext dataContext)
withDataContext
in class ADMParser
dataContext
- used for frames, time scales, and celestial bodies.public AEMParser withInterpolationDegree(int newInterpolationDegree)
This method may be used to set a default interpolation degree which will be used
when no interpolation degree is parsed in the meta-data of the file. Upon instantiation
with AEMParser(DataContext)
the default interpolation degree is one.
newInterpolationDegree
- default interpolation degree to use while parsinggetInterpolationDegree()
public void setLocalScBodyReferenceFrameA(Frame frame)
This frame corresponds to Keyword.REF_FRAME_A
key in AEM file.
This method may be used to set a reference frame "A" which will be used
if the frame parsed in the file does not correspond to a default frame available
in CCSDSFrame
(e.g. SC_BODY_1, ACTUATOR_1, etc.).
According to CCSDS ADM documentation, it is the responsibility of the end user
to have an understanding of the location of these frames for their particular object.
frame
- the frame to setpublic void setLocalScBodyReferenceFrameB(Frame frame)
This frame corresponds to Keyword.REF_FRAME_B
key in AEM file.
This method may be used to set a reference frame "B" which will be used
if the frame parsed in the file does not correspond to a default frame available
in CCSDSFrame
(e.g. SC_BODY_1, ACTUATOR_1, etc.).
According to CCSDS ADM documentation, it is the responsibility of the end user
to have an understanding of the location of these frames for their particular object.
frame
- the frame to setpublic int getInterpolationDegree()
withInterpolationDegree(int)
public AEMFile parse(String fileName)
parse
in interface AttitudeEphemerisFileParser
parse
in class ADMParser
fileName
- name of the file containing the messagepublic AEMFile parse(InputStream stream)
public AEMFile parse(InputStream stream, String fileName)
public AEMFile parse(BufferedReader reader, String fileName)
parse
in interface AttitudeEphemerisFileParser
reader
- containing the ephemeris file.fileName
- to use in error messages.Copyright © 2002-2020 CS GROUP. All rights reserved.