Class TimeStampedFieldAngularCoordinates<T extends CalculusFieldElement<T>>
- java.lang.Object
-
- org.orekit.utils.FieldAngularCoordinates<T>
-
- org.orekit.utils.TimeStampedFieldAngularCoordinates<T>
-
- Type Parameters:
T
- the type of the field elements
- All Implemented Interfaces:
FieldTimeShiftable<FieldAngularCoordinates<T>,T>
,FieldTimeStamped<T>
,TimeShiftable<FieldAngularCoordinates<T>>
public class TimeStampedFieldAngularCoordinates<T extends CalculusFieldElement<T>> extends FieldAngularCoordinates<T> implements FieldTimeStamped<T>
time-stamped
version ofFieldAngularCoordinates
.Instances of this class are guaranteed to be immutable.
- Since:
- 7.0
- Author:
- Luc Maisonobe
-
-
Constructor Summary
Constructors Constructor Description TimeStampedFieldAngularCoordinates(Field<T> field, TimeStampedAngularCoordinates ac)
Builds an instance for a regularTimeStampedAngularCoordinates
.TimeStampedFieldAngularCoordinates(AbsoluteDate date, FieldRotation<T> rotation, FieldVector3D<T> rotationRate, FieldVector3D<T> rotationAcceleration)
Builds a rotation/rotation rate pair.TimeStampedFieldAngularCoordinates(AbsoluteDate date, FieldPVCoordinates<T> u1, FieldPVCoordinates<T> u2, FieldPVCoordinates<T> v1, FieldPVCoordinates<T> v2, double tolerance)
Build the rotation that transforms a pair of pv coordinates into another pair.TimeStampedFieldAngularCoordinates(FieldAbsoluteDate<T> date, FieldRotation<T> rotation, FieldVector3D<T> rotationRate, FieldVector3D<T> rotationAcceleration)
Builds a rotation/rotation rate pair.TimeStampedFieldAngularCoordinates(FieldAbsoluteDate<T> date, FieldRotation<U> r)
Builds a TimeStampedFieldAngularCoordinates from aFieldRotation
<FieldDerivativeStructure
>.TimeStampedFieldAngularCoordinates(FieldAbsoluteDate<T> date, FieldPVCoordinates<T> u1, FieldPVCoordinates<T> u2, FieldPVCoordinates<T> v1, FieldPVCoordinates<T> v2, double tolerance)
Build the rotation that transforms a pair of pv coordinates into another pair.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TimeStampedFieldAngularCoordinates<T>
addOffset(FieldAngularCoordinates<T> offset)
Add an offset from the instance.FieldAbsoluteDate<T>
getDate()
Get the date.TimeStampedFieldAngularCoordinates<T>
revert()
Revert a rotation/rotation rate pair.TimeStampedFieldAngularCoordinates<T>
shiftedBy(double dt)
Get a time-shifted state.TimeStampedFieldAngularCoordinates<T>
shiftedBy(T dt)
Get a time-shifted state.TimeStampedFieldAngularCoordinates<T>
subtractOffset(FieldAngularCoordinates<T> offset)
Subtract an offset from the instance.-
Methods inherited from class org.orekit.utils.FieldAngularCoordinates
applyTo, applyTo, applyTo, applyTo, createFromModifiedRodrigues, estimateRate, estimateRate, getIdentity, getModifiedRodrigues, getRotation, getRotationAcceleration, getRotationRate, rotationShiftedBy, toAngularCoordinates, toDerivativeStructureRotation, toUnivariateDerivative1Rotation, toUnivariateDerivative2Rotation
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.orekit.time.FieldTimeStamped
durationFrom
-
Methods inherited from interface org.orekit.time.TimeShiftable
shiftedBy
-
-
-
-
Constructor Detail
-
TimeStampedFieldAngularCoordinates
public TimeStampedFieldAngularCoordinates(AbsoluteDate date, FieldPVCoordinates<T> u1, FieldPVCoordinates<T> u2, FieldPVCoordinates<T> v1, FieldPVCoordinates<T> v2, double tolerance)
Build the rotation that transforms a pair of pv coordinates into another pair.WARNING! This method requires much more stringent assumptions on its parameters than the similar
constructor
from theRotation
class. As far as the Rotation constructor is concerned, thev₂
vector from the second pair can be slightly misaligned. The Rotation constructor will compensate for this misalignment and create a rotation that ensurev₁ = r(u₁)
andv₂ ∈ plane (r(u₁), r(u₂))
. THIS IS NOT TRUE ANYMORE IN THIS CLASS! As derivatives are involved and must be preserved, this constructor works only if the two pairs are fully consistent, i.e. if a rotation exists that fulfill all the requirements:v₁ = r(u₁)
,v₂ = r(u₂)
,dv₁/dt = dr(u₁)/dt
,dv₂/dt = dr(u₂)/dt
,d²v₁/dt² = d²r(u₁)/dt²
,d²v₂/dt² = d²r(u₂)/dt²
.- Parameters:
date
- coordinates dateu1
- first vector of the origin pairu2
- second vector of the origin pairv1
- desired image of u1 by the rotationv2
- desired image of u2 by the rotationtolerance
- relative tolerance factor used to check singularities
-
TimeStampedFieldAngularCoordinates
public TimeStampedFieldAngularCoordinates(FieldAbsoluteDate<T> date, FieldPVCoordinates<T> u1, FieldPVCoordinates<T> u2, FieldPVCoordinates<T> v1, FieldPVCoordinates<T> v2, double tolerance)
Build the rotation that transforms a pair of pv coordinates into another pair.WARNING! This method requires much more stringent assumptions on its parameters than the similar
constructor
from theRotation
class. As far as the Rotation constructor is concerned, thev₂
vector from the second pair can be slightly misaligned. The Rotation constructor will compensate for this misalignment and create a rotation that ensurev₁ = r(u₁)
andv₂ ∈ plane (r(u₁), r(u₂))
. THIS IS NOT TRUE ANYMORE IN THIS CLASS! As derivatives are involved and must be preserved, this constructor works only if the two pairs are fully consistent, i.e. if a rotation exists that fulfill all the requirements:v₁ = r(u₁)
,v₂ = r(u₂)
,dv₁/dt = dr(u₁)/dt
,dv₂/dt = dr(u₂)/dt
,d²v₁/dt² = d²r(u₁)/dt²
,d²v₂/dt² = d²r(u₂)/dt²
.- Parameters:
date
- coordinates dateu1
- first vector of the origin pairu2
- second vector of the origin pairv1
- desired image of u1 by the rotationv2
- desired image of u2 by the rotationtolerance
- relative tolerance factor used to check singularities
-
TimeStampedFieldAngularCoordinates
public TimeStampedFieldAngularCoordinates(AbsoluteDate date, FieldRotation<T> rotation, FieldVector3D<T> rotationRate, FieldVector3D<T> rotationAcceleration)
Builds a rotation/rotation rate pair.- Parameters:
date
- coordinates daterotation
- rotationrotationRate
- rotation rate Ω (rad/s)rotationAcceleration
- rotation acceleration dΩ/dt (rad²/s²)
-
TimeStampedFieldAngularCoordinates
public TimeStampedFieldAngularCoordinates(FieldAbsoluteDate<T> date, FieldRotation<T> rotation, FieldVector3D<T> rotationRate, FieldVector3D<T> rotationAcceleration)
Builds a rotation/rotation rate pair.- Parameters:
date
- coordinates daterotation
- rotationrotationRate
- rotation rate Ω (rad/s)rotationAcceleration
- rotation acceleration dΩ/dt (rad²/s²)
-
TimeStampedFieldAngularCoordinates
public TimeStampedFieldAngularCoordinates(Field<T> field, TimeStampedAngularCoordinates ac)
Builds an instance for a regularTimeStampedAngularCoordinates
.- Parameters:
field
- fields to which the elements belongac
- coordinates to convert- Since:
- 9.0
-
TimeStampedFieldAngularCoordinates
public TimeStampedFieldAngularCoordinates(FieldAbsoluteDate<T> date, FieldRotation<U> r)
Builds a TimeStampedFieldAngularCoordinates from aFieldRotation
<FieldDerivativeStructure
>.The rotation components must have time as their only derivation parameter and have consistent derivation orders.
- Type Parameters:
U
- type of the derivative- Parameters:
date
- coordinates dater
- rotation with time-derivatives embedded within the coordinates- Since:
- 9.2
-
-
Method Detail
-
revert
public TimeStampedFieldAngularCoordinates<T> revert()
Revert a rotation/rotation rate pair. Build a pair which reverse the effect of another pair.- Overrides:
revert
in classFieldAngularCoordinates<T extends CalculusFieldElement<T>>
- Returns:
- a new pair whose effect is the reverse of the effect of the instance
-
getDate
public FieldAbsoluteDate<T> getDate()
Get the date.- Specified by:
getDate
in interfaceFieldTimeStamped<T extends CalculusFieldElement<T>>
- Returns:
- date attached to the object
-
shiftedBy
public TimeStampedFieldAngularCoordinates<T> shiftedBy(double dt)
Get a time-shifted state.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 attitude propagation but should be sufficient for either small time shifts or coarse accuracy.
- Specified by:
shiftedBy
in interfaceTimeShiftable<T extends CalculusFieldElement<T>>
- Overrides:
shiftedBy
in classFieldAngularCoordinates<T extends CalculusFieldElement<T>>
- Parameters:
dt
- time shift in seconds- Returns:
- a new state, shifted with respect to the instance (which is immutable)
-
shiftedBy
public TimeStampedFieldAngularCoordinates<T> shiftedBy(T dt)
Get a time-shifted state.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 attitude propagation but should be sufficient for either small time shifts or coarse accuracy.
- Specified by:
shiftedBy
in interfaceFieldTimeShiftable<FieldAngularCoordinates<T extends CalculusFieldElement<T>>,T extends CalculusFieldElement<T>>
- Overrides:
shiftedBy
in classFieldAngularCoordinates<T extends CalculusFieldElement<T>>
- Parameters:
dt
- time shift in seconds- Returns:
- a new state, shifted with respect to the instance (which is immutable)
-
addOffset
public TimeStampedFieldAngularCoordinates<T> addOffset(FieldAngularCoordinates<T> offset)
Add an offset from the instance.We consider here that the offset rotation is applied first and the instance is applied afterward. Note that angular coordinates do not commute under this operation, i.e.
a.addOffset(b)
andb.addOffset(a)
lead to different results in most cases.The two methods
addOffset
andsubtractOffset
are designed so that round trip applications are possible. This means that bothac1.subtractOffset(ac2).addOffset(ac2)
andac1.addOffset(ac2).subtractOffset(ac2)
return angular coordinates equal to ac1.- Overrides:
addOffset
in classFieldAngularCoordinates<T extends CalculusFieldElement<T>>
- Parameters:
offset
- offset to subtract- Returns:
- new instance, with offset subtracted
- See Also:
subtractOffset(FieldAngularCoordinates)
-
subtractOffset
public TimeStampedFieldAngularCoordinates<T> subtractOffset(FieldAngularCoordinates<T> offset)
Subtract an offset from the instance.We consider here that the offset Rotation is applied first and the instance is applied afterward. Note that angular coordinates do not commute under this operation, i.e.
a.subtractOffset(b)
andb.subtractOffset(a)
lead to different results in most cases.The two methods
addOffset
andsubtractOffset
are designed so that round trip applications are possible. This means that bothac1.subtractOffset(ac2).addOffset(ac2)
andac1.addOffset(ac2).subtractOffset(ac2)
return angular coordinates equal to ac1.- Overrides:
subtractOffset
in classFieldAngularCoordinates<T extends CalculusFieldElement<T>>
- Parameters:
offset
- offset to subtract- Returns:
- new instance, with offset subtracted
- See Also:
addOffset(FieldAngularCoordinates)
-
-