Class OemWriter
- java.lang.Object
-
- org.orekit.files.ccsds.utils.generation.AbstractMessageWriter<OdmHeader,OemSegment,Oem>
-
- org.orekit.files.ccsds.ndm.odm.oem.OemWriter
-
- All Implemented Interfaces:
MessageWriter<OdmHeader,OemSegment,Oem>
public class OemWriter extends AbstractMessageWriter<OdmHeader,OemSegment,Oem>
A writer for Orbit Ephemeris Message (OEM) files.Metadata
The OEM 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:
OdmMetadataKey.OBJECT_NAME, andCommonMetadataKey.OBJECT_ID. The usage column in the table indicates where the metadata item is used, either in the OEM header or in the metadata section at the start of an OEM ephemeris segment.OEM metadata Keyword Usage Obligatory Default Reference CCSDS_OEM_VERSHeader Yes Oem.FORMAT_VERSION_KEYTable 5-2 COMMENTHeader No Table 5-2 HeaderKey.CREATION_DATEHeader Yes NowTable 5.2, 6.5.9 HeaderKey.ORIGINATORHeader Yes AbstractMessageWriter.DEFAULT_ORIGINATORTable 5-2 OdmMetadataKey.OBJECT_NAMESegment Yes Table 5-3 CommonMetadataKey.OBJECT_IDSegment Yes Table 5-3 CommonMetadataKey.CENTER_NAMESegment Yes Table 5-3 CommonMetadataKey.REF_FRAMESegment Yes Table 5-3, Annex A CommonMetadataKey.REF_FRAME_EPOCHSegment No Table 5-3, 6.5.9 MetadataKey.TIME_SYSTEMSegment Yes OemMetadataKey.START_TIMESegment Yes Table 5-3, 6.5.9 OemMetadataKey.USEABLE_START_TIMESegment No Table 5-3, 6.5.9 OemMetadataKey.STOP_TIMESegment Yes Table 5-3, 6.5.9 OemMetadataKey.USEABLE_STOP_TIMESegment No Table 5-3, 6.5.9 OemMetadataKey.INTERPOLATIONSegment No Table 5-3 OemMetadataKey.INTERPOLATION_DEGREESegment No Table 5-3 The
MetadataKey.TIME_SYSTEMmust be constant for the whole file and is used to interpret all dates exceptHeaderKey.CREATION_DATEwhich is always inUTC. The guessing algorithm is not guaranteed to work so it is recommended to provide values forCommonMetadataKey.CENTER_NAMEandMetadataKey.TIME_SYSTEMto avoid any bugs associated with incorrect guesses.Standardized values for
MetadataKey.TIME_SYSTEMare 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.- Since:
- 9.0
- Author:
- Hank Grabowski, Evan Ward
- See Also:
- CCSDS 502.0-B-2 Orbit Data
Messages,
CCSDS 500.0-G-4 Navigation
Data Definitions and Conventions,
StreamingOemWriter
-
-
Field Summary
Fields Modifier and Type Field Description static doubleCCSDS_OEM_VERSVersion number implemented.static StringDEFAULT_FILE_NAMEDefault file name for error messages.static intKVN_PADDING_WIDTHPadding width for aligning the '=' sign.-
Fields inherited from class org.orekit.files.ccsds.utils.generation.AbstractMessageWriter
DEFAULT_ORIGINATOR
-
-
Constructor Summary
Constructors Constructor Description OemWriter(IERSConventions conventions, DataContext dataContext, AbsoluteDate missionReferenceDate)Constructor used to create a new OEM writer configured with the necessary parameters to successfully fill in all required fields that aren't part of a standard object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidwriteSegmentContent(Generator generator, double formatVersion, OemSegment segment)Write one segment content (without XML wrapping).-
Methods inherited from class org.orekit.files.ccsds.utils.generation.AbstractMessageWriter
getContext, getDefaultVersion, getFormatVersionKey, getRoot, getTimeConverter, getVersion, setContext, writeFooter, writeHeader, writeSegment
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.orekit.files.ccsds.utils.generation.MessageWriter
writeMessage
-
-
-
-
Field Detail
-
CCSDS_OEM_VERS
public static final double CCSDS_OEM_VERS
Version number implemented.- See Also:
- Constant Field Values
-
DEFAULT_FILE_NAME
public static final String DEFAULT_FILE_NAME
Default file name for error messages.- See Also:
- Constant Field Values
-
KVN_PADDING_WIDTH
public static final int KVN_PADDING_WIDTH
Padding width for aligning the '=' sign.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OemWriter
public OemWriter(IERSConventions conventions, DataContext dataContext, AbsoluteDate missionReferenceDate)
Constructor used to create a new OEM writer configured with the necessary parameters to successfully fill in all required fields that aren't part of a standard object.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
templateargument itself is not changed.Calling this constructor directly is not recommended. Users should rather use
writerBuilder.buildOemWriter().- Parameters:
conventions- IERS ConventionsdataContext- used to retrieve frames, time scales, etc.missionReferenceDate- reference date for Mission Elapsed Time or Mission Relative Time time systems- Since:
- 11.0
- See Also:
DEFAULT_FILE_NAME
-
-
Method Detail
-
writeSegmentContent
protected void writeSegmentContent(Generator generator, double formatVersion, OemSegment segment) throws IOException
Write one segment content (without XML wrapping).- Specified by:
writeSegmentContentin classAbstractMessageWriter<OdmHeader,OemSegment,Oem>- Parameters:
generator- generator to use for producing outputformatVersion- format version to usesegment- segment to write- Throws:
IOException- if any buffer writing operations fails
-
-