public class EphemerisWriter extends Object implements EphemerisFileWriter
EphemerisFileWriter
generating OEM
files.StreamingOemWriter
Constructor and Description |
---|
EphemerisWriter(OemWriter writer,
Header header,
OemMetadata template,
FileFormat fileFormat,
String outputName,
int unitsColumn)
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.
|
Modifier and Type | Method and Description |
---|---|
<C extends TimeStampedPVCoordinates,S extends EphemerisFile.EphemerisSegment<C>> |
write(Appendable appendable,
EphemerisFile<C,S> ephemerisFile)
Write the passed in
EphemerisFile using the passed in
Appendable . |
<C extends TimeStampedPVCoordinates,S extends EphemerisFile.EphemerisSegment<C>> |
writeSegment(Generator generator,
S segment)
Write one segment.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
write
public EphemerisWriter(OemWriter writer, Header header, OemMetadata template, FileFormat fileFormat, String outputName, int unitsColumn)
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.
writer
- underlying writerheader
- file header (may be null)template
- template for metadatafileFormat
- file format to useoutputName
- output name for error messagesunitsColumn
- columns number for aligning units (if negative or zero, units are not output)public <C extends TimeStampedPVCoordinates,S extends EphemerisFile.EphemerisSegment<C>> void write(Appendable appendable, EphemerisFile<C,S> ephemerisFile) throws IOException
EphemerisFile
using the passed in
Appendable
.
As EphemerisFile.SatelliteEphemeris
does not have all the entries
from OemMetadata
, the only values that will be extracted from the
ephemerisFile
will be the start time, stop time, reference frame, interpolation
method and interpolation degree. The missing values (like object name, local spacecraft
body frame...) will be inherited from the template metadata set at writer
construction
.
write
in interface EphemerisFileWriter
C
- type of the Cartesian coordinatesS
- type of the segmentappendable
- a configured Appendable to feed with textephemerisFile
- a populated ephemeris file to serialize into the bufferIOException
- if any buffer writing operations fail or if the underlying
format doesn't support a configuration in the EphemerisFile
(for example having multiple satellites in one file, having
the origin at an unspecified celestial body, etc.)public <C extends TimeStampedPVCoordinates,S extends EphemerisFile.EphemerisSegment<C>> void writeSegment(Generator generator, S segment) throws IOException
C
- type of the Cartesian coordinatesS
- type of the segmentgenerator
- generator to use for producing outputsegment
- segment to writeIOException
- if any buffer writing operations failsCopyright © 2002-2022 CS GROUP. All rights reserved.