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 voidhandleStep(SpacecraftState s, boolean isLast)Handle the current step.voidinit(SpacecraftState s0, AbsoluteDate t, double step)Initialize step handler at the start of a propagation.voidwriteEphemerisLine(TimeStampedPVCoordinates pv)Write a single ephemeris line according to section 5.2.4.voidwriteMetadata()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 IOExceptionWrite the ephemeris segment metadata.See
StreamingOemWriterfor 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_TIMEandKeyword.STOP_TIMEin this segment's metadata if not already set by the user. Then callswriteMetadata()to start the segment.- Specified by:
initin 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:OrekitFixedStepHandlerHandle the current step.- Specified by:
handleStepin interfaceOrekitFixedStepHandler- Parameters:
s- current state at step timeisLast- if true, this is the last integration step
-
-