Package org.orekit.files.ilrs
Class StreamingCpfWriter
- java.lang.Object
-
- org.orekit.files.ilrs.StreamingCpfWriter
-
public class StreamingCpfWriter extends Object
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 Classes Modifier and Type Class Description static class
StreamingCpfWriter.HeaderLineWriter
Writer for specific header lines.class
StreamingCpfWriter.Segment
A writer for a segment of a CPF.
-
Constructor Summary
Constructors Constructor Description StreamingCpfWriter(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
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
StreamingCpfWriter
public StreamingCpfWriter(Appendable writer, TimeScale timeScale, CPFHeader header)
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(Appendable, TimeScale, CPFHeader, boolean)
-
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 Detail
-
writeHeader
public void writeHeader() throws IOException
Writes the CPF header for the file.- Throws:
IOException
- if the stream cannot write to stream
-
writeEndOfFile
public void writeEndOfFile() throws IOException
Write end of file.- Throws:
IOException
- if the stream cannot write to stream
-
newSegment
public StreamingCpfWriter.Segment newSegment(Frame frame)
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.
-
-