org.orekit.bodies
Class AbstractCelestialBody

java.lang.Object
  extended by org.orekit.bodies.AbstractCelestialBody
All Implemented Interfaces:
Serializable, CelestialBody, PVCoordinatesProvider
Direct Known Subclasses:
MeeusMoon, MeeusMoonStela, MeeusSun, MeeusSunStela, UserCelestialBody, UserCelestialBody

public abstract class AbstractCelestialBody
extends Object
implements CelestialBody

Abstract implementation of the 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).

Author:
Luc Maisonobe
See Also:
IAUPole, Serialized Form

Constructor Summary
protected AbstractCelestialBody(String name, double gm, IAUPole iauPole, Frame definingFrame, String inertialFrameName, String bodyFrameName)
          Build an instance and the underlying frame.
 
Method Summary
 Frame getBodyOrientedFrame()
          Get a body oriented, body centered frame.
 Frame getFrame()
          Deprecated. 
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCelestialBody

protected AbstractCelestialBody(String name,
                                double gm,
                                IAUPole iauPole,
                                Frame definingFrame,
                                String inertialFrameName,
                                String bodyFrameName)
Build an instance and the underlying frame.

Parameters:
name - name of the body
gm - attraction coefficient (in m3/s2)
iauPole - IAU pole implementation
definingFrame - frame in which celestial body coordinates are defined
inertialFrameName - name to use for inertially oriented body centered frame
bodyFrameName - name to use for body oriented body centered frame
Method Detail

getName

public String getName()
Get the name of the body.

Specified by:
getName in interface CelestialBody
Returns:
name of the body

getGM

public double getGM()
Get the attraction coefficient of the body.

Specified by:
getGM in interface CelestialBody
Returns:
attraction coefficient of the body (m3/s2)

getFrame

@Deprecated
public Frame getFrame()
Deprecated. 

Get an inertially oriented, body centered frame.

The frame is always bound to the body center, and its axes have a fixed orientation with respect to other inertial frames.

Specified by:
getFrame in interface CelestialBody
Returns:
an inertially oriented body centered frame

getInertiallyOrientedFrame

public Frame getInertiallyOrientedFrame()
Get an inertially oriented, body centered frame.

The frame is always bound to the body center, and its axes have a fixed orientation with respect to other inertial frames.

Specified by:
getInertiallyOrientedFrame in interface CelestialBody
Returns:
an inertially oriented, body centered frame
See Also:
CelestialBody.getBodyOrientedFrame()

getBodyOrientedFrame

public Frame getBodyOrientedFrame()
Get a body oriented, body centered frame.

The frame is always bound to the body center, and its axes have a fixed orientation with respect to the celestial body.

Specified by:
getBodyOrientedFrame in interface CelestialBody
Returns:
a body oriented, body centered frame
See Also:
CelestialBody.getInertiallyOrientedFrame()

getPVCoordinates

public abstract PVCoordinates getPVCoordinates(AbsoluteDate date,
                                               Frame frame)
                                        throws OrekitException
Get the PVCoordinates of the body in the selected frame.

Specified by:
getPVCoordinates in interface PVCoordinatesProvider
Parameters:
date - current date
frame - the frame where to define the position
Returns:
position/velocity of the body (m and m/s)
Throws:
OrekitException - if position cannot be computed in given frame


Copyright © 2017 CNES. All Rights Reserved.