public class StreamingOemWriter extends Object implements AutoCloseable
Each instance corresponds to a single OEM file. A new OEM ephemeris segment is
started by calling newSegment()
.
This class can be used as a step handler for a Propagator
.
Propagator propagator = ...; // pre-configured propagator
OEMWriter aemWriter = ...; // pre-configured writer
try (Generator out = ...; // set-up output stream
StreamingOemWriter sw = new StreamingOemWriter(out, oemWriter)) { // set-up streaming writer
// write segment 1
propagator.getMultiplexer().add(step, sw.newSegment());
propagator.propagate(startDate1, stopDate1);
...
// write segment n
propagator.getMultiplexer().clear();
propagator.getMultiplexer().add(step, sw.newSegment());
propagator.propagate(startDateN, stopDateN);
}
OemWriter
Modifier and Type | Class and Description |
---|---|
class |
StreamingOemWriter.SegmentWriter
A writer for a segment of an OEM.
|
Constructor and Description |
---|
StreamingOemWriter(Generator generator,
OemWriter writer,
Header header,
OemMetadata template)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
StreamingOemWriter.SegmentWriter |
newSegment()
Create a writer for a new OEM ephemeris segment.
|
public StreamingOemWriter(Generator generator, OemWriter writer, Header header, OemMetadata template)
generator
- generator for OEM outputwriter
- writer for the AEM message formatheader
- file header (may be null)template
- template for metadatapublic StreamingOemWriter.SegmentWriter newSegment()
The returned writer can only write a single ephemeris segment in an OEM. This method must be called to create a writer for each ephemeris segment.
public void close() throws IOException
close
in interface AutoCloseable
IOException
Copyright © 2002-2022 CS GROUP. All rights reserved.