Class FrameFacade

java.lang.Object
org.orekit.files.ccsds.definitions.FrameFacade

public class FrameFacade extends Object
Facade in front of several frames types in CCSDS messages.
Since:
11.0
Author:
Luc Maisonobe, Vincent Cucchietti
  • Constructor Details

    • FrameFacade

      public FrameFacade(Frame frame, CelestialBodyFrame celestialBodyFrame, OrbitRelativeFrame orbitRelativeFrame, SpacecraftBodyFrame spacecraftBodyFrame, String name)
      Simple constructor.

      At most one of celestialBodyFrame, orbitRelativeFrame or spacecraftBodyFrame may be non null. They may all be null if frame is unknown, in which case only the name will be available.

      Parameters:
      frame - reference to node in Orekit frames tree (may be null)
      celestialBodyFrame - reference to celestial body centered frame (may be null)
      orbitRelativeFrame - reference to orbit-relative frame (may be null)
      spacecraftBodyFrame - reference to spacecraft body frame (may be null)
      name - name of the frame
  • Method Details

    • asFrame

      public Frame asFrame()
      Get the associated frame tree node.
      Returns:
      associated frame tree node, or null if none exists
    • asCelestialBodyFrame

      public CelestialBodyFrame asCelestialBodyFrame()
      Get the associated celestial body frame.
      Returns:
      associated celestial body frame, or null if frame is associated to a orbit, a spacecraft or is not supported
    • asOrbitRelativeFrame

      public OrbitRelativeFrame asOrbitRelativeFrame()
      Get the associated orbit relative frame.
      Returns:
      associated orbit relative frame, or null if frame is associated to a celestial body, a spacecraft or is not supported
    • asSpacecraftBodyFrame

      public SpacecraftBodyFrame asSpacecraftBodyFrame()
      Get the associated spacecraft body frame.
      Returns:
      associated spacecraft body frame, or null if frame is associated to a celestial body, an orbit or is not supported
    • getName

      public String getName()
      Get the CCSDS name for the frame.
      Returns:
      CCSDS name
    • map

      public static FrameFacade map(Frame frame)
      Map an Orekit frame to a CCSDS frame facade.
      Parameters:
      frame - a reference frame.
      Returns:
      the CCSDS frame corresponding to the Orekit frame
    • parse

      public static FrameFacade parse(String name, IERSConventions conventions, boolean simpleEOP, DataContext dataContext, boolean allowCelestial, boolean allowOrbit, boolean allowSpacecraft)
      Simple constructor.
      Parameters:
      name - name of the frame
      conventions - IERS conventions to use
      simpleEOP - if true, tidal effects are ignored when interpolating EOP
      dataContext - to use when creating the frame
      allowCelestial - if true, CelestialBodyFrame are allowed
      allowOrbit - if true, OrbitRelativeFrame are allowed
      allowSpacecraft - if true, SpacecraftBodyFrame are allowed
      Returns:
      frame facade corresponding to the CCSDS name
    • getTransform

      public static Transform getTransform(FrameFacade frameIn, FrameFacade frameOut, Frame inertialPivotFrame, AbsoluteDate date, PVCoordinatesProvider pv)
      Get the transform between CCSDS frames.

      In case both input and output frames are orbit relative frame, the returned transform will only be composed of a rotation. Only commonly used orbit relative frames will be recognized.

      Note that if the input/output CCSDS frame is defined using a :

      then an exception will be thrown (currently not supported).

      Note that the pivot frame provided must be inertial and consistent to what you are working with (i.e GCRF if around Earth for example).

      Parameters:
      frameIn - the input CCSDS frame to convert from
      frameOut - the output CCSDS frame to convert to
      inertialPivotFrame - inertial frame used as a pivot to create the transform
      date - the date for the transform
      pv - the position and velocity coordinates provider (required in case one of the frames is an orbit relative frame)
      Returns:
      the transform between CCSDS frames.