org.orekit.utils
public class AngularCoordinates extends Object implements TimeShiftable<AngularCoordinates>, Serializable
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.
This class is the angular counterpart to PVCoordinates
.
Instances of this class are guaranteed to be immutable.
Modifier and Type | Field and Description |
---|---|
static AngularCoordinates |
IDENTITY
Fixed orientation parallel with reference frame (identity rotation and zero rotation rate).
|
Constructor and Description |
---|
AngularCoordinates()
Simple constructor.
|
AngularCoordinates(Rotation rotation,
Vector3D rotationRate)
Builds a rotation/rotation rate pair.
|
Modifier and Type | Method and Description |
---|---|
AngularCoordinates |
addOffset(AngularCoordinates offset)
Add an offset from the instance.
|
static Vector3D |
estimateRate(Rotation start,
Rotation end,
double dt)
Estimate rotation rate between two orientations.
|
Rotation |
getRotation()
Get the rotation.
|
Vector3D |
getRotationRate()
Get the rotation rate.
|
static AngularCoordinates |
interpolate(AbsoluteDate date,
boolean useRotationRates,
Collection<Pair<AbsoluteDate,AngularCoordinates>> sample)
Interpolate angular coordinates.
|
AngularCoordinates |
revert()
Revert a rotation/rotation rate pair.
|
AngularCoordinates |
shiftedBy(double dt)
Get a time-shifted state.
|
AngularCoordinates |
subtractOffset(AngularCoordinates offset)
Subtract an offset from the instance.
|
public static final AngularCoordinates IDENTITY
public AngularCoordinates()
Sets the Coordinates to default : Identity (0 0 0).
public static Vector3D estimateRate(Rotation start, Rotation end, double dt)
Estimation is based on a simple fixed rate rotation during the time interval between the two orientations.
start
- start orientationend
- end orientationdt
- time elapsed between the dates of the two orientationspublic AngularCoordinates revert()
public AngularCoordinates shiftedBy(double dt)
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.
shiftedBy
in interface TimeShiftable<AngularCoordinates>
dt
- time shift in secondspublic Rotation getRotation()
public Vector3D getRotationRate()
public AngularCoordinates addOffset(AngularCoordinates offset)
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.
offset
- offset to subtractsubtractOffset(AngularCoordinates)
public AngularCoordinates subtractOffset(AngularCoordinates offset)
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.
offset
- offset to subtractaddOffset(AngularCoordinates)
public static AngularCoordinates interpolate(AbsoluteDate date, boolean useRotationRates, Collection<Pair<AbsoluteDate,AngularCoordinates>> sample)
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 time derivatives (rotation rates) 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.
date
- interpolation dateuseRotationRates
- if true, use sample points rotation rates,
otherwise ignore them and use only rotationssample
- sample points on which interpolation should be doneCopyright © 2002–2015 CS Syst?mes d'Information. All rights reserved.