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 Summary
Constructors Constructor Description FrameFacade(Frame frame, CelestialBodyFrame celestialBodyFrame, OrbitRelativeFrame orbitRelativeFrame, SpacecraftBodyFrame spacecraftBodyFrame, String name)
Simple constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CelestialBodyFrame
asCelestialBodyFrame()
Get the associatedcelestial body frame
.Frame
asFrame()
Get the associated frame tree node.OrbitRelativeFrame
asOrbitRelativeFrame()
Get the associatedorbit relative frame
.SpacecraftBodyFrame
asSpacecraftBodyFrame()
Get the associatedspacecraft body frame
.String
getName()
Get the CCSDS name for the frame.static Transform
getTransform(FrameFacade frameIn, FrameFacade frameOut, Frame inertialPivotFrame, AbsoluteDate date, PVCoordinatesProvider pv)
Get the transform betweenCCSDS frames
.static FrameFacade
map(Frame frame)
Map an Orekit frame to a CCSDS frame facade.static FrameFacade
parse(String name, IERSConventions conventions, boolean simpleEOP, DataContext dataContext, boolean allowCelestial, boolean allowOrbit, boolean allowSpacecraft)
Simple constructor.
-
-
-
Constructor Detail
-
FrameFacade
public FrameFacade(Frame frame, CelestialBodyFrame celestialBodyFrame, OrbitRelativeFrame orbitRelativeFrame, SpacecraftBodyFrame spacecraftBodyFrame, String name)
Simple constructor.At most one of
celestialBodyFrame
,orbitRelativeFrame
orspacecraftBodyFrame
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 Detail
-
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 associatedcelestial body frame
.- Returns:
- associated celestial body frame, or null if frame is associated to a
orbit
, aspacecraft
or is not supported
-
asOrbitRelativeFrame
public OrbitRelativeFrame asOrbitRelativeFrame()
Get the associatedorbit relative frame
.- Returns:
- associated orbit relative frame, or null if frame is associated to a
celestial body
, aspacecraft
or is not supported
-
asSpacecraftBodyFrame
public SpacecraftBodyFrame asSpacecraftBodyFrame()
Get the associatedspacecraft body frame
.- Returns:
- associated spacecraft body frame, or null if frame is associated to a
celestial body
, anorbit
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 frameconventions
- IERS conventions to usesimpleEOP
- if true, tidal effects are ignored when interpolating EOPdataContext
- to use when creating the frameallowCelestial
- if true,CelestialBodyFrame
are allowedallowOrbit
- if true,OrbitRelativeFrame
are allowedallowSpacecraft
- 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 betweenCCSDS frames
.In case both input and output frames are
orbit relative frame
, the returned transform will only be composed of arotation
. Onlycommonly used orbit relative frames
will be recognized.Note that if the input/output
then an exception will be thrown (currently not supported).CCSDS frame
is defined using a :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 inputCCSDS frame
to convert fromframeOut
- the outputCCSDS frame
to convert toinertialPivotFrame
- inertial frame used as a pivot to create the transformdate
- the date for the transformpv
- the position and velocity coordinates provider (required in case one of the frames is anorbit relative frame
)- Returns:
- the transform between
CCSDS frames
.
-
-