org.orekit.attitudes
Class Attitude

java.lang.Object
  extended by org.orekit.attitudes.Attitude
All Implemented Interfaces:
java.io.Serializable, TimeStamped

public class Attitude
extends java.lang.Object
implements TimeStamped, java.io.Serializable

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.

Version:
$Revision:1665 $ $Date:2008-06-11 12:12:59 +0200 (mer., 11 juin 2008) $
Author:
Véronique Pommier-Maurussane
See Also:
Orbit, Serialized Form

Constructor Summary
Attitude(AbsoluteDate date, Frame referenceFrame, org.apache.commons.math.geometry.Rotation attitude, org.apache.commons.math.geometry.Vector3D spin)
          Creates a new instance.
 
Method Summary
static org.apache.commons.math.geometry.Vector3D estimateSpin(org.apache.commons.math.geometry.Rotation start, org.apache.commons.math.geometry.Rotation end, double dt)
          Estimate spin between two orientations.
 AbsoluteDate getDate()
          Get the date of attitude parameters.
 Frame getReferenceFrame()
          Get the reference frame.
 org.apache.commons.math.geometry.Rotation getRotation()
          Get the attitude rotation.
 org.apache.commons.math.geometry.Vector3D getSpin()
          Get the satellite spin.
 Attitude shiftedBy(double dt)
          Get a time-shifted attitude.
 Attitude 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
 

Constructor Detail

Attitude

public Attitude(AbsoluteDate date,
                Frame referenceFrame,
                org.apache.commons.math.geometry.Rotation attitude,
                org.apache.commons.math.geometry.Vector3D spin)
Creates a new instance.

Parameters:
date - date at which attitude is defined
referenceFrame - reference frame from which attitude is defined
attitude - rotation between reference frame and satellite frame
spin - satellite spin (axis and velocity, in satellite frame)
Method Detail

estimateSpin

public static org.apache.commons.math.geometry.Vector3D estimateSpin(org.apache.commons.math.geometry.Rotation start,
                                                                     org.apache.commons.math.geometry.Rotation end,
                                                                     double dt)
Estimate spin between two orientations.

Estimation is based on a simple fixed rate rotation during the time interval between the two attitude.

Parameters:
start - start orientation
end - end orientation
dt - time elapsed between the dates of the two orientations
Returns:
spin allowing to go from start to end orientation

shiftedBy

public Attitude 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.

Parameters:
dt - time shift in seconds
Returns:
a new attitude, shifted with respect to the instance (which is immutable)
See Also:
AbsoluteDate.shiftedBy(double), PVCoordinates.shiftedBy(double), Orbit.shiftedBy(double), SpacecraftState.shiftedBy(double)

withReferenceFrame

public Attitude withReferenceFrame(Frame newReferenceFrame)
                            throws OrekitException
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
Throws:
OrekitException - if conversion between reference frames fails

getDate

public AbsoluteDate getDate()
Get the date of attitude parameters.

Specified by:
getDate in interface TimeStamped
Returns:
date of the attitude parameters

getReferenceFrame

public Frame getReferenceFrame()
Get the reference frame.

Returns:
referenceFrame reference frame from which attitude is defined.

getRotation

public org.apache.commons.math.geometry.Rotation getRotation()
Get the attitude rotation.

Returns:
attitude satellite rotation from reference frame.

getSpin

public org.apache.commons.math.geometry.Vector3D getSpin()
Get the satellite spin.

The spin vector is defined in satellite frame.

Returns:
spin satellite spin (axis and velocity).


Copyright © 2002-2010 CS Communication & Systèmes. All Rights Reserved.