Package org.orekit.files.ilrs
Class StreamingCpfWriter
java.lang.Object
org.orekit.files.ilrs.StreamingCpfWriter
A writer for CPF files.
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.
- Since:
- 10.3
- Author:
- Bryan Cazabonne
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWriter for specific header lines.classA writer for a segment of a CPF. -
Constructor Summary
ConstructorsConstructorDescriptionStreamingCpfWriter(Appendable writer, TimeScale timeScale, CPFHeader header) Create a CPF writer than streams data to the given output stream.StreamingCpfWriter(Appendable writer, TimeScale timeScale, CPFHeader header, boolean velocityFlag) Create a CPF writer than streams data to the given output stream. -
Method Summary
Modifier and TypeMethodDescriptionnewSegment(Frame frame) Create a writer for a new CPF ephemeris segment.voidWrite end of file.voidWrites the CPF header for the file.
-
Constructor Details
-
StreamingCpfWriter
Create a CPF writer than streams data to the given output stream.Using this constructor, velocity data are not written.
- Parameters:
writer- the output stream for the CPF file.timeScale- for all times in the CPFheader- container for header data- See Also:
-
StreamingCpfWriter
public StreamingCpfWriter(Appendable writer, TimeScale timeScale, CPFHeader header, boolean velocityFlag) Create a CPF writer than streams data to the given output stream.- Parameters:
writer- the output stream for the CPF file.timeScale- for all times in the CPFheader- container for header datavelocityFlag- true if velocity must be written- Since:
- 11.2
-
-
Method Details
-
writeHeader
Writes the CPF header for the file.- Throws:
IOException- if the stream cannot write to stream
-
writeEndOfFile
Write end of file.- Throws:
IOException- if the stream cannot write to stream
-
newSegment
Create a writer for a new CPF ephemeris segment.The returned writer can only write a single ephemeris segment in a CPF.
- Parameters:
frame- the reference frame to use for the segment.- Returns:
- a new CPF segment, ready for writing.
-