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 |
---|---|
<T extends CalculusFieldElement<T>> |
getAttitude(FieldPVCoordinatesProvider<T> pvProv,
FieldAbsoluteDate<T> date,
Frame frame)
Compute the attitude corresponding to an orbital state.
|
Attitude |
getAttitude(PVCoordinatesProvider pvProv,
AbsoluteDate date,
Frame frame)
Compute the attitude corresponding to an orbital state.
|
public LofOffset(Frame inertialFrame, LOFType type)
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 Framepublic LofOffset(Frame inertialFrame, LOFType type, RotationOrder order, double alpha1, double alpha2, double alpha3)
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. So to retrieve the angles
provided here from the Hipparchus underlying rotation, one has to either use the
RotationConvention.VECTOR_OPERATOR
and revert the rotation, or
to use RotationConvention.FRAME_TRANSFORM
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.compose(alignedAtt.revert(), RotationConvention.VECTOR_OPERATOR); // note the call to revert and the conventions in the following statement double[] anglesV = offsetProper.revert().getAngles(order, RotationConvention.VECTOR_OPERATOR); System.out.format(Locale.US, "%f == %f%n", alpha1, anglesV[0]); System.out.format(Locale.US, "%f == %f%n", alpha2, anglesV[1]); System.out.format(Locale.US, "%f == %f%n", alpha3, anglesV[2]); // note the conventions in the following statement double[] anglesF = offsetProper.getAngles(order, RotationConvention.FRAME_TRANSFORM); System.out.format(Locale.US, "%f == %f%n", alpha1, anglesF[0]); System.out.format(Locale.US, "%f == %f%n", alpha2, anglesF[1]); System.out.format(Locale.US, "%f == %f%n", alpha3, anglesF[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 rotationpublic Attitude getAttitude(PVCoordinatesProvider pvProv, AbsoluteDate date, Frame frame)
getAttitude
in interface AttitudeProvider
pvProv
- local position-velocity provider around current datedate
- current dateframe
- reference frame from which attitude is computedpublic <T extends CalculusFieldElement<T>> FieldAttitude<T> getAttitude(FieldPVCoordinatesProvider<T> pvProv, FieldAbsoluteDate<T> date, Frame frame)
getAttitude
in interface AttitudeProvider
T
- type of the field elementspvProv
- local position-velocity provider around current datedate
- current dateframe
- reference frame from which attitude is computedCopyright © 2002-2022 CS GROUP. All rights reserved.