public class StreamingCpfWriter extends Object
Each instance corresponds to a single CPF file.
This class can be used as a step handler for a Propagator
.
The following example shows its use as a step handler.
Note: By default, only required header keys are wrote (H1 and H2). Furthermore, only position data can be written. Other keys (optionals) are simply ignored. Contributions are welcome to support more fields in the format.
Modifier and Type | Class and Description |
---|---|
static class |
StreamingCpfWriter.HeaderLineWriter
Writer for specific header lines.
|
class |
StreamingCpfWriter.Segment
A writer for a segment of a CPF.
|
Constructor and Description |
---|
StreamingCpfWriter(Appendable writer,
TimeScale timeScale,
CPFHeader header)
Create a CPF writer than streams data to the given output stream.
|
Modifier and Type | Method and Description |
---|---|
StreamingCpfWriter.Segment |
newSegment(Frame frame)
Create a writer for a new CPF ephemeris segment.
|
void |
writeEndOfFile()
Write end of file.
|
void |
writeHeader()
Writes the CPF header for the file.
|
public StreamingCpfWriter(Appendable writer, TimeScale timeScale, CPFHeader header)
writer
- the output stream for the CPF file.timeScale
- for all times in the CPFheader
- container for header datapublic void writeHeader() throws IOException
IOException
- if the stream cannot write to streampublic void writeEndOfFile() throws IOException
IOException
- if the stream cannot write to streampublic StreamingCpfWriter.Segment newSegment(Frame frame)
The returned writer can only write a single ephemeris segment in a CPF.
frame
- the reference frame to use for the segment.Copyright © 2002-2021 CS GROUP. All rights reserved.