Package org.orekit.attitudes
Class LofOffset
- java.lang.Object
-
- org.orekit.attitudes.LofOffset
-
- All Implemented Interfaces:
AttitudeProvider
,AttitudeRotationModel
,EventDetectorsProvider
,ParameterDriversProvider
public class LofOffset extends Object implements AttitudeProvider
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
-
-
Field Summary
-
Fields inherited from interface org.orekit.propagation.events.EventDetectorsProvider
DATATION_ACCURACY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends CalculusFieldElement<T>>
FieldAttitude<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.<T extends CalculusFieldElement<T>>
FieldRotation<T>getAttitudeRotation(FieldPVCoordinatesProvider<T> pvProv, FieldAbsoluteDate<T> date, Frame frame)
Compute the attitude-related rotation corresponding to an orbital state.Rotation
getAttitudeRotation(PVCoordinatesProvider pvProv, AbsoluteDate date, Frame frame)
Compute the attitude-related rotation corresponding to an orbital state.Frame
getInertialFrame()
Get the inertial frame.LOF
getLof()
Get the local orbital frame.Rotation
getOffset()
Get the rotational offset.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.orekit.attitudes.AttitudeProvider
getAttitudeRotation, getAttitudeRotation, getEventDetectors, getFieldEventDetectors, getParametersDrivers
-
Methods inherited from interface org.orekit.propagation.events.EventDetectorsProvider
getDateDetector, getEventDetectors, getFieldDateDetector, getFieldEventDetectors
-
Methods inherited from interface org.orekit.utils.ParameterDriversProvider
getNbParametersDriversValue, getParameterDriver, getParameters, getParameters, getParameters, getParameters, getParametersAllValues, getParametersAllValues, isSupported
-
-
-
-
Constructor Detail
-
LofOffset
public LofOffset(Frame inertialFrame, LOF lof)
Create a LOF-aligned attitude.Calling this constructor is equivalent to call
LofOffset(inertialFrame, LOF, RotationOrder.XYZ, 0, 0, 0)
- Parameters:
inertialFrame
- inertial frame with respect to which orbit should be computedlof
- local orbital frame
-
LofOffset
public LofOffset(Frame inertialFrame, LOF lof, RotationOrder order, double alpha1, double alpha2, double alpha3)
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. 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 useRotationConvention.FRAME_TRANSFORM
as in the following code snippet:LofOffset law = new LofOffset(inertial, LOF, order, alpha1, alpha2, alpha3); Rotation offsetAtt = law.getAttitude(orbit).getRotation(); Rotation alignedAtt = new LofOffset(inertial, LOF).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]);
- Parameters:
inertialFrame
- inertial frame with respect to which orbit should be computedlof
- 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 rotation
-
-
Method Detail
-
getLof
public LOF getLof()
Get the local orbital frame.- Returns:
- the local orbital frame.
-
getOffset
public Rotation getOffset()
Get the rotational offset.- Returns:
- the rotational offset.
-
getInertialFrame
public Frame getInertialFrame()
Get the inertial frame.- Returns:
- the inertial frame.
-
getAttitude
public Attitude getAttitude(PVCoordinatesProvider pvProv, AbsoluteDate date, Frame frame)
Compute the attitude corresponding to an orbital state.- Specified by:
getAttitude
in interfaceAttitudeProvider
- Parameters:
pvProv
- local position-velocity provider around current datedate
- current dateframe
- reference frame from which attitude is computed- Returns:
- attitude on the specified date and position-velocity state
-
getAttitude
public <T extends CalculusFieldElement<T>> FieldAttitude<T> getAttitude(FieldPVCoordinatesProvider<T> pvProv, FieldAbsoluteDate<T> date, Frame frame)
Compute the attitude corresponding to an orbital state.- Specified by:
getAttitude
in interfaceAttitudeProvider
- Type Parameters:
T
- type of the field elements- Parameters:
pvProv
- local position-velocity provider around current datedate
- current dateframe
- reference frame from which attitude is computed- Returns:
- attitude on the specified date and position-velocity state
-
getAttitudeRotation
public Rotation getAttitudeRotation(PVCoordinatesProvider pvProv, AbsoluteDate date, Frame frame)
Compute the attitude-related rotation corresponding to an orbital state.- Specified by:
getAttitudeRotation
in interfaceAttitudeProvider
- Parameters:
pvProv
- local position-velocity provider around current datedate
- current dateframe
- reference frame from which attitude is computed- Returns:
- attitude-related rotation on the specified date and position-velocity state
-
getAttitudeRotation
public <T extends CalculusFieldElement<T>> FieldRotation<T> getAttitudeRotation(FieldPVCoordinatesProvider<T> pvProv, FieldAbsoluteDate<T> date, Frame frame)
Compute the attitude-related rotation corresponding to an orbital state.- Specified by:
getAttitudeRotation
in interfaceAttitudeProvider
- Type Parameters:
T
- type of the field elements- Parameters:
pvProv
- local position-velocity provider around current datedate
- current dateframe
- reference frame from which attitude is computed- Returns:
- rotation on the specified date and position-velocity state
-
-