public class StreamingAemWriter extends Object implements AutoCloseable
Each instance corresponds to a single AEM file.
This class can be used as a step handler for a Propagator
.
Propagator propagator = ...; // pre-configured propagator
AEMWriter aemWriter = ...; // pre-configured writer
try (Generator out = ...; // set-up output stream
StreamingAemWriter sw = new StreamingAemWriter(out, aemWriter)) { // 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);
}
AemWriter
Modifier and Type | Class and Description |
---|---|
class |
StreamingAemWriter.SegmentWriter
A writer for a segment of an AEM.
|
Constructor and Description |
---|
StreamingAemWriter(Generator generator,
AemWriter writer,
Header header,
AemMetadata template)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
StreamingAemWriter.SegmentWriter |
newSegment()
Create a writer for a new AEM attitude ephemeris segment.
|
public StreamingAemWriter(Generator generator, AemWriter writer, Header header, AemMetadata template)
generator
- generator for AEM outputwriter
- writer for the AEM message formatheader
- file header (may be null)template
- template for metadatapublic StreamingAemWriter.SegmentWriter newSegment()
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.
public void close() throws IOException
close
in interface AutoCloseable
IOException
Copyright © 2002-2022 CS GROUP. All rights reserved.