|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.orekit.attitudes.Attitude
public class Attitude
This class handles attitude definition at a given date.
This class represents the rotation from a reference frame to a "frame of interest", as well as its spin (axis and rotation rate).
The angular coordinates describe the orientation and angular velocity of the frame of interest in the reference frame.
Consequently, defining xSat_Rsat = Vector3D.PLUS_I, one can compute xSat_Rref = rot.applyTo(xSat_Rsat).
The state can be slightly shifted to close dates. This shift is based on a linear extrapolation for attitude taking the spin rate into account. It is not intended as a replacement for proper attitude propagation but should be sufficient for either small time shifts or coarse accuracy.
The instance Attitude
is guaranteed to be immutable.
Orbit
,
AttitudeProvider
,
Serialized FormConstructor Summary | |
---|---|
Attitude(AbsoluteDate date,
Frame referenceFrame,
AngularCoordinates orientation)
Creates a new instance. |
|
Attitude(AbsoluteDate date,
Frame referenceFrame,
Rotation attitude,
Vector3D spin)
Creates a new instance. |
|
Attitude(AbsoluteDate date,
Frame referenceFrame,
Rotation attitude,
Vector3D spin,
Vector3D acceleration)
Creates a new instance. |
|
Attitude(double[] y,
AbsoluteDate date,
Frame referenceFrame)
Creates a new instance from an array containing a quaternion and a spin vector. |
|
Attitude(Frame referenceFrame,
TimeStampedAngularCoordinates orientation)
Creates a new instance. |
Method Summary | |
---|---|
AbsoluteDate |
getDate()
Get the date of attitude parameters. |
TimeStampedAngularCoordinates |
getOrientation()
Get the complete orientation including spin and spin derivatives. |
Frame |
getReferenceFrame()
Get the reference frame. |
Rotation |
getRotation()
Get the attitude rotation. |
Vector3D |
getRotationAcceleration()
Get the satellite rotation acceleration. |
Vector3D |
getSpin()
Get the satellite spin. |
Attitude |
interpolate(AbsoluteDate interpolationDate,
Collection<Attitude> sample)
Get an interpolated instance. |
Attitude |
interpolate(AbsoluteDate interpolationDate,
Collection<Attitude> sample,
boolean computeSpinDerivatives)
Interpolates attitude. |
double[] |
mapAttitudeToArray()
Convert Attitude to state array. |
Attitude |
shiftedBy(double dt)
Get a time-shifted attitude. |
static Attitude |
slerp(AbsoluteDate date,
Attitude attitude1,
Attitude attitude2,
Frame frame,
boolean computeSpinDerivative)
The slerp interpolation method is efficient but is less accurate than the interpolate method. |
Attitude |
withReferenceFrame(Frame newReferenceFrame)
Get a similar attitude with a specific reference frame. |
Attitude |
withReferenceFrame(Frame newReferenceFrame,
boolean spinDerivativesComputation)
Get a similar attitude with a specific reference frame. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Attitude(Frame referenceFrame, TimeStampedAngularCoordinates orientation)
referenceFrame
- reference frame from which attitude is definedorientation
- complete orientation between reference frame and satellite frame,
including rotation rate and rotation accelerationpublic Attitude(AbsoluteDate date, Frame referenceFrame, AngularCoordinates orientation)
date
- date at which attitude is definedreferenceFrame
- reference frame from which attitude is definedorientation
- complete orientation from reference frame to the frame of interest, including rotation ratepublic Attitude(AbsoluteDate date, Frame referenceFrame, Rotation attitude, Vector3D spin, Vector3D acceleration)
date
- date at which attitude is definedreferenceFrame
- reference frame from which attitude is definedattitude
- rotation between reference frame and satellite framespin
- satellite spin (axis and velocity, in satellite frame)acceleration
- satellite rotation acceleration (in satellite frame)public Attitude(AbsoluteDate date, Frame referenceFrame, Rotation attitude, Vector3D spin)
date
- date at which attitude is definedreferenceFrame
- reference frame from which attitude is definedattitude
- rotation between reference frame and satellite framespin
- satellite spin (axis and velocity, in satellite frame)public Attitude(double[] y, AbsoluteDate date, Frame referenceFrame)
y
- attitude representation in the state vector (quaternion + spin vector)date
- date at which attitude is definedreferenceFrame
- reference frame from which attitude is definedMethod Detail |
---|
public Attitude shiftedBy(double dt)
The state can be slightly shifted to close dates. This shift is based on a linear extrapolation for attitude taking the spin rate into account. It is not intended as a replacement for proper attitude propagation but should be sufficient for either small time shifts or coarse accuracy. This method does not take into account the derivatives of spin: the new attitude does not contain the spin derivatives.
shiftedBy
in interface TimeShiftable<Attitude>
dt
- time shift in seconds
public final Attitude withReferenceFrame(Frame newReferenceFrame, boolean spinDerivativesComputation) throws OrekitException
If the instance reference frame is already the specified one, the instance itself is returned without any object
creation. Otherwise, a new instance will be created with the specified reference frame. In this case, the
required intermediate rotation and spin between the specified and the original reference frame will be inserted.
The spin derivatives are not transformed in the specified reference frame: the spinDerivatives attribute of the
new instance is null, unless the reference frame is already the specified one (in that case, the spinDerivatives
attribute itself is returned with the attitude).
newReferenceFrame
- desired reference frame for attitudespinDerivativesComputation
- true if spin derivatives should be computed. If not, spin derivative is set to null
OrekitException
- if conversion between reference frames failspublic final Attitude withReferenceFrame(Frame newReferenceFrame) throws OrekitException
If the instance reference frame is already the specified one, the instance itself is returned without any object
creation. Otherwise, a new instance will be created with the specified reference frame. In this case, the
required intermediate rotation and spin between the specified and the original reference frame will be inserted.
The spin derivatives are not transformed in the specified reference frame: the spinDerivatives attribute of the
new instance is null, unless the reference frame is already the specified one (in that case, the spinDerivatives
attribute itself is returned with the attitude).
Warning: spin derivative is not computed.
newReferenceFrame
- desired reference frame for attitude
OrekitException
- if conversion between reference frames failspublic final AbsoluteDate getDate()
getDate
in interface TimeStamped
public final Frame getReferenceFrame()
public TimeStampedAngularCoordinates getOrientation()
getRotation()
,
getSpin()
,
getRotationAcceleration()
public Rotation getRotation()
getOrientation()
,
getSpin()
public Vector3D getSpin()
The spin vector is defined in satellite frame.
getOrientation()
,
getRotation()
public Vector3D getRotationAcceleration() throws OrekitException
The rotation acceleration. vector is defined in satellite frame.
OrekitException
- is the rotation acceleration is not availablegetOrientation()
,
getRotation()
public Attitude interpolate(AbsoluteDate interpolationDate, Collection<Attitude> sample) throws OrekitException
Note that the state of the current instance may not be used in the interpolation process, only its type and non interpolable fields are used (for example central attraction coefficient or frame when interpolating orbits). The interpolable fields taken into account are taken only from the states of the sample points. So if the state of the instance must be used, the instance should be included in the sample points.
The interpolated instance is created by polynomial Hermite interpolation on Rodrigues vector ensuring rotation rate remains the exact derivative of rotation.
As this implementation of interpolation is polynomial, it should be used only with small samples (about 10-20 points) in order to avoid Runge's phenomenon and numerical problems (including NaN appearing).
Warning: spin derivative is not computed.
interpolate
in interface TimeInterpolable<Attitude>
interpolationDate
- interpolation datesample
- attitude samples
OrekitException
- if the sample points are inconsistentpublic Attitude interpolate(AbsoluteDate interpolationDate, Collection<Attitude> sample, boolean computeSpinDerivatives) throws OrekitException
The interpolated instance is created by polynomial Hermite interpolation on Rodrigues vector ensuring rotation rate remains the exact derivative of rotation.
As this implementation of interpolation is polynomial, it should be used only with small samples (about 10-20 points) in order to avoid Runge's phenomenon and numerical problems (including NaN appearing).
interpolationDate
- interpolation datesample
- attitude samplescomputeSpinDerivatives
- true if spin derivatives should be computed. If not, spin derivative is set to null
OrekitException
- thrown if interpolation failedpublic double[] mapAttitudeToArray()
public static Attitude slerp(AbsoluteDate date, Attitude attitude1, Attitude attitude2, Frame frame, boolean computeSpinDerivative) throws OrekitException
date
- the date to interpolateattitude1
- the Attitude
of the satellite at the previous dateattitude2
- the Attitude
of the satellite at the next dateframe
- the expression framecomputeSpinDerivative
- true if spin derivatives should be computed. If not, spin derivative is set to null
OrekitException
- if conversion between reference frames fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |