public class LofOffset extends Object implements AttitudeProvider
The attitude provider is defined as a rotation offset from some local orbital frame.
Constructor and Description |
---|
LofOffset(Frame inertialFrame,
LOFType type)
Create a LOF-aligned attitude.
|
LofOffset(Frame inertialFrame,
LOFType type,
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.
|
public LofOffset(Frame inertialFrame, LOFType type) throws OrekitException
Calling this constructor is equivalent to call
LofOffset(inertialFrame, LOFType, RotationOrder.XYZ, 0, 0, 0)
inertialFrame
- inertial frame with respect to which orbit should be computedtype
- type of Local Orbital FrameOrekitException
- if inertialFrame is not a pseudo-inertial framepublic LofOffset(Frame inertialFrame, LOFType type, RotationOrder order, double alpha1, double alpha2, double alpha3) throws OrekitException
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]);
inertialFrame
- inertial frame with respect to which orbit should be computedtype
- 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 rotationOrekitException
- if inertialFrame is not a pseudo-inertial framepublic Attitude getAttitude(PVCoordinatesProvider pvProv, AbsoluteDate date, Frame frame) throws OrekitException
getAttitude
in interface AttitudeProvider
pvProv
- local position-velocity provider around current datedate
- current dateframe
- reference frame from which attitude is computedOrekitException
- if attitude cannot be computedCopyright © 2002-2015 CS Systèmes d'information. All rights reserved.