org.orekit.attitudes
Class LofOffset

java.lang.Object
  extended by org.orekit.attitudes.AbstractAttitudeLaw
      extended by org.orekit.attitudes.LofOffset
All Implemented Interfaces:
Serializable, AttitudeLaw, AttitudeProvider

public class LofOffset
extends AbstractAttitudeLaw

Attitude law defined by fixed Roll, Pitch and Yaw angles (in any order) with respect to a local orbital frame.

The attitude provider is defined as a rotation offset from some local orbital frame.

Author:
Véronique Pommier-Maurussane
See Also:
Serialized Form

Constructor Summary
LofOffset(Frame inertialFrame, LOFType type)
          Create a LOF-aligned attitude.
LofOffset(Frame pInertialFrame, LOFType type, RotationOrder order, double alpha1, double alpha2, double alpha3)
          Creates new instance.
LofOffset(LOFType type)
          Create a LOF-aligned attitude.
LofOffset(LOFType type, RotationOrder order, double alpha1, double alpha2, double alpha3)
          Creates new instance.
 
Method Summary
 Attitude getAttitude(PVCoordinatesProvider pvProv, AbsoluteDate date, Frame frame)
          Compute the attitude corresponding to an orbital state.
 
Methods inherited from class org.orekit.attitudes.AbstractAttitudeLaw
getAttitude, getSpinDerivativesComputation, setSpinDerivativesComputation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LofOffset

public LofOffset(LOFType type)
Create a LOF-aligned attitude.

Calling this constructor is equivalent to call LofOffset(FramesFactory.getGCRF(), LOFType, RotationOrder.XYZ, 0, 0, 0).

The GCRF frame is used as pivot in the transformation from an actual frame to the local orbital frame.

Parameters:
type - type of Local Orbital Frame

LofOffset

public LofOffset(Frame inertialFrame,
                 LOFType type)
          throws OrekitException
Create a LOF-aligned attitude.

Calling this constructor is equivalent to call LofOffset(inertialFrame, LOFType, RotationOrder.XYZ, 0, 0, 0)

Parameters:
inertialFrame - inertial frame with respect to which orbit should be computed. This frame is the pivot in the transformation from an actual frame to the local orbital frame.
type - type of Local Orbital Frame
Throws:
OrekitException - if inertialFrame is not a pseudo-inertial frame

LofOffset

public LofOffset(Frame pInertialFrame,
                 LOFType type,
                 RotationOrder order,
                 double alpha1,
                 double alpha2,
                 double alpha3)
          throws OrekitException
Creates new instance.

An important thing to note is that the rotation order and angles signs used here are compliant with an attitude definition, i.e. they correspond to a frame that rotate in a field of fixed vectors. The underlying definitions used in commons-math Rotation(RotationOrder, double, double, double) use reversed definition, i.e. they correspond to a vectors field rotating with respect to a fixed frame. So to retrieve the angles provided here from the commons-math underlying rotation, one has to revert the rotation, as in the following code snippet:

 LofOffset law = new LofOffset(inertial, lofType, order, alpha1, alpha2, alpha3);
 Rotation offsetAtt = law.getAttitude(orbit).getRotation();
 Rotation alignedAtt = new LofOffset(inertial, lofType).getAttitude(orbit).getRotation();
 Rotation offsetProper = offsetAtt.applyTo(alignedAtt.revert());

 // note the call to revert in the following statement
 double[] angles = offsetProper.revert().getAngles(order);

 System.out.println(alpha1 + " == " + angles[0]);
 System.out.println(alpha2 + " == " + angles[1]);
 System.out.println(alpha3 + " == " + angles[2]);
 

Parameters:
pInertialFrame - inertial frame with respect to which orbit should be computed. This frame is the pivot in the transformation from the actual frame to the local orbital frame.
type - type of Local Orbital Frame
order - order of rotations to use for (alpha1, alpha2, alpha3) composition
alpha1 - angle of the first elementary rotation
alpha2 - angle of the second elementary rotation
alpha3 - angle of the third elementary rotation
Throws:
OrekitException - if inertialFrame is not a pseudo-inertial frame

LofOffset

public LofOffset(LOFType type,
                 RotationOrder order,
                 double alpha1,
                 double alpha2,
                 double alpha3)
Creates new instance.

The GCRF frame is used as pivot in the transformation from an actual frame to the local orbital frame.

An important thing to note is that the rotation order and angles signs used here are compliant with an attitude definition, i.e. they correspond to a frame that rotate in a field of fixed vectors. The underlying definitions used in commons-math Rotation(RotationOrder, double, double, double) use reversed definition, i.e. they correspond to a vectors field rotating with respect to a fixed frame. So to retrieve the angles provided here from the commons-math underlying rotation, one has to revert the rotation, as in the following code snippet:

 LofOffset law = new LofOffset(inertial, lofType, order, alpha1, alpha2, alpha3);
 Rotation offsetAtt = law.getAttitude(orbit).getRotation();
 Rotation alignedAtt = new LofOffset(inertial, lofType).getAttitude(orbit).getRotation();
 Rotation offsetProper = offsetAtt.applyTo(alignedAtt.revert());

 // note the call to revert in the following statement
 double[] angles = offsetProper.revert().getAngles(order);

 System.out.println(alpha1 + " == " + angles[0]);
 System.out.println(alpha2 + " == " + angles[1]);
 System.out.println(alpha3 + " == " + angles[2]);
 

Parameters:
type - type of Local Orbital Frame
order - order of rotations to use for (alpha1, alpha2, alpha3) composition
alpha1 - angle of the first elementary rotation
alpha2 - angle of the second elementary rotation
alpha3 - angle of the third elementary rotation
Method Detail

getAttitude

public Attitude getAttitude(PVCoordinatesProvider pvProv,
                            AbsoluteDate date,
                            Frame frame)
                     throws OrekitException
Compute the attitude corresponding to an orbital state.

Parameters:
pvProv - local position-velocity provider around current date
date - current date
frame - reference frame from which attitude is computed
Returns:
attitude attitude on the specified date and position-velocity state
Throws:
OrekitException - if attitude cannot be computed


Copyright © 2016 CNES. All Rights Reserved.