public class LofOffset extends AbstractAttitudeLaw
The attitude provider is defined as a rotation offset from some local orbital frame.
Constructor and Description |
---|
LofOffset(Frame inertialFrameIn,
LOFType typeIn)
Create a LOF-aligned attitude.
|
LofOffset(Frame pInertialFrame,
LOFType typeIn,
RotationOrder order,
double alpha1,
double alpha2,
double alpha3)
Creates new instance.
|
LofOffset(LOFType typeIn)
Create a LOF-aligned attitude.
|
LofOffset(LOFType typeIn,
RotationOrder order,
double alpha1,
double alpha2,
double alpha3)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
Attitude |
getAttitude(PVCoordinatesProvider pvProv,
AbsoluteDate date,
Frame frame)
Compute the attitude corresponding to an orbital state.
|
getAttitude, getSpinDerivativesComputation, setSpinDerivativesComputation
public LofOffset(LOFType typeIn)
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.
typeIn
- type of Local Orbital Framepublic LofOffset(Frame inertialFrameIn, LOFType typeIn) throws PatriusException
Calling this constructor is equivalent to call
LofOffset(inertialFrame, LOFType, RotationOrder.XYZ, 0, 0, 0)
inertialFrameIn
- 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.typeIn
- type of Local Orbital FramePatriusException
- if inertialFrame is not a pseudo-inertial framepublic LofOffset(Frame pInertialFrame, LOFType typeIn, RotationOrder order, double alpha1, double alpha2, double alpha3) throws PatriusException
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
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]);
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.typeIn
- type of Local Orbital Frameorder
- order of rotations to use for (alpha1, alpha2, alpha3) compositionalpha1
- angle of the first elementary rotationalpha2
- angle of the second elementary rotationalpha3
- angle of the third elementary rotationPatriusException
- if inertialFrame is not a pseudo-inertial framepublic LofOffset(LOFType typeIn, RotationOrder order, double alpha1, double alpha2, double alpha3)
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
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]);
typeIn
- type of Local Orbital Frameorder
- order of rotations to use for (alpha1, alpha2, alpha3) compositionalpha1
- angle of the first elementary rotationalpha2
- angle of the second elementary rotationalpha3
- angle of the third elementary rotationpublic Attitude getAttitude(PVCoordinatesProvider pvProv, AbsoluteDate date, Frame frame) throws PatriusException
pvProv
- local position-velocity provider around current datedate
- current dateframe
- reference frame from which attitude is computedPatriusException
- if attitude cannot be computedCopyright © 2017 CNES. All rights reserved.