Class FieldAttitude<T extends org.hipparchus.RealFieldElement<T>>
- java.lang.Object
-
- org.orekit.attitudes.FieldAttitude<T>
-
- All Implemented Interfaces:
FieldTimeInterpolable<FieldAttitude<T>,T>
,FieldTimeShiftable<FieldAttitude<T>,T>
,FieldTimeStamped<T>
public class FieldAttitude<T extends org.hipparchus.RealFieldElement<T>> extends Object implements FieldTimeStamped<T>, FieldTimeShiftable<FieldAttitude<T>,T>, FieldTimeInterpolable<FieldAttitude<T>,T>
This class handles attitude definition at a given date.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.- Author:
- Véronique Pommier-Maurussane
- See Also:
Orbit
,AttitudeProvider
-
-
Constructor Summary
Constructors Constructor Description FieldAttitude(org.hipparchus.Field<T> field, Attitude attitude)
Builds an instance for a regularAttitude
.FieldAttitude(Frame referenceFrame, TimeStampedFieldAngularCoordinates<T> orientation)
Creates a new instance.FieldAttitude(FieldAbsoluteDate<T> date, Frame referenceFrame, org.hipparchus.geometry.euclidean.threed.FieldRotation<T> attitude, org.hipparchus.geometry.euclidean.threed.FieldVector3D<T> spin, org.hipparchus.geometry.euclidean.threed.FieldVector3D<T> acceleration)
Creates a new instance.FieldAttitude(FieldAbsoluteDate<T> date, Frame referenceFrame, org.hipparchus.geometry.euclidean.threed.Rotation attitude, org.hipparchus.geometry.euclidean.threed.Vector3D spin, org.hipparchus.geometry.euclidean.threed.Vector3D acceleration, org.hipparchus.Field<T> field)
Creates a new instance.FieldAttitude(FieldAbsoluteDate<T> date, Frame referenceFrame, FieldAngularCoordinates<T> orientation)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FieldAbsoluteDate<T>
getDate()
Get the date of attitude parameters.TimeStampedFieldAngularCoordinates<T>
getOrientation()
Get the complete orientation including spin.Frame
getReferenceFrame()
Get the reference frame.org.hipparchus.geometry.euclidean.threed.FieldRotation<T>
getRotation()
Get the attitude rotation.org.hipparchus.geometry.euclidean.threed.FieldVector3D<T>
getRotationAcceleration()
Get the satellite rotation acceleration.org.hipparchus.geometry.euclidean.threed.FieldVector3D<T>
getSpin()
Get the satellite spin.FieldAttitude<T>
interpolate(FieldAbsoluteDate<T> interpolationDate, Stream<FieldAttitude<T>> sample)
Get an interpolated instance.FieldAttitude<T>
shiftedBy(double dt)
Get a time-shifted attitude.FieldAttitude<T>
shiftedBy(T dt)
Get a time-shifted attitude.Attitude
toAttitude()
Converts to an Attitude instance.FieldAttitude<T>
withReferenceFrame(Frame newReferenceFrame)
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
-
Methods inherited from interface org.orekit.time.FieldTimeInterpolable
interpolate
-
-
-
-
Constructor Detail
-
FieldAttitude
public FieldAttitude(Frame referenceFrame, TimeStampedFieldAngularCoordinates<T> orientation)
Creates a new instance.- Parameters:
referenceFrame
- reference frame from which attitude is definedorientation
- complete orientation between reference frame and satellite frame, including rotation rate
-
FieldAttitude
public FieldAttitude(FieldAbsoluteDate<T> date, Frame referenceFrame, FieldAngularCoordinates<T> orientation)
Creates a new instance.- Parameters:
date
- date at which attitude is definedreferenceFrame
- reference frame from which attitude is definedorientation
- complete orientation between reference frame and satellite frame, including rotation rate
-
FieldAttitude
public FieldAttitude(FieldAbsoluteDate<T> date, Frame referenceFrame, org.hipparchus.geometry.euclidean.threed.FieldRotation<T> attitude, org.hipparchus.geometry.euclidean.threed.FieldVector3D<T> spin, org.hipparchus.geometry.euclidean.threed.FieldVector3D<T> acceleration)
Creates a new instance.- Parameters:
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)
-
FieldAttitude
public FieldAttitude(FieldAbsoluteDate<T> date, Frame referenceFrame, org.hipparchus.geometry.euclidean.threed.Rotation attitude, org.hipparchus.geometry.euclidean.threed.Vector3D spin, org.hipparchus.geometry.euclidean.threed.Vector3D acceleration, org.hipparchus.Field<T> field)
Creates a new instance.- Parameters:
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)field
- field used by default
-
-
Method Detail
-
shiftedBy
public FieldAttitude<T> shiftedBy(double dt)
Get a time-shifted attitude.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.
- Specified by:
shiftedBy
in interfaceFieldTimeShiftable<FieldAttitude<T extends org.hipparchus.RealFieldElement<T>>,T extends org.hipparchus.RealFieldElement<T>>
- Parameters:
dt
- time shift in seconds- Returns:
- a new attitude, shifted with respect to the instance (which is immutable)
-
shiftedBy
public FieldAttitude<T> shiftedBy(T dt)
Get a time-shifted attitude.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.
- Specified by:
shiftedBy
in interfaceFieldTimeShiftable<FieldAttitude<T extends org.hipparchus.RealFieldElement<T>>,T extends org.hipparchus.RealFieldElement<T>>
- Parameters:
dt
- time shift in seconds- Returns:
- a new attitude, shifted with respect to the instance (which is immutable)
-
withReferenceFrame
public FieldAttitude<T> withReferenceFrame(Frame newReferenceFrame)
Get a similar attitude with a specific reference frame.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.
- Parameters:
newReferenceFrame
- desired reference frame for attitude- Returns:
- an attitude that has the same orientation and motion as the instance, but guaranteed to have the specified reference frame
-
getDate
public FieldAbsoluteDate<T> getDate()
Get the date of attitude parameters.- Specified by:
getDate
in interfaceFieldTimeStamped<T extends org.hipparchus.RealFieldElement<T>>
- Returns:
- date of the attitude parameters
-
getReferenceFrame
public Frame getReferenceFrame()
Get the reference frame.- Returns:
- referenceFrame reference frame from which attitude is defined.
-
getOrientation
public TimeStampedFieldAngularCoordinates<T> getOrientation()
Get the complete orientation including spin.- Returns:
- complete orientation including spin
- See Also:
getRotation()
,getSpin()
-
getRotation
public org.hipparchus.geometry.euclidean.threed.FieldRotation<T> getRotation()
Get the attitude rotation.- Returns:
- attitude satellite rotation from reference frame.
- See Also:
getOrientation()
,getSpin()
-
getSpin
public org.hipparchus.geometry.euclidean.threed.FieldVector3D<T> getSpin()
Get the satellite spin.The spin vector is defined in satellite frame.
- Returns:
- spin satellite spin (axis and velocity).
- See Also:
getOrientation()
,getRotation()
-
getRotationAcceleration
public org.hipparchus.geometry.euclidean.threed.FieldVector3D<T> getRotationAcceleration()
Get the satellite rotation acceleration.The rotation acceleration. vector is defined in satellite frame.
- Returns:
- rotation acceleration
- See Also:
getOrientation()
,getRotation()
-
interpolate
public FieldAttitude<T> interpolate(FieldAbsoluteDate<T> interpolationDate, Stream<FieldAttitude<T>> sample)
Get an interpolated instance.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).
- Specified by:
interpolate
in interfaceFieldTimeInterpolable<FieldAttitude<T extends org.hipparchus.RealFieldElement<T>>,T extends org.hipparchus.RealFieldElement<T>>
- Parameters:
interpolationDate
- interpolation datesample
- sample points on which interpolation should be done- Returns:
- a new instance, interpolated at specified date
-
toAttitude
public Attitude toAttitude()
Converts to an Attitude instance.- Returns:
- Attitude with same properties
-
-