public class Attitude extends Object implements TimeStamped, TimeShiftable<Attitude>, TimeInterpolable<Attitude>, Serializable
This class represents the rotation between a reference frame and the satellite frame, as well as the spin of the satellite (axis and rotation rate).
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 and Description |
---|
Attitude(AbsoluteDate date,
Frame referenceFrame,
AngularCoordinates orientation)
Creates a new instance.
|
Attitude(AbsoluteDate date,
Frame referenceFrame,
org.hipparchus.geometry.euclidean.threed.Rotation attitude,
org.hipparchus.geometry.euclidean.threed.Vector3D spin,
org.hipparchus.geometry.euclidean.threed.Vector3D acceleration)
Creates a new instance.
|
Attitude(Frame referenceFrame,
TimeStampedAngularCoordinates orientation)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
AbsoluteDate |
getDate()
Get the date of attitude parameters.
|
TimeStampedAngularCoordinates |
getOrientation()
Get the complete orientation including spin.
|
Frame |
getReferenceFrame()
Get the reference frame.
|
org.hipparchus.geometry.euclidean.threed.Rotation |
getRotation()
Get the attitude rotation.
|
org.hipparchus.geometry.euclidean.threed.Vector3D |
getRotationAcceleration()
Get the satellite rotation acceleration.
|
org.hipparchus.geometry.euclidean.threed.Vector3D |
getSpin()
Get the satellite spin.
|
Attitude |
interpolate(AbsoluteDate interpolationDate,
Stream<Attitude> sample)
Get an interpolated instance.
|
Attitude |
shiftedBy(double dt)
Get a time-shifted attitude.
|
Attitude |
withReferenceFrame(Frame newReferenceFrame)
Get a similar attitude with a specific reference frame.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
interpolate
public Attitude(Frame referenceFrame, TimeStampedAngularCoordinates orientation)
referenceFrame
- reference frame from which attitude is definedorientation
- complete orientation between reference frame and satellite frame,
including rotation ratepublic Attitude(AbsoluteDate date, Frame referenceFrame, AngularCoordinates orientation)
date
- date at which attitude is definedreferenceFrame
- reference frame from which attitude is definedorientation
- complete orientation between reference frame and satellite frame,
including rotation ratepublic Attitude(AbsoluteDate date, Frame referenceFrame, org.hipparchus.geometry.euclidean.threed.Rotation attitude, org.hipparchus.geometry.euclidean.threed.Vector3D spin, org.hipparchus.geometry.euclidean.threed.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 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.
shiftedBy
in interface TimeShiftable<Attitude>
dt
- time shift in secondspublic 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.
newReferenceFrame
- desired reference frame for attitudeOrekitException
- if conversion between reference frames failspublic AbsoluteDate getDate()
getDate
in interface TimeStamped
public Frame getReferenceFrame()
public TimeStampedAngularCoordinates getOrientation()
getRotation()
,
getSpin()
public org.hipparchus.geometry.euclidean.threed.Rotation getRotation()
getOrientation()
,
getSpin()
public org.hipparchus.geometry.euclidean.threed.Vector3D getSpin()
The spin vector is defined in satellite frame.
getOrientation()
,
getRotation()
public org.hipparchus.geometry.euclidean.threed.Vector3D getRotationAcceleration()
The rotation acceleration. vector is defined in satellite frame.
getOrientation()
,
getRotation()
public Attitude interpolate(AbsoluteDate interpolationDate, Stream<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.
Note that this method is designed for small samples only (say up to about 10-20 points) so it can be implemented using polynomial interpolation (typically Hermite interpolation). Using too much points may induce Runge's phenomenon and numerical problems (including NaN appearing).
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).
interpolate
in interface TimeInterpolable<Attitude>
interpolationDate
- interpolation datesample
- sample points on which interpolation should be doneOrekitException
- if the number of point is too small for interpolatingCopyright © 2002-2017 CS Systèmes d'information. All rights reserved.