Package org.orekit.files.ccsds
Class StreamingOemWriter.Segment
- java.lang.Object
-
- org.orekit.files.ccsds.StreamingOemWriter.Segment
-
- All Implemented Interfaces:
OrekitFixedStepHandler
- Enclosing class:
- StreamingOemWriter
public class StreamingOemWriter.Segment extends Object implements OrekitFixedStepHandler
A writer for a segment of an OEM.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handleStep(SpacecraftState s, boolean isLast)
Handle the current step.void
init(SpacecraftState s0, AbsoluteDate t, double step)
Initialize step handler at the start of a propagation.void
writeEphemerisLine(TimeStampedPVCoordinates pv)
Write a single ephemeris line according to section 5.2.4.void
writeMetadata()
Write the ephemeris segment metadata.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.orekit.propagation.sampling.OrekitFixedStepHandler
init
-
-
-
-
Method Detail
-
writeMetadata
public void writeMetadata() throws IOException
Write the ephemeris segment metadata.See
StreamingOemWriter
for a description of how the metadata is set.- Throws:
IOException
- if the output stream throws one while writing.
-
writeEphemerisLine
public void writeEphemerisLine(TimeStampedPVCoordinates pv) throws IOException
Write a single ephemeris line according to section 5.2.4. This method does not write the optional acceleration terms.- Parameters:
pv
- the time, position, and velocity to write.- Throws:
IOException
- if the output stream throws one while writing.
-
init
public void init(SpacecraftState s0, AbsoluteDate t, double step)
Initialize step handler at the start of a propagation.This method is called once at the start of the propagation. It may be used by the step handler to initialize some internal data if needed.
The default implementation currently calls the deprecated
OrekitFixedStepHandler.init(SpacecraftState, AbsoluteDate)
which does nothing by default. When that method is removed the default implementation will do nothing.Sets the
Keyword.START_TIME
andKeyword.STOP_TIME
in this segment's metadata if not already set by the user. Then callswriteMetadata()
to start the segment.- Specified by:
init
in interfaceOrekitFixedStepHandler
- Parameters:
s0
- initial statet
- target time for the integrationstep
- the duration in seconds of the fixed step. This value is positive even if propagation is backwards.
-
handleStep
public void handleStep(SpacecraftState s, boolean isLast)
Description copied from interface:OrekitFixedStepHandler
Handle the current step.- Specified by:
handleStep
in interfaceOrekitFixedStepHandler
- Parameters:
s
- current state at step timeisLast
- if true, this is the last integration step
-
-