Class SP3Segment
- java.lang.Object
-
- org.orekit.files.sp3.SP3Segment
-
- All Implemented Interfaces:
EphemerisFile.EphemerisSegment<SP3Coordinate>
public class SP3Segment extends Object implements EphemerisFile.EphemerisSegment<SP3Coordinate>
One segment of anSP3Ephemeris
.- Since:
- 12.0
- Author:
- Thomas Neidhart, Evan Ward, Luc Maisonobe
-
-
Constructor Summary
Constructors Constructor Description SP3Segment(double mu, Frame frame, int interpolationSamples, CartesianDerivativesFilter filter)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCoordinate(SP3Coordinate coord)
Adds a new P/V coordinate.ClockModel
extractClockModel()
Extract the clock model.CartesianDerivativesFilter
getAvailableDerivatives()
Get which derivatives of position are available in this ephemeris segment.List<SP3Coordinate>
getCoordinates()
Get the coordinates for this ephemeris segment inEphemerisFile.EphemerisSegment.getFrame()
.Frame
getFrame()
Get the reference frame for this ephemeris segment.int
getInterpolationSamples()
Get the number of samples to use in interpolation.double
getMu()
Get the standard gravitational parameter for the satellite.BoundedPropagator
getPropagator()
View this ephemeris segment as a propagator.BoundedPropagator
getPropagator(AttitudeProvider attitudeProvider)
View this ephemeris segment as a propagator.AbsoluteDate
getStart()
Get the start date of this ephemeris segment.AbsoluteDate
getStop()
Get the end date of this ephemeris segment.-
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.EphemerisFile.EphemerisSegment
getInertialFrame
-
-
-
-
Constructor Detail
-
SP3Segment
public SP3Segment(double mu, Frame frame, int interpolationSamples, CartesianDerivativesFilter filter)
Simple constructor.- Parameters:
mu
- standard gravitational parameter to use for creatingOrbits
from the ephemeris data.frame
- reference frameinterpolationSamples
- number of points to use for interpolationfilter
- available derivatives
-
-
Method Detail
-
extractClockModel
public ClockModel extractClockModel()
Extract the clock model.- Returns:
- extracted clock model
- Since:
- 12.1
-
getMu
public double getMu()
Get the standard gravitational parameter for the satellite.- Specified by:
getMu
in interfaceEphemerisFile.EphemerisSegment<SP3Coordinate>
- Returns:
- the gravitational parameter used in
EphemerisFile.EphemerisSegment.getPropagator(AttitudeProvider)
, in m³/s².
-
getStart
public AbsoluteDate getStart()
Get the start date of this ephemeris segment.The date returned by this method is equivalent to
getPropagator().getMinDate()
.- Specified by:
getStart
in interfaceEphemerisFile.EphemerisSegment<SP3Coordinate>
- Returns:
- ephemeris segment start date.
-
getStop
public AbsoluteDate getStop()
Get the end date of this ephemeris segment.The date returned by this method is equivalent to
getPropagator().getMaxDate()
.- Specified by:
getStop
in interfaceEphemerisFile.EphemerisSegment<SP3Coordinate>
- Returns:
- ephemeris segment end date.
-
getFrame
public Frame getFrame()
Get the reference frame for this ephemeris segment. The defining frame forEphemerisFile.EphemerisSegment.getCoordinates()
.- Specified by:
getFrame
in interfaceEphemerisFile.EphemerisSegment<SP3Coordinate>
- Returns:
- the reference frame for this segment. Never
null
.
-
getInterpolationSamples
public int getInterpolationSamples()
Get the number of samples to use in interpolation.- Specified by:
getInterpolationSamples
in interfaceEphemerisFile.EphemerisSegment<SP3Coordinate>
- Returns:
- the number of points to use for interpolation.
-
getAvailableDerivatives
public CartesianDerivativesFilter getAvailableDerivatives()
Get which derivatives of position are available in this ephemeris segment.While
EphemerisFile.EphemerisSegment.getCoordinates()
always returns position, velocity, and acceleration the return value from this method indicates which of those are in the ephemeris file and are actually valid.- Specified by:
getAvailableDerivatives
in interfaceEphemerisFile.EphemerisSegment<SP3Coordinate>
- Returns:
- a value indicating if the file contains velocity and/or acceleration data.
-
getCoordinates
public List<SP3Coordinate> getCoordinates()
Get the coordinates for this ephemeris segment inEphemerisFile.EphemerisSegment.getFrame()
.- Specified by:
getCoordinates
in interfaceEphemerisFile.EphemerisSegment<SP3Coordinate>
- Returns:
- a list of state vectors in chronological order. The coordinates are not
necessarily evenly spaced in time. The value of
EphemerisFile.EphemerisSegment.getAvailableDerivatives()
indicates if the velocity or accelerations were specified in the file. Any position, velocity, or acceleration coordinates that are not specified in the ephemeris file are zero in the returned values.
-
addCoordinate
public void addCoordinate(SP3Coordinate coord)
Adds a new P/V coordinate.- Parameters:
coord
- the P/V coordinate of the satellite
-
getPropagator
public BoundedPropagator getPropagator()
View this ephemeris segment as a propagator.In order to view the ephemeris for this satellite as a
Propagator
several conditions must be met. An OrekitFrame
must be constructable from the frame specification in the ephemeris file. This condition is met whenEphemerisFile.EphemerisSegment.getFrame()
return normally. Additionally,EphemerisFile.EphemerisSegment.getMu()
must return a valid value. If these conditions are not met anOrekitException
may be thrown by this method or by one of the methods of the returnedPropagator
.The
attitude provider
used is aFrameAlignedProvider
aligned with theinertial frame
Each call to this method creates a new propagator.
- Specified by:
getPropagator
in interfaceEphemerisFile.EphemerisSegment<SP3Coordinate>
- Returns:
- a propagator for this ephemeris segment.
-
getPropagator
public BoundedPropagator getPropagator(AttitudeProvider attitudeProvider)
View this ephemeris segment as a propagator.In order to view the ephemeris for this satellite as a
Propagator
several conditions must be met. An OrekitFrame
must be constructable from the frame specification in the ephemeris file. This condition is met whenEphemerisFile.EphemerisSegment.getFrame()
return normally. Additionally,EphemerisFile.EphemerisSegment.getMu()
must return a valid value. If these conditions are not met anOrekitException
may be thrown by this method or by one of the methods of the returnedPropagator
.Each call to this method creates a new propagator.
- Specified by:
getPropagator
in interfaceEphemerisFile.EphemerisSegment<SP3Coordinate>
- Parameters:
attitudeProvider
- provider for attitude computation- Returns:
- a propagator for this ephemeris segment.
-
-