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 Form| Modifier | 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. |
String |
toString()
Returns a string representation of the body and its attributes.
|
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 CelestialBodypublic double getGM()
getGM in interface CelestialBodypublic 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 CelestialBodyCelestialBody.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 CelestialBodyCelestialBody.getInertiallyOrientedFrame()public abstract PVCoordinates getPVCoordinates(AbsoluteDate date, Frame frame) throws PatriusException
PVCoordinates of the body in the selected frame.getPVCoordinates in interface PVCoordinatesProviderdate - current dateframe - the frame where to define the positionPatriusException - if position cannot be computed in given framepublic String toString()
toString in interface CelestialBodytoString in class ObjectCopyright © 2021 CNES. All rights reserved.