Class TimeStampedPVCoordinates
- java.lang.Object
-
- org.orekit.utils.PVCoordinates
-
- org.orekit.utils.TimeStampedPVCoordinates
-
- All Implemented Interfaces:
Serializable
,TimeShiftable<PVCoordinates>
,TimeStamped
- Direct Known Subclasses:
SP3File.SP3Coordinate
public class TimeStampedPVCoordinates extends PVCoordinates implements TimeStamped
- Since:
- 7.0
- Author:
- Luc Maisonobe
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.orekit.utils.PVCoordinates
ZERO
-
-
Constructor Summary
Constructors Constructor Description TimeStampedPVCoordinates(AbsoluteDate date, double a, PVCoordinates pv)
Multiplicative constructorTimeStampedPVCoordinates(AbsoluteDate date, double a1, PVCoordinates pv1, double a2, PVCoordinates pv2)
Linear constructorTimeStampedPVCoordinates(AbsoluteDate date, double a1, PVCoordinates pv1, double a2, PVCoordinates pv2, double a3, PVCoordinates pv3)
Linear constructorTimeStampedPVCoordinates(AbsoluteDate date, double a1, PVCoordinates pv1, double a2, PVCoordinates pv2, double a3, PVCoordinates pv3, double a4, PVCoordinates pv4)
Linear constructorTimeStampedPVCoordinates(AbsoluteDate date, org.hipparchus.geometry.euclidean.threed.FieldVector3D<org.hipparchus.analysis.differentiation.DerivativeStructure> p)
Builds a TimeStampedPVCoordinates triplet from aFieldVector3D
<DerivativeStructure
>.TimeStampedPVCoordinates(AbsoluteDate date, org.hipparchus.geometry.euclidean.threed.Vector3D position, org.hipparchus.geometry.euclidean.threed.Vector3D velocity)
Build from position and velocity.TimeStampedPVCoordinates(AbsoluteDate date, org.hipparchus.geometry.euclidean.threed.Vector3D position, org.hipparchus.geometry.euclidean.threed.Vector3D velocity, org.hipparchus.geometry.euclidean.threed.Vector3D acceleration)
Builds a TimeStampedPVCoordinates pair.TimeStampedPVCoordinates(AbsoluteDate date, PVCoordinates pv)
Build from position velocity acceleration coordinates.TimeStampedPVCoordinates(AbsoluteDate date, PVCoordinates start, PVCoordinates end)
Subtractive constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AbsoluteDate
getDate()
Get the date.static TimeStampedPVCoordinates
interpolate(AbsoluteDate date, CartesianDerivativesFilter filter, Collection<TimeStampedPVCoordinates> sample)
Interpolate position-velocity.static TimeStampedPVCoordinates
interpolate(AbsoluteDate date, CartesianDerivativesFilter filter, Stream<TimeStampedPVCoordinates> sample)
Interpolate position-velocity.TimeStampedPVCoordinates
shiftedBy(double dt)
Get a time-shifted state.String
toString()
Return a string representation of this position/velocity pair.PVCoordinatesProvider
toTaylorProvider(Frame instanceFrame)
Create a local provider using simply Taylor expansion throughshiftedBy(double)
.-
Methods inherited from class org.orekit.utils.PVCoordinates
crossProduct, estimateVelocity, getAcceleration, getAngularVelocity, getMomentum, getPosition, getVelocity, negate, normalize, toDerivativeStructurePV, toDerivativeStructureVector
-
-
-
-
Constructor Detail
-
TimeStampedPVCoordinates
public TimeStampedPVCoordinates(AbsoluteDate date, org.hipparchus.geometry.euclidean.threed.Vector3D position, org.hipparchus.geometry.euclidean.threed.Vector3D velocity, org.hipparchus.geometry.euclidean.threed.Vector3D acceleration)
Builds a TimeStampedPVCoordinates pair.- Parameters:
date
- coordinates dateposition
- the position vector (m)velocity
- the velocity vector (m/s)acceleration
- the acceleration vector (m/s²)
-
TimeStampedPVCoordinates
public TimeStampedPVCoordinates(AbsoluteDate date, org.hipparchus.geometry.euclidean.threed.Vector3D position, org.hipparchus.geometry.euclidean.threed.Vector3D velocity)
Build from position and velocity. Acceleration is set to zero.- Parameters:
date
- coordinates dateposition
- the position vector (m)velocity
- the velocity vector (m/s)
-
TimeStampedPVCoordinates
public TimeStampedPVCoordinates(AbsoluteDate date, PVCoordinates pv)
Build from position velocity acceleration coordinates.- Parameters:
date
- coordinates datepv
- position velocity, and acceleration coordinates, in meters and seconds.
-
TimeStampedPVCoordinates
public TimeStampedPVCoordinates(AbsoluteDate date, double a, PVCoordinates pv)
Multiplicative constructorBuild a TimeStampedPVCoordinates from another one and a scale factor.
The TimeStampedPVCoordinates built will be a * pv
- Parameters:
date
- date of the built coordinatesa
- scale factorpv
- base (unscaled) PVCoordinates
-
TimeStampedPVCoordinates
public TimeStampedPVCoordinates(AbsoluteDate date, PVCoordinates start, PVCoordinates end)
Subtractive constructorBuild a relative TimeStampedPVCoordinates from a start and an end position.
The TimeStampedPVCoordinates built will be end - start.
- Parameters:
date
- date of the built coordinatesstart
- Starting PVCoordinatesend
- ending PVCoordinates
-
TimeStampedPVCoordinates
public TimeStampedPVCoordinates(AbsoluteDate date, double a1, PVCoordinates pv1, double a2, PVCoordinates pv2)
Linear constructorBuild a TimeStampedPVCoordinates from two other ones and corresponding scale factors.
The TimeStampedPVCoordinates built will be a1 * u1 + a2 * u2
- Parameters:
date
- date of the built coordinatesa1
- first scale factorpv1
- first base (unscaled) PVCoordinatesa2
- second scale factorpv2
- second base (unscaled) PVCoordinates
-
TimeStampedPVCoordinates
public TimeStampedPVCoordinates(AbsoluteDate date, double a1, PVCoordinates pv1, double a2, PVCoordinates pv2, double a3, PVCoordinates pv3)
Linear constructorBuild a TimeStampedPVCoordinates from three other ones and corresponding scale factors.
The TimeStampedPVCoordinates built will be a1 * u1 + a2 * u2 + a3 * u3
- Parameters:
date
- date of the built coordinatesa1
- first scale factorpv1
- first base (unscaled) PVCoordinatesa2
- second scale factorpv2
- second base (unscaled) PVCoordinatesa3
- third scale factorpv3
- third base (unscaled) PVCoordinates
-
TimeStampedPVCoordinates
public TimeStampedPVCoordinates(AbsoluteDate date, double a1, PVCoordinates pv1, double a2, PVCoordinates pv2, double a3, PVCoordinates pv3, double a4, PVCoordinates pv4)
Linear constructorBuild a TimeStampedPVCoordinates from four other ones and corresponding scale factors.
The TimeStampedPVCoordinates built will be a1 * u1 + a2 * u2 + a3 * u3 + a4 * u4
- Parameters:
date
- date of the built coordinatesa1
- first scale factorpv1
- first base (unscaled) PVCoordinatesa2
- second scale factorpv2
- second base (unscaled) PVCoordinatesa3
- third scale factorpv3
- third base (unscaled) PVCoordinatesa4
- fourth scale factorpv4
- fourth base (unscaled) PVCoordinates
-
TimeStampedPVCoordinates
public TimeStampedPVCoordinates(AbsoluteDate date, org.hipparchus.geometry.euclidean.threed.FieldVector3D<org.hipparchus.analysis.differentiation.DerivativeStructure> p)
Builds a TimeStampedPVCoordinates triplet from aFieldVector3D
<DerivativeStructure
>.The vector components must have time as their only derivation parameter and have consistent derivation orders.
- Parameters:
date
- date of the built coordinatesp
- vector with time-derivatives embedded within the coordinates
-
-
Method Detail
-
getDate
public AbsoluteDate getDate()
Get the date.- Specified by:
getDate
in interfaceTimeStamped
- Returns:
- date attached to the object
-
shiftedBy
public TimeStampedPVCoordinates shiftedBy(double dt)
Get a time-shifted state.The state can be slightly shifted to close dates. This shift is based on a simple Taylor expansion. It is not intended as a replacement for proper orbit propagation (it is not even Keplerian!) but should be sufficient for either small time shifts or coarse accuracy.
- Specified by:
shiftedBy
in interfaceTimeShiftable<PVCoordinates>
- Overrides:
shiftedBy
in classPVCoordinates
- Parameters:
dt
- time shift in seconds- Returns:
- a new state, shifted with respect to the instance (which is immutable)
-
toTaylorProvider
public PVCoordinatesProvider toTaylorProvider(Frame instanceFrame)
Create a local provider using simply Taylor expansion throughshiftedBy(double)
.The time evolution is based on a simple Taylor expansion. It is not intended as a replacement for proper orbit propagation (it is not even Keplerian!) but should be sufficient for either small time shifts or coarse accuracy.
- Parameters:
instanceFrame
- frame in which the instance is defined- Returns:
- provider based on Taylor expansion, for small time shifts around instance date
-
interpolate
public static TimeStampedPVCoordinates interpolate(AbsoluteDate date, CartesianDerivativesFilter filter, Collection<TimeStampedPVCoordinates> sample)
Interpolate position-velocity.The interpolated instance is created by polynomial Hermite interpolation ensuring velocity remains the exact derivative of position.
Note that even if first time derivatives (velocities) from sample can be ignored, the interpolated instance always includes interpolated derivatives. This feature can be used explicitly to compute these derivatives when it would be too complex to compute them from an analytical formula: just compute a few sample points from the explicit formula and set the derivatives to zero in these sample points, then use interpolation to add derivatives consistent with the positions.
- Parameters:
date
- interpolation datefilter
- filter for derivatives from the sample to use in interpolationsample
- sample points on which interpolation should be done- Returns:
- a new position-velocity, interpolated at specified date
-
interpolate
public static TimeStampedPVCoordinates interpolate(AbsoluteDate date, CartesianDerivativesFilter filter, Stream<TimeStampedPVCoordinates> sample)
Interpolate position-velocity.The interpolated instance is created by polynomial Hermite interpolation ensuring velocity remains the exact derivative of position.
Note that even if first time derivatives (velocities) from sample can be ignored, the interpolated instance always includes interpolated derivatives. This feature can be used explicitly to compute these derivatives when it would be too complex to compute them from an analytical formula: just compute a few sample points from the explicit formula and set the derivatives to zero in these sample points, then use interpolation to add derivatives consistent with the positions.
- Parameters:
date
- interpolation datefilter
- filter for derivatives from the sample to use in interpolationsample
- sample points on which interpolation should be done- Returns:
- a new position-velocity, interpolated at specified date
- Since:
- 9.0
-
toString
public String toString()
Return a string representation of this position/velocity pair.- Overrides:
toString
in classPVCoordinates
- Returns:
- string representation of this position/velocity pair
-
-