public class AemWriter extends AbstractMessageWriter<Header,AemSegment,Aem>
The AEM header and metadata used by this writer are described in the following tables.
Many metadata items are optional or have default values so they do not need to be specified.
At a minimum the user must supply those values that are required and for which no
default exits: AdmMetadataKey.OBJECT_NAME
, AdmMetadataKey.OBJECT_ID
,
AemMetadataKey.START_TIME
and AemMetadataKey.STOP_TIME
.
The usage column in the table indicates where the metadata item is used, either in the AEM header
or in the metadata section at the start of an AEM attitude segment.
The AEM header for the whole AEM file is set when calling AbstractMessageWriter.writeHeader(Generator, Header)
,
the entries are defined in table 4-2 of the ADM standard.
Keyword | Mandatory | Default in Orekit |
---|---|---|
CCSDS_AEM_VERS |
Yes | CCSDS_AEM_VERS |
HeaderKey.COMMENT |
No | empty |
HeaderKey.CREATION_DATE |
Yes | Now |
HeaderKey.ORIGINATOR |
Yes | AbstractMessageWriter.DEFAULT_ORIGINATOR |
The AEM metadata for the AEM file is set when calling writeSegmentContent(Generator, double, AemSegment)
,
the entries are defined in tables 4-3, 4-4 and annex A of the ADM standard.
Keyword | Mandatory | Default in Orekit |
---|---|---|
MetadataKey.COMMENT |
No | empty |
AdmMetadataKey.OBJECT_NAME |
Yes | |
AdmMetadataKey.OBJECT_ID |
Yes | |
AdmMetadataKey.CENTER_NAME |
No | |
AemMetadataKey.REF_FRAME_A |
Yes | |
AemMetadataKey.REF_FRAME_B |
Yes | |
AemMetadataKey.ATTITUDE_DIR |
Yes | |
MetadataKey.TIME_SYSTEM |
Yes | |
AemMetadataKey.START_TIME |
Yes | default to propagation start time (for forward propagation) |
AemMetadataKey.USEABLE_START_TIME |
No | |
AemMetadataKey.USEABLE_STOP_TIME |
No | |
AemMetadataKey.STOP_TIME |
Yes | default to propagation target time (for forward propagation) |
AemMetadataKey.ATTITUDE_TYPE |
Yes | QUATERNION/RATE |
AemMetadataKey.QUATERNION_TYPE |
No | FIRST |
AemMetadataKey.EULER_ROT_SEQ |
No | |
AemMetadataKey.RATE_FRAME |
No | REF_FRAME_B |
AemMetadataKey.INTERPOLATION_METHOD |
No | |
AemMetadataKey.INTERPOLATION_DEGREE |
No | always set in AemMetadata |
The MetadataKey.TIME_SYSTEM
must be constant for the whole file and is used
to interpret all dates except HeaderKey.CREATION_DATE
which is always in UTC
. The guessing algorithm is not guaranteed to work so it is recommended
to provide values for AdmMetadataKey.CENTER_NAME
and MetadataKey.TIME_SYSTEM
to avoid any bugs associated with incorrect guesses.
Standardized values for MetadataKey.TIME_SYSTEM
are GMST, GPS, MET, MRT, SCLK,
TAI, TCB, TDB, TT, UT1, and UTC. Standardized values for reference frames
are EME2000, GTOD, ICRF, ITRF2000, ITRF-93, ITRF-97, LVLH, RTN, QSW, TOD, TNW, NTW and RSW.
Additionally ITRF followed by a four digit year may be used.
Modifier and Type | Field and Description |
---|---|
static double |
CCSDS_AEM_VERS
Version number implemented.
|
static int |
KVN_PADDING_WIDTH
Padding width for aligning the '=' sign.
|
DEFAULT_ORIGINATOR
Constructor and Description |
---|
AemWriter(IERSConventions conventions,
DataContext dataContext,
AbsoluteDate missionReferenceDate)
Constructor used to create a new AEM writer configured with the necessary parameters
to successfully fill in all required fields that aren't part of a standard object.
|
Modifier and Type | Method and Description |
---|---|
void |
writeSegmentContent(Generator generator,
double formatVersion,
AemSegment segment)
Write one segment content (without XML wrapping).
|
getContext, getDefaultVersion, getTimeConverter, setContext, writeFooter, writeHeader, writeSegment
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
writeMessage
public static final double CCSDS_AEM_VERS
public static final int KVN_PADDING_WIDTH
public AemWriter(IERSConventions conventions, DataContext dataContext, AbsoluteDate missionReferenceDate)
If the mandatory header entries are not present (or if header is null), built-in defaults will be used
The writer is built from the complete header and partial metadata. The template
metadata is used to initialize and independent local copy, that will be updated
as new segments are written (with at least the segment start and stop will change,
but some other parts may change too). The template
argument itself is not
changed.
conventions
- IERS ConventionsdataContext
- used to retrieve frames, time scales, etc.missionReferenceDate
- reference date for Mission Elapsed Time or Mission Relative Time time systemspublic void writeSegmentContent(Generator generator, double formatVersion, AemSegment segment) throws IOException
writeSegmentContent
in class AbstractMessageWriter<Header,AemSegment,Aem>
generator
- generator to use for producing outputformatVersion
- format version to usesegment
- segment to writeIOException
- if any buffer writing operations failsCopyright © 2002-2022 CS GROUP. All rights reserved.