public class StreamingAemWriter extends Object
Each instance corresponds to a single AEM file.
The AEM metadata used by this writer is described in the following table. 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: Keyword.OBJECT_NAME
, and Keyword.OBJECT_ID
. 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 metadata for the whole AEM file is set in the constructor
.
Keyword | Usage | Obligatory | Default | Reference |
---|---|---|---|---|
Keyword.CCSDS_AEM_VERS
| Header | Yes | CCSDS_AEM_VERS
| Table 4-2 |
Keyword.COMMENT
| Header | No | Table 4-2 | |
Keyword.CREATION_DATE
| Header | Yes | Now
| Table 4-2 |
Keyword.ORIGINATOR
| Header | Yes | DEFAULT_ORIGINATOR
| Table 4-2 |
Keyword.OBJECT_NAME
| Segment | Yes | Table 4-3 | |
Keyword.OBJECT_ID
| Segment | Yes | Table 4-3 | |
Keyword.CENTER_NAME
| Segment | No | Table 4-3 | |
Keyword.REF_FRAME_A
| Segment | Yes | Table 4-3 | |
Keyword.REF_FRAME_B
| Segment | Yes | Table 4-3 | |
Keyword.ATTITUDE_DIR
| Segment | Yes | Table 4-3 | |
Keyword.TIME_SYSTEM
| Segment | Yes | Table 4-3, Annex A | |
Keyword.START_TIME
| Segment | Yes | Table 4-3 | |
Keyword.USEABLE_START_TIME
| Segment | No | Table 4-3 | |
Keyword.STOP_TIME
| Segment | Yes | Table 4-3 | |
Keyword.USEABLE_STOP_TIME
| Segment | No | Table 4-3 | |
Keyword.ATTITUDE_TYPE
| Segment | Yes | Table 4-3, 4-4 | |
Keyword.QUATERNION_TYPE
| Segment | No | Table 4-3, 4-4 | |
Keyword.EULER_ROT_SEQ
| Segment | No | Table 4-3 | |
Keyword.RATE_FRAME
| Segment | No | Table 4-3 | |
Keyword.INTERPOLATION_METHOD
| Segment | No | Table 4-3 | |
Keyword.INTERPOLATION_DEGREE
| Segment | No | Table 4-3 |
The Keyword.TIME_SYSTEM
must be constant for the whole file and is used
to interpret all dates except Keyword.CREATION_DATE
. The guessing algorithm
is not guaranteed to work so it is recommended to provide values for Keyword.CENTER_NAME
and Keyword.TIME_SYSTEM
to avoid any bugs associated with
incorrect guesses.
Standardized values for Keyword.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.
AEMWriter
Modifier and Type | Class and Description |
---|---|
class |
StreamingAemWriter.AEMSegment
A writer for a segment of an AEM.
|
Modifier and Type | Field and Description |
---|---|
static String |
CCSDS_AEM_VERS
Version number implemented.
|
static String |
DEFAULT_ORIGINATOR
Default value for
Keyword.ORIGINATOR . |
Constructor and Description |
---|
StreamingAemWriter(Appendable writer,
TimeScale timeScale,
Map<Keyword,String> metadata)
Create an AEM writer that streams data to the given output stream.
|
Modifier and Type | Method and Description |
---|---|
StreamingAemWriter.AEMSegment |
newSegment(Map<Keyword,String> segmentMetadata)
Create a writer for a new AEM attitude ephemeris segment.
|
void |
writeHeader()
Writes the standard AEM header for the file.
|
public static final String CCSDS_AEM_VERS
public static final String DEFAULT_ORIGINATOR
Keyword.ORIGINATOR
.public StreamingAemWriter(Appendable writer, TimeScale timeScale, Map<Keyword,String> metadata)
writer
- The output stream for the AEM file. Most methods will append data
to this writer
.timeScale
- for all times in the AEM except Keyword.CREATION_DATE
. See
Section 4.2.5.4.2 and Annex A.metadata
- for the satellite.public void writeHeader() throws IOException
IOException
- if the stream cannot write to streampublic StreamingAemWriter.AEMSegment newSegment(Map<Keyword,String> segmentMetadata)
The returned writer can only write a single attitude ephemeris segment in an AEM. This method must be called to create a writer for each attitude ephemeris segment.
segmentMetadata
- the metadata to use for the segment. Overrides for this
segment any other source of meta data values. See StreamingAemWriter(java.lang.Appendable, org.orekit.time.TimeScale, java.util.Map<org.orekit.files.ccsds.Keyword, java.lang.String>)
for a description of which metadata are
required and how they are determined.Copyright © 2002-2020 CS GROUP. All rights reserved.