org.orekit.utils
Class TimeStampedAngularCoordinates

java.lang.Object
  extended by org.orekit.utils.AngularCoordinates
      extended by org.orekit.utils.TimeStampedAngularCoordinates
All Implemented Interfaces:
Serializable, TimeShiftable<AngularCoordinates>, TimeStamped

public class TimeStampedAngularCoordinates
extends AngularCoordinates
implements TimeStamped

time-stamped version of AngularCoordinates.

Instances of this class are guaranteed to be immutable.

Since:
3.1
Author:
Luc Maisonobe
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.orekit.utils.AngularCoordinates
IDENTITY
 
Constructor Summary
TimeStampedAngularCoordinates(AbsoluteDate date, PVCoordinates u1, PVCoordinates u2, PVCoordinates v1, PVCoordinates v2, double tolerance)
          Build the rotation that transforms a pair of pv coordinates into another pair.
TimeStampedAngularCoordinates(AbsoluteDate date, PVCoordinates u1, PVCoordinates u2, PVCoordinates v1, PVCoordinates v2, double tolerance, boolean spinDerivativesComputation)
          Build the rotation that transforms a pair of pv coordinates into another pair.
TimeStampedAngularCoordinates(AbsoluteDate date, Rotation rotation, Vector3D rotationRate, Vector3D rotationAcceleration)
          Builds a rotation/rotation rate pair.
 
Method Summary
 TimeStampedAngularCoordinates addOffset(AngularCoordinates offset)
          Add an offset from the instance.
 TimeStampedAngularCoordinates addOffset(AngularCoordinates offset, boolean computeSpinDerivatives)
          Add an offset from the instance.
 AbsoluteDate getDate()
          Get the date.
static TimeStampedAngularCoordinates interpolate(AbsoluteDate date, AngularDerivativesFilter filter, Collection<TimeStampedAngularCoordinates> sample)
          Interpolate angular coordinates.
static TimeStampedAngularCoordinates interpolate(AbsoluteDate date, AngularDerivativesFilter filter, Collection<TimeStampedAngularCoordinates> sample, boolean computeSpinDerivatives)
          Interpolate angular coordinates.
 TimeStampedAngularCoordinates revert()
          Revert a rotation/rotation rate/rotation acceleration triplet.
 TimeStampedAngularCoordinates revert(boolean computeSpinDerivative)
          Revert a rotation/rotation rate/rotation acceleration triplet.
 TimeStampedAngularCoordinates shiftedBy(double dt)
          Get a time-shifted state.
 TimeStampedAngularCoordinates shiftedBy(double dt, boolean computeSpinDerivative)
          Get a time-shifted state.
 TimeStampedAngularCoordinates subtractOffset(AngularCoordinates offset)
          Subtract an offset from the instance.
 TimeStampedAngularCoordinates subtractOffset(AngularCoordinates offset, boolean computeSpinDerivatives)
          Subtract an offset from the instance.
 
Methods inherited from class org.orekit.utils.AngularCoordinates
applyTo, applyTo, createFromModifiedRodrigues, createFromModifiedRodrigues, estimateRate, getModifiedRodrigues, getModifiedRodrigues, getRotation, getRotationAcceleration, getRotationRate, interpolate, interpolate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeStampedAngularCoordinates

public TimeStampedAngularCoordinates(AbsoluteDate date,
                                     Rotation rotation,
                                     Vector3D rotationRate,
                                     Vector3D rotationAcceleration)
Builds a rotation/rotation rate pair.

Parameters:
date - coordinates date
rotation - rotation
rotationRate - rotation rate Ω (rad/s)
rotationAcceleration - rotation acceleration dΩ/dt (rad²/s²)

TimeStampedAngularCoordinates

public TimeStampedAngularCoordinates(AbsoluteDate date,
                                     PVCoordinates u1,
                                     PVCoordinates u2,
                                     PVCoordinates v1,
                                     PVCoordinates v2,
                                     double tolerance)
                              throws OrekitException
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 the Rotation class. As far as the Rotation constructor is concerned, the v₂ vector from the second pair can be slightly misaligned. The Rotation constructor will compensate for this misalignment and create a rotation that ensure v₁ = r(u₁) and v₂ ∈ 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².

Warning: spin derivative is not computed.

Parameters:
date - coordinates date
u1 - first vector of the origin pair
u2 - second vector of the origin pair
v1 - desired image of u1 by the rotation
v2 - desired image of u2 by the rotation
tolerance - relative tolerance factor used to check singularities
Throws:
OrekitException - if the vectors components cannot be converted to DerivativeStructure with proper order

TimeStampedAngularCoordinates

public TimeStampedAngularCoordinates(AbsoluteDate date,
                                     PVCoordinates u1,
                                     PVCoordinates u2,
                                     PVCoordinates v1,
                                     PVCoordinates v2,
                                     double tolerance,
                                     boolean spinDerivativesComputation)
                              throws OrekitException
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 the Rotation class. As far as the Rotation constructor is concerned, the v₂ vector from the second pair can be slightly misaligned. The Rotation constructor will compensate for this misalignment and create a rotation that ensure v₁ = r(u₁) and v₂ ∈ 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 date
u1 - first vector of the origin pair
u2 - second vector of the origin pair
v1 - desired image of u1 by the rotation
v2 - desired image of u2 by the rotation
tolerance - relative tolerance factor used to check singularities
spinDerivativesComputation - true if the spin derivative should be computed If not, spin derivative is set to null
Throws:
OrekitException - if the vectors components cannot be converted to DerivativeStructure with proper order
Method Detail

getDate

public AbsoluteDate getDate()
Get the date.

Specified by:
getDate in interface TimeStamped
Returns:
date attached to the object

revert

public TimeStampedAngularCoordinates revert(boolean computeSpinDerivative)
Revert a rotation/rotation rate/rotation acceleration triplet. Build a triplet which reverse the effect of another triplet.

Overrides:
revert in class AngularCoordinates
Parameters:
computeSpinDerivative - true if spin derivative should be computed. If not, spin derivative is set to null
Returns:
a new triplet whose effect is the reverse of the effect of the instance

revert

public TimeStampedAngularCoordinates revert()
Revert a rotation/rotation rate/rotation acceleration triplet. Build a triplet which reverse the effect of another triplet.

Warning: spin derivative is not computed.

Overrides:
revert in class AngularCoordinates
Returns:
a new triplet whose effect is the reverse of the effect of the instance

shiftedBy

public TimeStampedAngularCoordinates shiftedBy(double dt,
                                               boolean computeSpinDerivative)
Get a time-shifted state.

The state can be slightly shifted to close dates. This shift is based on an approximate solution of the fixed acceleration motion. It is not intended as a replacement for proper attitude propagation but should be sufficient for either small time shifts or coarse accuracy.

Overrides:
shiftedBy in class AngularCoordinates
Parameters:
dt - time shift in seconds
computeSpinDerivative - true if spin derivative should be computed. If not, spin derivative is set to null
Returns:
a new state, shifted with respect to the instance (which is immutable)

shiftedBy

public TimeStampedAngularCoordinates shiftedBy(double dt)
Get a time-shifted state.

The state can be slightly shifted to close dates. This shift is based on an approximate solution of the fixed acceleration motion. It is not intended as a replacement for proper attitude propagation but should be sufficient for either small time shifts or coarse accuracy.

Warning: spin derivative is not computed.

Specified by:
shiftedBy in interface TimeShiftable<AngularCoordinates>
Overrides:
shiftedBy in class AngularCoordinates
Parameters:
dt - time shift in seconds
Returns:
a new state, shifted with respect to the instance (which is immutable)

addOffset

public TimeStampedAngularCoordinates addOffset(AngularCoordinates 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) and b.addOffset(a) lead to different results in most cases.

The two methods addOffset and subtractOffset are designed so that round trip applications are possible. This means that both ac1.subtractOffset(ac2).addOffset(ac2) and ac1.addOffset(ac2).subtractOffset(ac2) return angular coordinates equal to ac1.

Warning: spin derivative is not computed.

Overrides:
addOffset in class AngularCoordinates
Parameters:
offset - offset to subtract
Returns:
new instance, with offset subtracted
See Also:
subtractOffset(AngularCoordinates)

addOffset

public TimeStampedAngularCoordinates addOffset(AngularCoordinates offset,
                                               boolean computeSpinDerivatives)
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) and b.addOffset(a) lead to different results in most cases.

The two methods addOffset and subtractOffset are designed so that round trip applications are possible. This means that both ac1.subtractOffset(ac2).addOffset(ac2) and ac1.addOffset(ac2).subtractOffset(ac2) return angular coordinates equal to ac1.

Overrides:
addOffset in class AngularCoordinates
Parameters:
offset - offset to subtract
computeSpinDerivatives - true if spin derivatives should be computed. If not, spin derivative is set to null
Returns:
new instance, with offset subtracted
See Also:
subtractOffset(AngularCoordinates)

subtractOffset

public TimeStampedAngularCoordinates subtractOffset(AngularCoordinates 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) and b.subtractOffset(a) lead to different results in most cases.

The two methods addOffset and subtractOffset are designed so that round trip applications are possible. This means that both ac1.subtractOffset(ac2).addOffset(ac2) and ac1.addOffset(ac2).subtractOffset(ac2) return angular coordinates equal to ac1.

Warning: spin derivative is not computed.

Overrides:
subtractOffset in class AngularCoordinates
Parameters:
offset - offset to subtract
Returns:
new instance, with offset subtracted
See Also:
addOffset(AngularCoordinates)

subtractOffset

public TimeStampedAngularCoordinates subtractOffset(AngularCoordinates offset,
                                                    boolean computeSpinDerivatives)
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) and b.subtractOffset(a) lead to different results in most cases.

The two methods addOffset and subtractOffset are designed so that round trip applications are possible. This means that both ac1.subtractOffset(ac2).addOffset(ac2) and ac1.addOffset(ac2).subtractOffset(ac2) return angular coordinates equal to ac1.

Overrides:
subtractOffset in class AngularCoordinates
Parameters:
offset - offset to subtract
computeSpinDerivatives - true if spin derivatives should be computed. If not, spin derivative is set to null
Returns:
new instance, with offset subtracted
See Also:
addOffset(AngularCoordinates)

interpolate

public static TimeStampedAngularCoordinates interpolate(AbsoluteDate date,
                                                        AngularDerivativesFilter filter,
                                                        Collection<TimeStampedAngularCoordinates> sample)
                                                 throws OrekitException
Interpolate angular coordinates.

The interpolated instance is created by polynomial Hermite interpolation on Rodrigues vector ensuring rotation rate remains the exact derivative of rotation.

This method is based on Sergei Tanygin's paper Attitude Interpolation, changing the norm of the vector to match the modified Rodrigues vector as described in Malcolm D. Shuster's paper A Survey of Attitude Representations. This change avoids the singularity at π. There is still a singularity at 2π, which is handled by slightly offsetting all rotations when this singularity is detected.

Note that even if first and second time derivatives (rotation rates and acceleration) 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 rotations.

Warning: spin derivative is not computed.

Parameters:
date - interpolation date
filter - filter for derivatives from the sample to use in interpolation
sample - sample points on which interpolation should be done
Returns:
a new position-velocity, interpolated at specified date
Throws:
OrekitException - if the number of point is too small for interpolating

interpolate

public static TimeStampedAngularCoordinates interpolate(AbsoluteDate date,
                                                        AngularDerivativesFilter filter,
                                                        Collection<TimeStampedAngularCoordinates> sample,
                                                        boolean computeSpinDerivatives)
                                                 throws OrekitException
Interpolate angular coordinates.

The interpolated instance is created by polynomial Hermite interpolation on Rodrigues vector ensuring rotation rate remains the exact derivative of rotation.

This method is based on Sergei Tanygin's paper Attitude Interpolation, changing the norm of the vector to match the modified Rodrigues vector as described in Malcolm D. Shuster's paper A Survey of Attitude Representations. This change avoids the singularity at π. There is still a singularity at 2π, which is handled by slightly offsetting all rotations when this singularity is detected.

Note that even if first and second time derivatives (rotation rates and acceleration) 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 rotations.

Parameters:
date - interpolation date
filter - filter for derivatives from the sample to use in interpolation
sample - sample points on which interpolation should be done
computeSpinDerivatives - true if spin derivative should be computed. If not, spin derivative is set to null
Returns:
a new position-velocity, interpolated at specified date
Throws:
OrekitException - if the number of point is too small for interpolating


Copyright © 2017 CNES. All Rights Reserved.