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 gravitational attraction coefficient and build the body-centered frames
automatically using the definitions of pole and prime meridian specified by the IAU/IAG Working Group on Cartographic
Coordinates and Rotational Elements of the Planets and Satellites (WGCCRE).
IAUPole
,
Serialized FormModifier and Type | Field and Description |
---|---|
static String |
EME2000_FRAME_NAME
EME2000 frame name.
|
static String |
ICRF_FRAME_NAME
ICRF frame name.
|
static String |
INERTIAL_FRAME_CONSTANT_MODEL
Constant (equator) inertial, body-centered frame name.
|
static String |
INERTIAL_FRAME_MEAN_MODEL
Mean (equator) inertial, body-centered frame name.
|
static String |
INERTIAL_FRAME_TRUE_MODEL
True (equator) inertial, body-centered frame name.
|
static String |
ROTATING_FRAME_CONSTANT_MODEL
Constant rotating, body-centered frame name.
|
static String |
ROTATING_FRAME_MEAN_MODEL
Mean rotating, body-centered frame name.
|
static String |
ROTATING_FRAME_TRUE_MODEL
True rotating, body-centered frame name.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractCelestialBody(CelestialBodyFrame icrf,
String nameIn,
GravityModel gravityModelIn,
IAUPole iauPoleIn)
Build an instance and the underlying frame.
|
protected |
AbstractCelestialBody(String nameIn,
double gmIn,
IAUPole iauPoleIn,
Frame parentFrame)
Build an instance and the underlying frame.
|
protected |
AbstractCelestialBody(String nameIn,
GravityModel gravityModelIn,
IAUPole iauPoleIn,
Frame parentFrame)
Build an instance and the underlying frame.
|
Modifier and Type | Method and Description |
---|---|
CelestialBodyFrame |
getEME2000()
Get an EME2000, body centered frame.
|
CelestialBodyEphemeris |
getEphemeris()
Get the ephemeris of the body.
|
double |
getGM()
Get the central attraction coefficient of the body.
|
GravityModel |
getGravityModel()
Get the gravitational attraction model of the body.
|
IAUPole |
getIAUPole()
Get the IAU pole and primer meridians orientation.
|
CelestialBodyFrame |
getICRF()
Get an ICRF, body centered frame.
|
CelestialBodyFrame |
getInertialFrame(IAUPoleModelType iauPoleIn)
Get an inertially oriented, body centered frame.
|
String |
getName()
Get the name of the body.
|
Frame |
getNativeFrame(AbsoluteDate date,
Frame frame)
Get the native frame, i.e.
|
PVCoordinates |
getPVCoordinates(AbsoluteDate date,
Frame frame)
Get the
PVCoordinates of the body in the selected frame. |
CelestialBodyFrame |
getRotatingFrame(IAUPoleModelType iauPoleIn)
Get a body oriented, body centered frame.
|
BodyShape |
getShape()
Get the geometric shape of the body.
|
void |
setEphemeris(CelestialBodyEphemeris ephemerisIn)
Set an ephemeris to the body.
|
void |
setGM(double gmIn)
Set a central attraction coefficient to the body.
|
void |
setGravityModel(GravityModel modelIn)
Set a gravitational attraction model to the body.
|
void |
setIAUPole(IAUPole iauPoleIn)
Set a IAU Pole to define the body frames.
|
void |
setShape(BodyShape shapeIn)
Set a geometric shape to the body.
|
String |
toString()
Returns a string representation of the body and its attributes.
|
public static final String ICRF_FRAME_NAME
public static final String EME2000_FRAME_NAME
public static final String INERTIAL_FRAME_CONSTANT_MODEL
public static final String INERTIAL_FRAME_MEAN_MODEL
public static final String INERTIAL_FRAME_TRUE_MODEL
public static final String ROTATING_FRAME_CONSTANT_MODEL
public static final String ROTATING_FRAME_MEAN_MODEL
public static final String ROTATING_FRAME_TRUE_MODEL
protected AbstractCelestialBody(String nameIn, GravityModel gravityModelIn, IAUPole iauPoleIn, Frame parentFrame)
nameIn
- name of the bodygravityModelIn
- gravitationalAttraction modeliauPoleIn
- IAU pole implementationparentFrame
- parent frame (usually it should be the ICRF centered on the parent body)protected AbstractCelestialBody(String nameIn, double gmIn, IAUPole iauPoleIn, Frame parentFrame)
nameIn
- name of the bodygmIn
- gravitational attraction coefficient (in m3/s2)iauPoleIn
- IAU pole implementationparentFrame
- parent frame (usually it should be the ICRF centered on the parent body)protected AbstractCelestialBody(CelestialBodyFrame icrf, String nameIn, GravityModel gravityModelIn, IAUPole iauPoleIn)
icrf
- ICRF framenameIn
- name of the bodygravityModelIn
- gravitational attraction modeliauPoleIn
- IAU pole implementationpublic String getName()
getName
in interface CelestialBody
public CelestialBodyFrame getICRF()
The frame is always bound to the body center, and its axes have a fixed orientation with respect to other inertial frames.
getICRF
in interface CelestialBody
#getRotatingFrame(IAUPoleModelType.TRUE)
public CelestialBodyFrame getEME2000()
The frame is always bound to the body center, and its axes are colinear to Earth EME2000 frame.
getEME2000
in interface CelestialBody
public CelestialBodyFrame getInertialFrame(IAUPoleModelType iauPoleIn) throws PatriusException
Warning: Inertiality of such frame depends on its definition and on its use: if related IAUPole
includes strong precession/nutation effect and temporal horizon of use is long, frame may not be considered
inertial. As a rule of thumb, precession/nutation effects of Earth frames such as CIRF/MOD are considered small
enough on a horizon of a day to consider them pseudo-inertial. Also frames based on
IAUPoleModelType.CONSTANT
will be more inertial than IAUPoleModelType.MEAN
and than
IAUPoleModelType.TRUE
. Similarly, models including IAUPoleFunction.IAUTimeDependency.DAYS
with high values will
tend to be less inertial than models including IAUPoleFunction.IAUTimeDependency.CENTURIES
with high values. Definition
of sufficiently inertial precession/nutation effects remains on the user responsibility depending on the frame
usage.
getInertialFrame
in interface CelestialBody
iauPoleIn
- the type of IAUPole used for the framePatriusException
- if frame cannot be retrievedpublic CelestialBodyFrame getRotatingFrame(IAUPoleModelType iauPoleIn) throws PatriusException
getRotatingFrame
in interface CelestialBody
iauPoleIn
- the type of IAUPole used for the framePatriusException
- if frame cannot be retrievedpublic double getGM()
Warning: attraction model should not be null (it is not null by default)/
getGM
in interface CelestialBody
public void setGM(double gmIn)
setGM
in interface CelestialBody
gmIn
- the central attraction coefficient
(m3/s2)public IAUPole getIAUPole()
getIAUPole
in interface CelestialBody
public void setIAUPole(IAUPole iauPoleIn)
setIAUPole
in interface CelestialBody
iauPoleIn
- the IAU polepublic 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 framepublic Frame getNativeFrame(AbsoluteDate date, Frame frame) throws PatriusException
getNativeFrame
in interface PVCoordinatesProvider
date
- a dateframe
- a framePatriusException
- thrown if native frame is undefined or unknownpublic GravityModel getGravityModel()
getGravityModel
in interface CelestialBody
public void setGravityModel(GravityModel modelIn)
setGravityModel
in interface CelestialBody
modelIn
- the gravitational attraction modelpublic BodyShape getShape()
getShape
in interface CelestialBody
public void setShape(BodyShape shapeIn)
setShape
in interface CelestialBody
shapeIn
- the shape of the bodypublic CelestialBodyEphemeris getEphemeris()
getEphemeris
in interface CelestialBody
public void setEphemeris(CelestialBodyEphemeris ephemerisIn)
setEphemeris
in interface CelestialBody
ephemerisIn
- the ephemerispublic String toString()
toString
in interface CelestialBody
toString
in class Object
Copyright © 2023 CNES. All rights reserved.