T
- the type of the field elementspublic class FieldPVCoordinates<T extends CalculusFieldElement<T>> extends Object implements TimeShiftable<FieldPVCoordinates<T>>
CalculusFieldElement
.
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(FieldVector3D<U> p)
Builds a FieldPVCoordinates triplet from a
FieldVector3D <FieldDerivativeStructure >. |
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.
|
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 FieldPVCoordinates(FieldVector3D<U> p)
FieldVector3D
<FieldDerivativeStructure
>.
The vector components must have time as their only derivation parameter and have consistent derivation orders.
U
- type of the derivativep
- vector with time-derivatives embedded within the coordinatespublic static <T extends CalculusFieldElement<T>> FieldPVCoordinates<T> getZero(Field<T> field)
T
- the type of the field elementsfield
- field for the componentspublic FieldVector3D<FieldDerivativeStructure<T>> toDerivativeStructureVector(int order)
FieldVector3D
<FieldDerivativeStructure
>.
The FieldDerivativeStructure
coordinates correspond to time-derivatives up
to the user-specified order.
order
- derivation order for the vector components (must be either 0, 1 or 2)public FieldVector3D<FieldUnivariateDerivative1<T>> toUnivariateDerivative1Vector()
FieldVector3D
<FieldUnivariateDerivative1
>.
The FieldUnivariateDerivative1
coordinates correspond to time-derivatives up
to the order 1.
toUnivariateDerivative2Vector()
public FieldVector3D<FieldUnivariateDerivative2<T>> toUnivariateDerivative2Vector()
FieldVector3D
<FieldUnivariateDerivative2
>.
The FieldUnivariateDerivative2
coordinates correspond to time-derivatives up
to the order 2.
toUnivariateDerivative1Vector()
public FieldPVCoordinates<FieldDerivativeStructure<T>> toDerivativeStructurePV(int order)
FieldPVCoordinates
<FieldDerivativeStructure
>.
The FieldDerivativeStructure
coordinates correspond to time-derivatives up
to the user-specified order. As both the instance components position
,
velocity
and acceleration
and the
derivatives
of the components
holds time-derivatives, there are several ways to retrieve these derivatives. If for example
the order
is set to 2, then both pv.getPosition().getX().getPartialDerivative(2)
,
pv.getVelocity().getX().getPartialDerivative(1)
and
pv.getAcceleration().getX().getValue()
return the exact same value.
If derivation order is 1, the first derivative of acceleration will be computed as a Keplerian-only jerk. If derivation order is 2, the second derivative of velocity (which is also the first derivative of acceleration) will be computed as a Keplerian-only jerk, and the second derivative of acceleration will be computed as a Keplerian-only jounce.
order
- derivation order for the vector components (must be either 0, 1 or 2)public FieldPVCoordinates<FieldUnivariateDerivative1<T>> toUnivariateDerivative1PV()
FieldPVCoordinates
<FieldUnivariateDerivative1
>.
The FieldUnivariateDerivative1
coordinates correspond to time-derivatives up
to the order 1.
The first derivative of acceleration will be computed as a Keplerian-only jerk.
public FieldPVCoordinates<FieldUnivariateDerivative2<T>> toUnivariateDerivative2PV()
FieldPVCoordinates
<FieldUnivariateDerivative2
>.
The FieldUnivariateDerivative2
coordinates correspond to time-derivatives up
to the order 2.
As derivation order is 2, the second derivative of velocity (which
is also the first derivative of acceleration) will be computed as a Keplerian-only jerk,
and the second derivative of acceleration will be computed as a Keplerian-only jounce.
public static <T extends CalculusFieldElement<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 CalculusFieldElement<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-2022 CS GROUP. All rights reserved.