Class PVCoordinates
- All Implemented Interfaces:
Blendable<PVCoordinates>,TimeShiftable<PVCoordinates>
- Direct Known Subclasses:
TimeStampedPVCoordinates
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.
This class is the angular counterpart to AngularCoordinates.
Instances of this class are guaranteed to be immutable.
- Author:
- Fabien Maussion, Luc Maisonobe
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PVCoordinatesFixed position/velocity at origin (both p, v and a are zero vectors). -
Constructor Summary
ConstructorsConstructorDescriptionSimple constructor.PVCoordinates(double a, PVCoordinates pv) Multiplicative constructor.PVCoordinates(double a1, PVCoordinates pv1, double a2, PVCoordinates pv2) Linear constructor.PVCoordinates(double a1, PVCoordinates pv1, double a2, PVCoordinates pv2, double a3, PVCoordinates pv3) Linear constructor.PVCoordinates(double a1, PVCoordinates pv1, double a2, PVCoordinates pv2, double a3, PVCoordinates pv3, double a4, PVCoordinates pv4) Linear constructor.PVCoordinates(FieldVector3D<U> p) Builds a PVCoordinates triplet from aFieldVector3D<Derivative>.PVCoordinates(Vector3D position) Builds PV coordinates with the givne position, zero velocity, and zero acceleration.PVCoordinates(Vector3D position, Vector3D velocity) Builds a PVCoordinates triplet with zero acceleration.PVCoordinates(Vector3D position, Vector3D velocity, Vector3D acceleration) Builds a PVCoordinates triplet.PVCoordinates(PVCoordinates start, PVCoordinates end) Subtractive constructor. -
Method Summary
Modifier and TypeMethodDescriptionblendArithmeticallyWith(PVCoordinates other, double blendingValue) static PVCoordinatescrossProduct(PVCoordinates pv1, PVCoordinates pv2) Compute the cross-product of two instances.static Vector3DestimateVelocity(Vector3D start, Vector3D end, double dt) Estimate velocity between two positions.Gets the acceleration.Get the angular velocity (spin) of this point as seen from the origin.Gets the momentum.Gets the position.Gets the velocity.negate()Get the opposite of the instance.Normalize the position part of the instance.positionShiftedBy(double dt) Get a time-shifted position.shiftedBy(double dt) Get a time-shifted state.toDerivativeStructurePV(int order) Transform the instance to aFieldPVCoordinates<DerivativeStructure>.toDerivativeStructureVector(int order) Transform the instance to aFieldVector3D<DerivativeStructure>.toDerivativeStructureVector(int order, int totalFreeParameters) Transform the instance to aFieldVector3D<DerivativeStructure>.toString()Return a string representation of this position/velocity pair.Transform the instance to aFieldPVCoordinates<UnivariateDerivative1>.Transform the instance to aFieldVector3D<UnivariateDerivative1>.Transform the instance to aFieldPVCoordinates<UnivariateDerivative2>.Transform the instance to aFieldVector3D<UnivariateDerivative2>.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.orekit.time.TimeShiftable
shiftedBy
-
Field Details
-
ZERO
Fixed position/velocity at origin (both p, v and a are zero vectors).
-
-
Constructor Details
-
PVCoordinates
public PVCoordinates()Simple constructor.Set the Coordinates to default : (0 0 0), (0 0 0), (0 0 0).
-
PVCoordinates
Builds a PVCoordinates triplet with zero acceleration.Acceleration is set to zero
- Parameters:
position- the position vector (m)velocity- the velocity vector (m/s)
-
PVCoordinates
Builds a PVCoordinates triplet.- Parameters:
position- the position vector (m)velocity- the velocity vector (m/s)acceleration- the acceleration vector (m/s²)
-
PVCoordinates
Multiplicative constructor.Build a PVCoordinates from another one and a scale factor.
The PVCoordinates built will be a * pv
- Parameters:
a- scale factorpv- base (unscaled) PVCoordinates
-
PVCoordinates
Subtractive constructor.Build a relative PVCoordinates from a start and an end position.
The PVCoordinates built will be end - start.
- Parameters:
start- Starting PVCoordinatesend- ending PVCoordinates
-
PVCoordinates
Linear constructor.Build a PVCoordinates from two other ones and corresponding scale factors.
The PVCoordinates built will be a1 * u1 + a2 * u2
- Parameters:
a1- first scale factorpv1- first base (unscaled) PVCoordinatesa2- second scale factorpv2- second base (unscaled) PVCoordinates
-
PVCoordinates
public PVCoordinates(double a1, PVCoordinates pv1, double a2, PVCoordinates pv2, double a3, PVCoordinates pv3) Linear constructor.Build a PVCoordinates from three other ones and corresponding scale factors.
The PVCoordinates built will be a1 * u1 + a2 * u2 + a3 * u3
- Parameters:
a1- first scale factorpv1- first base (unscaled) PVCoordinatesa2- second scale factorpv2- second base (unscaled) PVCoordinatesa3- third scale factorpv3- third base (unscaled) PVCoordinates
-
PVCoordinates
public PVCoordinates(double a1, PVCoordinates pv1, double a2, PVCoordinates pv2, double a3, PVCoordinates pv3, double a4, PVCoordinates pv4) Linear constructor.Build a PVCoordinates from four other ones and corresponding scale factors.
The PVCoordinates built will be a1 * u1 + a2 * u2 + a3 * u3 + a4 * u4
- Parameters:
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) PVCoordinates
-
PVCoordinates
Builds a PVCoordinates triplet from aFieldVector3D<Derivative>.The vector components must have time as their only derivation parameter and have consistent derivation orders.
- Type Parameters:
U- type of the derivative- Parameters:
p- vector with time-derivatives embedded within the coordinates
-
PVCoordinates
Builds PV coordinates with the givne position, zero velocity, and zero acceleration.- Parameters:
position- position vector (m)
-
-
Method Details
-
toDerivativeStructureVector
Transform the instance to aFieldVector3D<DerivativeStructure>.The
DerivativeStructurecoordinates correspond to time-derivatives up to the user-specified order.- Parameters:
order- derivation order for the vector components- Returns:
- vector with time-derivatives embedded within the coordinates
-
toDerivativeStructureVector
public FieldVector3D<DerivativeStructure> toDerivativeStructureVector(int order, int totalFreeParameters) Transform the instance to aFieldVector3D<DerivativeStructure>.The
DerivativeStructurecoordinates correspond to time-derivatives up to the user-specified order.- Parameters:
order- derivation order for the vector componentstotalFreeParameters- total number of independent variables in Taylor differential algebra. Must be at least 1 for time.- Returns:
- vector with time-derivatives embedded within the coordinates
- Since:
- 14.0
-
toUnivariateDerivative1Vector
Transform the instance to aFieldVector3D<UnivariateDerivative1>.The
UnivariateDerivative1coordinates correspond to time-derivatives up to the order 1.- Returns:
- vector with time-derivatives embedded within the coordinates
- Since:
- 10.2
- See Also:
-
toUnivariateDerivative2Vector
Transform the instance to aFieldVector3D<UnivariateDerivative2>.The
UnivariateDerivative2coordinates correspond to time-derivatives up to the order 2.- Returns:
- vector with time-derivatives embedded within the coordinates
- Since:
- 10.2
- See Also:
-
toDerivativeStructurePV
Transform the instance to aFieldPVCoordinates<DerivativeStructure>.The
DerivativeStructurecoordinates correspond to time-derivatives up to the user-specified order. As both the instance componentsposition,velocityandaccelerationand thederivativesof the components holds time-derivatives, there are several ways to retrieve these derivatives. If for example theorderis set to 2, then bothpv.getPosition().getX().getPartialDerivative(2),pv.getVelocity().getX().getPartialDerivative(1)andpv.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.
- Parameters:
order- derivation order for the vector components (must be either 0, 1 or 2)- Returns:
- pv coordinates with time-derivatives embedded within the coordinates
- Since:
- 9.2
-
toUnivariateDerivative1PV
Transform the instance to aFieldPVCoordinates<UnivariateDerivative1>.The
UnivariateDerivative1coordinates correspond to time-derivatives up to the order 1. The first derivative of acceleration will be computed as a Keplerian-only jerk.- Returns:
- pv coordinates with time-derivatives embedded within the coordinates
- Since:
- 10.2
-
toUnivariateDerivative2PV
Transform the instance to aFieldPVCoordinates<UnivariateDerivative2>.The
UnivariateDerivative2coordinates 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.- Returns:
- pv coordinates with time-derivatives embedded within the coordinates
- Since:
- 10.2
-
estimateVelocity
Estimate velocity between two positions.Estimation is based on a simple fixed velocity translation during the time interval between the two positions.
- Parameters:
start- start positionend- end positiondt- time elapsed between the dates of the two positions- Returns:
- velocity allowing to go from start to end positions
-
shiftedBy
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:
shiftedByin interfaceTimeShiftable<PVCoordinates>- Parameters:
dt- time shift in seconds- Returns:
- a new state, shifted with respect to the instance (which is immutable)
-
positionShiftedBy
Get a time-shifted position. Same asshiftedBy(double)except that only the sifted position is returned.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.
- Parameters:
dt- time shift in seconds- Returns:
- a new state, shifted with respect to the instance (which is immutable)
-
getPosition
Gets the position.- Returns:
- the position vector (m).
-
getVelocity
Gets the velocity.- Returns:
- the velocity vector (m/s).
-
getAcceleration
Gets the acceleration.- Returns:
- the acceleration vector (m/s²).
-
getMomentum
Gets the momentum.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.
- Returns:
- a new instance of the momentum vector (m²/s).
-
getAngularVelocity
Get the angular velocity (spin) of this point as seen from the origin.The angular velocity vector is parallel to the
angular momentumand is computed by ω = p × v / ||p||²- Returns:
- the angular velocity vector
- See Also:
-
negate
Get the opposite of the instance.- Returns:
- a new position-velocity which is opposite to the instance
-
normalize
Normalize the position part of the instance.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).
- Returns:
- a new instance, with first component normalized and remaining component computed to have consistent derivatives
-
crossProduct
Compute the cross-product of two instances.- Parameters:
pv1- first instancespv2- second instances- Returns:
- the cross product v1 ^ v2 as a new instance
-
toString
Return a string representation of this position/velocity pair. -
blendArithmeticallyWith
public PVCoordinates blendArithmeticallyWith(PVCoordinates other, double blendingValue) throws MathIllegalArgumentException - Specified by:
blendArithmeticallyWithin interfaceBlendable<PVCoordinates>- Throws:
MathIllegalArgumentException
-