public class CPFWriter extends Object implements EphemerisFileWriter
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.
Constructor and Description |
---|
CPFWriter(CPFHeader header,
TimeScale timescale)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
<C extends TimeStampedPVCoordinates,S extends EphemerisFile.EphemerisSegment<C>> |
write(Appendable writer,
EphemerisFile<C,S> ephemerisFile)
Write the passed in
EphemerisFile using the passed in
Appendable . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
write
public <C extends TimeStampedPVCoordinates,S extends EphemerisFile.EphemerisSegment<C>> void write(Appendable writer, EphemerisFile<C,S> ephemerisFile) throws IOException
EphemerisFile
using the passed in
Appendable
.write
in interface EphemerisFileWriter
C
- type of the Cartesian coordinatesS
- type of the segmentwriter
- a configured Appendable to feed with textephemerisFile
- a populated ephemeris file to serialize into the bufferIOException
- 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.)Copyright © 2002-2021 CS GROUP. All rights reserved.