Class AttitudeEndpoints

  • All Implemented Interfaces:

    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
    Luc Maisonobe
    • Constructor Detail

      • AttitudeEndpoints

        public AttitudeEndpoints()
        Empty constructor.

        This constructor is not strictly necessary, but it prevents spurious javadoc warnings with JDK 18 and later.

    • Method Detail

      • checkExternalFrame

        public void checkExternalFrame​(Enum<?> aKey,
                                       Enum<?> bKey)
        Check external frame is properly initialized.
        aKey - key for frame A
        bKey - 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

        version - format version
        aKey - key for frame A
        bKey - key for frame B
        dirKey - key for direction
      • setFrameA

        public void setFrameA​(FrameFacade frameA)
        Set frame A.
        frameA - frame A
      • getFrameA

        public FrameFacade getFrameA()
        Get frame A.
        frame A
      • setFrameB

        public void setFrameB​(FrameFacade frameB)
        Set frame B.
        frameB - frame B
      • getFrameB

        public FrameFacade getFrameB()
        Get frame B.
        frame B
      • setA2b

        public void setA2b​(boolean a2b)
        Set rotation direction.
        a2b - if true, rotation is from frame A to frame B
      • isA2b

        public boolean isA2b()
        Check if rotation direction is from frame A to frame B.
        true if rotation direction is from frame A to frame B
      • getExternalFrame

        public FrameFacade getExternalFrame()
        Get the external frame.
        external frame
      • getSpacecraftBodyFrame

        public FrameFacade getSpacecraftBodyFrame()
        Get the spacecraft body frame.
        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, otherwise NullPointerException will be thrown.

        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.

        other - other endpoints to check against
        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 interface AttitudeBuilder
        frame - reference frame with respect to which attitude must be defined
        pvProv - provider for spacecraft position and velocity
        rawAttitude - raw rotation/rotation rate/rotation acceleration
        filtered attitude