Package org.orekit.files.ccsds.ndm.adm
Class AttitudeEndpoints
java.lang.Object
org.orekit.files.ccsds.ndm.adm.AttitudeEndpoints
- All Implemented Interfaces:
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 attitudeview: attitude is always from external to spacecraft body
- Since:
- 11.0
- Author:
- Luc Maisonobe
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends CalculusFieldElement<T>>
FieldAttitude<T> build(Frame frame, FieldPVCoordinatesProvider<T> pvProv, TimeStampedFieldAngularCoordinates<T> rawAttitude) Build a filtered attitude.build(Frame frame, PVCoordinatesProvider pvProv, TimeStampedAngularCoordinates rawAttitude) Build a filtered attitude.voidcheckExternalFrame(Enum<?> aKey, Enum<?> bKey) Check external frame is properly initialized.voidcheckMandatoryEntriesExceptExternalFrame(double version, Enum<?> aKey, Enum<?> bKey, Enum<?> dirKey) Check is mandatory entries except external frame have been initialized.Get the external reference frame.Get the external frame.Get frame A.Get frame B.Get the mapping between a CCSDS frame and aFrame.Get the spacecraft body frame.booleanisA2b()booleanCheck if a endpoint is compatible with another one.booleanCheck if attitude is from external frame to spacecraft body frame.voidsetA2b(boolean a2b) Set rotation direction.voidsetFrameA(FrameFacade frameA) Set frame A.voidsetFrameB(FrameFacade frameB) Set frame B.toString()
-
Field Details
-
A2B
Constant for A → B diraction.- See Also:
-
B2A
Constant for A ← B direction.- See Also:
-
-
Constructor Details
-
AttitudeEndpoints
Simple constructor.- Parameters:
frameMapper- for creating aFrame.- Since:
- 13.1.5
-
-
Method Details
-
checkExternalFrame
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
Set frame A.- Parameters:
frameA- frame A
-
getFrameA
Get frame A.- Returns:
- frame A
-
setFrameB
Set frame B.- Parameters:
frameB- frame B
-
getFrameB
Get frame B.- Returns:
- frame B
-
setA2b
public void setA2b(boolean a2b) Set rotation direction. -
isA2b
public boolean isA2b() -
getExternalFrame
Get the external frame.- Returns:
- external frame
- See Also:
-
getFrameMapper
Get the mapping between a CCSDS frame and aFrame.- Returns:
- the frame mapper.
- Since:
- 13.1.5
-
getExternal
Get the external reference frame. Only the orientation is significant.- Returns:
- the external frame.
- Since:
- 13.1.5
- See Also:
-
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 entriesmust have been initialized properly to non-null values before this method is called, otherwiseNullPointerExceptionwill be thrown.- Returns:
- true if attitude is from external frame to spacecraft body frame
-
isCompatibleWith
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:
buildin 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:
buildin 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
-
toString
-