Package org.orekit.files.ccsds.ndm.adm
Class AttitudeEndpoints
- java.lang.Object
-
- org.orekit.files.ccsds.ndm.adm.AttitudeEndpoints
-
- All Implemented Interfaces:
AttitudeBuilder
public class AttitudeEndpoints extends Object implements AttitudeBuilder
Endpoints for attitude definition.This class provides a bridge between two different views of attitude definition. In both views, there is an external frame, based on either celestial body or orbit-relative and there is a spacecraft body frame.
- CCSDS ADM view: frames are labeled as A and B but nothing tells which is which and attitude can be defined in any direction
Orekit attitude
view: attitude is always from external to spacecraft body
- Since:
- 11.0
- Author:
- Luc Maisonobe
-
-
Constructor Summary
Constructors Constructor Description AttitudeEndpoints()
Empty constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends CalculusFieldElement<T>>
FieldAttitude<T>build(Frame frame, FieldPVCoordinatesProvider<T> pvProv, TimeStampedFieldAngularCoordinates<T> rawAttitude)
Build a filtered attitude.Attitude
build(Frame frame, PVCoordinatesProvider pvProv, TimeStampedAngularCoordinates rawAttitude)
Build a filtered attitude.void
checkExternalFrame(Enum<?> aKey, Enum<?> bKey)
Check external frame is properly initialized.void
checkMandatoryEntriesExceptExternalFrame(double version, Enum<?> aKey, Enum<?> bKey, Enum<?> dirKey)
Check is mandatory entries except external frame have been initialized.FrameFacade
getExternalFrame()
Get the external frame.FrameFacade
getFrameA()
Get frame A.FrameFacade
getFrameB()
Get frame B.FrameFacade
getSpacecraftBodyFrame()
Get the spacecraft body frame.boolean
isA2b()
boolean
isCompatibleWith(AttitudeEndpoints other)
Check if a endpoint is compatible with another one.boolean
isExternal2SpacecraftBody()
Check if attitude is from external frame to spacecraft body frame.void
setA2b(boolean a2b)
Set rotation direction.void
setFrameA(FrameFacade frameA)
Set frame A.void
setFrameB(FrameFacade frameB)
Set frame B.String
toString()
-
-
-
Field Detail
-
A2B
public static final String A2B
Constant for A → B diraction.- See Also:
- Constant Field Values
-
B2A
public static final String B2A
Constant for A ← B direction.- See Also:
- Constant Field Values
-
-
Method Detail
-
checkExternalFrame
public void checkExternalFrame(Enum<?> aKey, Enum<?> bKey)
Check external frame is properly initialized.- Parameters:
aKey
- key for frame AbKey
- key for frame B
-
checkMandatoryEntriesExceptExternalFrame
public void checkMandatoryEntriesExceptExternalFrame(double version, Enum<?> aKey, Enum<?> bKey, Enum<?> dirKey)
Check is mandatory entries except external frame have been initialized.Either frame A or frame B must be initialized with a
spacecraft body frame
.This method should throw an exception if some mandatory entry is missing
- Parameters:
version
- format versionaKey
- key for frame AbKey
- key for frame BdirKey
- key for direction
-
setFrameA
public void setFrameA(FrameFacade frameA)
Set frame A.- Parameters:
frameA
- frame A
-
getFrameA
public FrameFacade getFrameA()
Get frame A.- Returns:
- frame A
-
setFrameB
public void setFrameB(FrameFacade frameB)
Set frame B.- Parameters:
frameB
- frame B
-
getFrameB
public FrameFacade getFrameB()
Get frame B.- Returns:
- frame B
-
setA2b
public void setA2b(boolean a2b)
Set rotation direction.
-
getExternalFrame
public FrameFacade getExternalFrame()
Get the external frame.- Returns:
- external frame
-
getSpacecraftBodyFrame
public FrameFacade getSpacecraftBodyFrame()
Get the spacecraft body frame.- Returns:
- spacecraft body frame
-
isExternal2SpacecraftBody
public boolean isExternal2SpacecraftBody()
Check if attitude is from external frame to spacecraft body frame.Mandatory entries
must have been initialized properly to non-null values before this method is called, otherwiseNullPointerException
will be thrown.- Returns:
- true if attitude is from external frame to spacecraft body frame
-
isCompatibleWith
public boolean isCompatibleWith(AttitudeEndpoints other)
Check if a endpoint is compatible with another one.Endpoins are compatible if they refer o the same frame names, in the same order and in the same direction.
- Parameters:
other
- other endpoints to check against- Returns:
- true if both endpoints are compatible with each other
-
build
public Attitude build(Frame frame, PVCoordinatesProvider pvProv, TimeStampedAngularCoordinates rawAttitude)
Build a filtered attitude.- Specified by:
build
in interfaceAttitudeBuilder
- Parameters:
frame
- reference frame with respect to which attitude must be definedpvProv
- provider for spacecraft position and velocityrawAttitude
- raw rotation/rotation rate/rotation acceleration- Returns:
- filtered attitude
-
build
public <T extends CalculusFieldElement<T>> FieldAttitude<T> build(Frame frame, FieldPVCoordinatesProvider<T> pvProv, TimeStampedFieldAngularCoordinates<T> rawAttitude)
Build a filtered attitude.- Specified by:
build
in interfaceAttitudeBuilder
- Type Parameters:
T
- the type of the field elements- Parameters:
frame
- reference frame with respect to which attitude must be definedpvProv
- provider for spacecraft position and velocityrawAttitude
- raw rotation/rotation rate/rotation acceleration- Returns:
- filtered attitude
-
-