public abstract class AbstractCelestialBody extends Object implements CelestialBody
CelestialBody
interface.
This abstract implementation provides basic services that can be shared by most implementations of the
CelestialBody
interface. It holds the attraction coefficient and build the body-centered frames automatically
using the definitions of pole and prime meridianspecified by the IAU/IAG Working Group on Cartographic Coordinates
and Rotational Elements of the Planets and Satellites (WGCCRE).
IAUPole
,
Serialized FormModifier | Constructor and Description |
---|---|
protected |
AbstractCelestialBody(String nameIn,
double gmIn,
IAUPole iauPoleIn,
Frame definingFrameIn,
String inertialFrameName,
String bodyFrameName)
Build an instance and the underlying frame.
|
Modifier and Type | Method and Description |
---|---|
Frame |
getBodyOrientedFrame()
Get a body oriented, body centered frame.
|
double |
getGM()
Get the attraction coefficient of the body.
|
Frame |
getInertiallyOrientedFrame()
Get an inertially oriented, body centered frame.
|
String |
getName()
Get the name of the body.
|
abstract PVCoordinates |
getPVCoordinates(AbsoluteDate date,
Frame frame)
Get the
PVCoordinates of the body in the selected frame. |
protected AbstractCelestialBody(String nameIn, double gmIn, IAUPole iauPoleIn, Frame definingFrameIn, String inertialFrameName, String bodyFrameName)
nameIn
- name of the bodygmIn
- attraction coefficient (in m3/s2)iauPoleIn
- IAU pole implementationdefiningFrameIn
- frame in which celestial body coordinates are definedinertialFrameName
- name to use for inertially oriented body centered framebodyFrameName
- name to use for body oriented body centered framepublic String getName()
getName
in interface CelestialBody
public double getGM()
getGM
in interface CelestialBody
public Frame getInertiallyOrientedFrame()
The frame is always bound to the body center, and its axes have a fixed orientation with respect to other inertial frames.
getInertiallyOrientedFrame
in interface CelestialBody
CelestialBody.getBodyOrientedFrame()
public Frame getBodyOrientedFrame()
The frame is always bound to the body center, and its axes have a fixed orientation with respect to the celestial body.
getBodyOrientedFrame
in interface CelestialBody
CelestialBody.getInertiallyOrientedFrame()
public abstract PVCoordinates getPVCoordinates(AbsoluteDate date, Frame frame) throws PatriusException
PVCoordinates
of the body in the selected frame.getPVCoordinates
in interface PVCoordinatesProvider
date
- current dateframe
- the frame where to define the positionPatriusException
- if position cannot be computed in given frameCopyright © 2019 CNES. All Rights Reserved.