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
  • Field Details

  • Constructor Details

    • AttitudeEndpoints

      public AttitudeEndpoints(CcsdsFrameMapper frameMapper)
      Simple constructor.
      Parameters:
      frameMapper - for creating a Frame.
      Since:
      13.1.5
  • Method Details

    • checkExternalFrame

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

      Parameters:
      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.
      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.
      Parameters:
      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.
      Returns:
      true if rotation direction is from frame A to frame B
    • getExternalFrame

      public FrameFacade getExternalFrame()
      Get the external frame.
      Returns:
      external frame
      See Also:
    • getFrameMapper

      public CcsdsFrameMapper getFrameMapper()
      Get the mapping between a CCSDS frame and a Frame.
      Returns:
      the frame mapper.
      Since:
      13.1.5
    • getExternal

      public Frame getExternal()
      Get the external reference frame. Only the orientation is significant.
      Returns:
      the external frame.
      Since:
      13.1.5
      See Also:
    • 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, otherwise NullPointerException 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 interface AttitudeBuilder
      Parameters:
      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
      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 interface AttitudeBuilder
      Type Parameters:
      T - the type of the field elements
      Parameters:
      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
      Returns:
      filtered attitude
    • toString

      public String toString()
      Overrides:
      toString in class Object