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
  • Constructor Details

    • 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 CPF
      header - 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 CPF
      header - container for header data
      velocityFlag - true if velocity must be written
      Since:
      11.2
  • Method Details

    • 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.