T
- the type of the field elementspublic class FieldPVCoordinates<T extends RealFieldElement<T>> extends Object implements TimeShiftable<FieldPVCoordinates<T>>
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
Constructor 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(Field<T> field,
PVCoordinates pv)
Builds a FieldPVCoordinates from a field and a regular PVCoordinates.
|
FieldPVCoordinates(FieldPVCoordinates<T> start,
FieldPVCoordinates<T> end)
Subtractive constructor.
|
FieldPVCoordinates(FieldVector3D<T> position,
FieldVector3D<T> velocity)
Builds a FieldPVCoordinates triplet with zero acceleration.
|
FieldPVCoordinates(FieldVector3D<T> position,
FieldVector3D<T> velocity,
FieldVector3D<T> acceleration)
Builds a FieldPVCoordinates 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 |
---|---|
FieldPVCoordinates<T> |
crossProduct(FieldPVCoordinates<T> pv2)
Compute the cross-product of two instances.
|
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>> |
getZero(Field<T> field)
Get fixed position/velocity at origin (both p, v and a are zero vectors).
|
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.
|
FieldPVCoordinates<T> |
shiftedBy(T dt)
Get a time-shifted state.
|
PVCoordinates |
toPVCoordinates()
Convert to a constant position-velocity.
|
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(Field<T> field, PVCoordinates pv)
field
- field for the componentspv
- PVCoordinates triplet to convertpublic 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>> FieldPVCoordinates<T> getZero(Field<T> field)
T
- the type of the field elementsfield
- field for the componentspublic 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 secondspublic FieldPVCoordinates<T> shiftedBy(T 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.
dt
- time shift in secondspublic 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()
The angular velocity vector is parallel to the 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 FieldPVCoordinates<T> crossProduct(FieldPVCoordinates<T> pv2)
pv2
- second instancespublic PVCoordinates toPVCoordinates()
Copyright © 2002-2017 CS Systèmes d'information. All rights reserved.