Package org.orekit.files.ilrs
Class CPFWriter
- java.lang.Object
-
- org.orekit.files.ilrs.CPFWriter
-
- All Implemented Interfaces:
EphemerisFileWriter
public class CPFWriter extends Object implements EphemerisFileWriter
An CPF Writer class that can take in a generalEphemerisFile
object and export it as a valid CPF file.It supports both 1.0 and 2.0 versions
Note: By default, only required header keys are wrote (H1 and H2). Furthermore, only position data can be written. Other keys (i.e. in header and other types of ephemeris entries) are simply ignored. Contributions are welcome to support more fields in the format.
- Since:
- 10.3
- Author:
- Bryan Cazabonne
- See Also:
- 1.0 file format, 2.0 file format
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <C extends TimeStampedPVCoordinates,S extends EphemerisFile.EphemerisSegment<C>>
voidwrite(Appendable writer, EphemerisFile<C,S> ephemerisFile)
Write the passed inEphemerisFile
using the passed inAppendable
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.orekit.files.general.EphemerisFileWriter
write
-
-
-
-
Constructor Detail
-
CPFWriter
public CPFWriter(CPFHeader header, TimeScale timescale)
Constructor.Using this constructor, velocity data are not written.
- Parameters:
header
- container for header datatimescale
- time scale for dates- See Also:
CPFWriter(CPFHeader, TimeScale, boolean)
-
-
Method Detail
-
write
public <C extends TimeStampedPVCoordinates,S extends EphemerisFile.EphemerisSegment<C>> void write(Appendable writer, EphemerisFile<C,S> ephemerisFile) throws IOException
Write the passed inEphemerisFile
using the passed inAppendable
.- Specified by:
write
in interfaceEphemerisFileWriter
- Type Parameters:
C
- type of the Cartesian coordinatesS
- type of the segment- Parameters:
writer
- a configured Appendable to feed with textephemerisFile
- a populated ephemeris file to serialize into the buffer- Throws:
IOException
- if any buffer writing operations fail or if the underlying format doesn't support a configuration in the EphemerisFile (for example having multiple satellites in one file, having the origin at an unspecified celestial body, etc.)
-
-