Package org.orekit.files.ilrs
Class CPFWriter
java.lang.Object
org.orekit.files.ilrs.CPFWriter
- All Implemented Interfaces:
EphemerisFileWriter
An CPF Writer class that can take in a general
EphemerisFile 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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<C extends TimeStampedPVCoordinates,S extends EphemerisFile.EphemerisSegment<C>>
voidwrite(Appendable writer, EphemerisFile<C, S> ephemerisFile) Write the passed inEphemerisFileusing the passed inAppendable.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.orekit.files.general.EphemerisFileWriter
write
-
Constructor Details
-
CPFWriter
Constructor.Using this constructor, velocity data are not written.
- Parameters:
header- container for header datatimescale- time scale for dates- See Also:
-
CPFWriter
Constructor.- Parameters:
header- container for header datatimescale- time scale for datesvelocityFlag- true if velocity must be written- Since:
- 11.2
-
-
Method Details
-
write
public <C extends TimeStampedPVCoordinates,S extends EphemerisFile.EphemerisSegment<C>> void write(Appendable writer, EphemerisFile<C, S> ephemerisFile) throws IOExceptionWrite the passed inEphemerisFileusing the passed inAppendable.- Specified by:
writein 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.)
-