T
- the type of the field elementspublic class FieldPVCoordinates<T extends RealFieldElement<T>> extends Object implements TimeShiftable<FieldPVCoordinates<T>>, Serializable
RealFieldElement
.
The state can be slightly shifted to close dates. This shift is based on a simple linear model. 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.
This class is the angular counterpart to FieldAngularCoordinates
.
Instances of this class are guaranteed to be immutable.
PVCoordinates
,
Serialized FormConstructor and Description |
---|
FieldPVCoordinates(double a,
FieldPVCoordinates<T> pv)
Multiplicative constructor
|
FieldPVCoordinates(double a1,
FieldPVCoordinates<T> pv1,
double a2,
FieldPVCoordinates<T> pv2)
Linear constructor
|
FieldPVCoordinates(double a1,
FieldPVCoordinates<T> pv1,
double a2,
FieldPVCoordinates<T> pv2,
double a3,
FieldPVCoordinates<T> pv3)
Linear constructor
|
FieldPVCoordinates(double a1,
FieldPVCoordinates<T> pv1,
double a2,
FieldPVCoordinates<T> pv2,
double a3,
FieldPVCoordinates<T> pv3,
double a4,
FieldPVCoordinates<T> pv4)
Linear constructor
|
FieldPVCoordinates(FieldPVCoordinates<T> start,
FieldPVCoordinates<T> end)
Subtractive constructor
|
FieldPVCoordinates(FieldVector3D<T> position,
FieldVector3D<T> velocity)
Builds a PVCoordinates triplet with zero acceleration.
|
FieldPVCoordinates(FieldVector3D<T> position,
FieldVector3D<T> velocity,
FieldVector3D<T> acceleration)
Builds a PVCoordinates triplet.
|
FieldPVCoordinates(T a,
FieldPVCoordinates<T> pv)
Multiplicative constructor
|
FieldPVCoordinates(T a1,
FieldPVCoordinates<T> pv1,
T a2,
FieldPVCoordinates<T> pv2)
Linear constructor
|
FieldPVCoordinates(T a1,
FieldPVCoordinates<T> pv1,
T a2,
FieldPVCoordinates<T> pv2,
T a3,
FieldPVCoordinates<T> pv3)
Linear constructor
|
FieldPVCoordinates(T a1,
FieldPVCoordinates<T> pv1,
T a2,
FieldPVCoordinates<T> pv2,
T a3,
FieldPVCoordinates<T> pv3,
T a4,
FieldPVCoordinates<T> pv4)
Linear constructor
|
FieldPVCoordinates(T a,
PVCoordinates pv)
Multiplicative constructor
|
FieldPVCoordinates(T a1,
PVCoordinates pv1,
T a2,
PVCoordinates pv2)
Linear constructor
|
FieldPVCoordinates(T a1,
PVCoordinates pv1,
T a2,
PVCoordinates pv2,
T a3,
PVCoordinates pv3)
Linear constructor
|
FieldPVCoordinates(T a1,
PVCoordinates pv1,
T a2,
PVCoordinates pv2,
T a3,
PVCoordinates pv3,
T a4,
PVCoordinates pv4)
Linear constructor
|
Modifier and Type | Method and Description |
---|---|
static <T extends RealFieldElement<T>> |
estimateVelocity(FieldVector3D<T> start,
FieldVector3D<T> end,
double dt)
Estimate velocity between two positions.
|
FieldVector3D<T> |
getAcceleration()
Gets the acceleration.
|
FieldVector3D<T> |
getAngularVelocity()
Get the angular velocity (spin) of this point as seen from the origin.
|
FieldVector3D<T> |
getMomentum()
Gets the momentum.
|
FieldVector3D<T> |
getPosition()
Gets the position.
|
FieldVector3D<T> |
getVelocity()
Gets the velocity.
|
static <T extends RealFieldElement<T>> |
interpolate(AbsoluteDate date,
boolean useVelocities,
Collection<Pair<AbsoluteDate,FieldPVCoordinates<T>>> sample)
Deprecated.
as of 7.0, replaced with
TimeStampedFieldPVCoordinates.interpolate(AbsoluteDate, CartesianDerivativesFilter, Collection) |
FieldPVCoordinates<T> |
negate()
Get the opposite of the instance.
|
FieldPVCoordinates<T> |
normalize()
Normalize the position part of the instance.
|
FieldPVCoordinates<T> |
shiftedBy(double dt)
Get a time-shifted state.
|
PVCoordinates |
toPVCoordinates()
Convert to a constant position-velocity without derivatives.
|
String |
toString()
Return a string representation of this position/velocity pair.
|
public FieldPVCoordinates(FieldVector3D<T> position, FieldVector3D<T> velocity)
position
- the position vector (m)velocity
- the velocity vector (m/s)public FieldPVCoordinates(FieldVector3D<T> position, FieldVector3D<T> velocity, FieldVector3D<T> acceleration)
position
- the position vector (m)velocity
- the velocity vector (m/s)acceleration
- the acceleration vector (m/s²)public FieldPVCoordinates(double a, FieldPVCoordinates<T> pv)
Build a PVCoordinates from another one and a scale factor.
The PVCoordinates built will be a * pv
a
- scale factorpv
- base (unscaled) PVCoordinatespublic FieldPVCoordinates(T a, FieldPVCoordinates<T> pv)
Build a PVCoordinates from another one and a scale factor.
The PVCoordinates built will be a * pv
a
- scale factorpv
- base (unscaled) PVCoordinatespublic FieldPVCoordinates(T a, PVCoordinates pv)
Build a PVCoordinates from another one and a scale factor.
The PVCoordinates built will be a * pv
a
- scale factorpv
- base (unscaled) PVCoordinatespublic FieldPVCoordinates(FieldPVCoordinates<T> start, FieldPVCoordinates<T> end)
Build a relative PVCoordinates from a start and an end position.
The PVCoordinates built will be end - start.
start
- Starting PVCoordinatesend
- ending PVCoordinatespublic FieldPVCoordinates(double a1, FieldPVCoordinates<T> pv1, double a2, FieldPVCoordinates<T> pv2)
Build a PVCoordinates from two other ones and corresponding scale factors.
The PVCoordinates built will be a1 * u1 + a2 * u2
a1
- first scale factorpv1
- first base (unscaled) PVCoordinatesa2
- second scale factorpv2
- second base (unscaled) PVCoordinatespublic FieldPVCoordinates(T a1, FieldPVCoordinates<T> pv1, T a2, FieldPVCoordinates<T> pv2)
Build a PVCoordinates from two other ones and corresponding scale factors.
The PVCoordinates built will be a1 * u1 + a2 * u2
a1
- first scale factorpv1
- first base (unscaled) PVCoordinatesa2
- second scale factorpv2
- second base (unscaled) PVCoordinatespublic FieldPVCoordinates(T a1, PVCoordinates pv1, T a2, PVCoordinates pv2)
Build a PVCoordinates from two other ones and corresponding scale factors.
The PVCoordinates built will be a1 * u1 + a2 * u2
a1
- first scale factorpv1
- first base (unscaled) PVCoordinatesa2
- second scale factorpv2
- second base (unscaled) PVCoordinatespublic FieldPVCoordinates(double a1, FieldPVCoordinates<T> pv1, double a2, FieldPVCoordinates<T> pv2, double a3, FieldPVCoordinates<T> pv3)
Build a PVCoordinates from three other ones and corresponding scale factors.
The PVCoordinates built will be a1 * u1 + a2 * u2 + a3 * u3
a1
- first scale factorpv1
- first base (unscaled) PVCoordinatesa2
- second scale factorpv2
- second base (unscaled) PVCoordinatesa3
- third scale factorpv3
- third base (unscaled) PVCoordinatespublic FieldPVCoordinates(T a1, FieldPVCoordinates<T> pv1, T a2, FieldPVCoordinates<T> pv2, T a3, FieldPVCoordinates<T> pv3)
Build a PVCoordinates from three other ones and corresponding scale factors.
The PVCoordinates built will be a1 * u1 + a2 * u2 + a3 * u3
a1
- first scale factorpv1
- first base (unscaled) PVCoordinatesa2
- second scale factorpv2
- second base (unscaled) PVCoordinatesa3
- third scale factorpv3
- third base (unscaled) PVCoordinatespublic FieldPVCoordinates(T a1, PVCoordinates pv1, T a2, PVCoordinates pv2, T a3, PVCoordinates pv3)
Build a PVCoordinates from three other ones and corresponding scale factors.
The PVCoordinates built will be a1 * u1 + a2 * u2 + a3 * u3
a1
- first scale factorpv1
- first base (unscaled) PVCoordinatesa2
- second scale factorpv2
- second base (unscaled) PVCoordinatesa3
- third scale factorpv3
- third base (unscaled) PVCoordinatespublic FieldPVCoordinates(double a1, FieldPVCoordinates<T> pv1, double a2, FieldPVCoordinates<T> pv2, double a3, FieldPVCoordinates<T> pv3, double a4, FieldPVCoordinates<T> pv4)
Build a PVCoordinates from four other ones and corresponding scale factors.
The PVCoordinates built will be a1 * u1 + a2 * u2 + a3 * u3 + a4 * u4
a1
- 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) PVCoordinatespublic FieldPVCoordinates(T a1, FieldPVCoordinates<T> pv1, T a2, FieldPVCoordinates<T> pv2, T a3, FieldPVCoordinates<T> pv3, T a4, FieldPVCoordinates<T> pv4)
Build a PVCoordinates from four other ones and corresponding scale factors.
The PVCoordinates built will be a1 * u1 + a2 * u2 + a3 * u3 + a4 * u4
a1
- 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) PVCoordinatespublic FieldPVCoordinates(T a1, PVCoordinates pv1, T a2, PVCoordinates pv2, T a3, PVCoordinates pv3, T a4, PVCoordinates pv4)
Build a PVCoordinates from four other ones and corresponding scale factors.
The PVCoordinates built will be a1 * u1 + a2 * u2 + a3 * u3 + a4 * u4
a1
- 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) PVCoordinatespublic static <T extends RealFieldElement<T>> FieldVector3D<T> estimateVelocity(FieldVector3D<T> start, FieldVector3D<T> end, double dt)
Estimation is based on a simple fixed velocity translation during the time interval between the two positions.
T
- the type of the field elementsstart
- start positionend
- end positiondt
- time elapsed between the dates of the two positionspublic FieldPVCoordinates<T> shiftedBy(double dt)
The state can be slightly shifted to close dates. This shift is based on a simple quadratic model. 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.
shiftedBy
in interface TimeShiftable<FieldPVCoordinates<T extends RealFieldElement<T>>>
dt
- time shift in seconds@Deprecated public static <T extends RealFieldElement<T>> FieldPVCoordinates<T> interpolate(AbsoluteDate date, boolean useVelocities, Collection<Pair<AbsoluteDate,FieldPVCoordinates<T>>> sample)
TimeStampedFieldPVCoordinates.interpolate(AbsoluteDate, CartesianDerivativesFilter, Collection)
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.
T
- the type of the field elementsdate
- interpolation dateuseVelocities
- if true, use sample points velocities,
otherwise ignore them and use only positionssample
- sample points on which interpolation should be donepublic FieldVector3D<T> getPosition()
public FieldVector3D<T> getVelocity()
public FieldVector3D<T> getAcceleration()
public FieldVector3D<T> getMomentum()
This vector is the p ⊗ v where p is position, v is velocity and ⊗ is cross product. To get the real physical angular momentum you need to multiply this vector by the mass.
The returned vector is recomputed each time this method is called, it is not cached.
public FieldVector3D<T> getAngularVelocity()
angular
momentum
and is computed by ω = p × v / ||p||²public FieldPVCoordinates<T> negate()
public FieldPVCoordinates<T> normalize()
The computed coordinates first component (position) will be a normalized vector, the second component (velocity) will be the derivative of the first component (hence it will generally not be normalized), and the third component (acceleration) will be the derivative of the second component (hence it will generally not be normalized).
public PVCoordinates toPVCoordinates()
Copyright © 2002-2015 CS Systèmes d'information. All rights reserved.