ostk.astrodynamics.dynamics.CentralBodyGravity

class CentralBodyGravity(
self: ostk.astrodynamics.dynamics.CentralBodyGravity,
celestial: ostk.physics.environment.object.Celestial,
)

Bases: Dynamics

The central-body gravity model.

Constructor.

Parameters:

celestial (Celestial) -- The central body.

Methods

compute_contribution

Compute the contribution of the central-body gravity to the state vector.

from_environment

Create a list of Dynamics objects from an environment.

get_celestial

Get the central body.

get_name

Get the name of the dynamics.

get_read_coordinate_subsets

Get the coordinate subsets that the dynamics reads.

get_write_coordinate_subsets

Get the coordinate subsets that the dynamics writes.

is_defined

Check if the central-body gravity is defined.

compute_contribution(
self: ostk.astrodynamics.dynamics.CentralBodyGravity,
instant: ostk.physics.time.Instant,
x: numpy.ndarray[numpy.float64[m, 1]],
frame: ostk.physics.coordinate.Frame,
) numpy.ndarray[numpy.float64[m, 1]]

Compute the contribution of the central-body gravity to the state vector.

Parameters:
  • instant (Instant) -- The instant of the state vector.

  • x (numpy.ndarray) -- The state vector.

  • frame (Frame) -- The reference frame.

Returns:

The contribution of the central-body gravity to the state vector.

Return type:

numpy.ndarray

static from_environment(
environment: ostk.physics.Environment,
) list[ostk.astrodynamics.Dynamics]

Create a list of Dynamics objects from an environment.

Parameters:

environment (Environment) -- The environment to create the dynamics from.

Returns:

The list of Dynamics objects created from the environment.

Return type:

dynamics (list[Dynamics])

get_celestial(
self: ostk.astrodynamics.dynamics.CentralBodyGravity,
) ostk.physics.environment.object.Celestial

Get the central body.

Returns:

The central body.

Return type:

Celestial

get_name(self: ostk.astrodynamics.Dynamics) ostk.core.type.String

Get the name of the dynamics.

Returns:

The name of the dynamics.

Return type:

name (str)

get_read_coordinate_subsets(
self: ostk.astrodynamics.Dynamics,
) list[ostk.astrodynamics.trajectory.state.CoordinateSubset]

Get the coordinate subsets that the dynamics reads.

Returns:

The coordinate subsets that the dynamics reads.

Return type:

read_coordinate_subsets (Array<CoordinateSubset>)

get_write_coordinate_subsets(
self: ostk.astrodynamics.Dynamics,
) list[ostk.astrodynamics.trajectory.state.CoordinateSubset]

Get the coordinate subsets that the dynamics writes.

Returns:

The coordinate subsets that the dynamics writes.

Return type:

write_coordinate_subsets (Array<CoordinateSubset>)

is_defined(
self: ostk.astrodynamics.dynamics.CentralBodyGravity,
) bool

Check if the central-body gravity is defined.

Returns:

True if the central-body gravity is defined, False otherwise.

Return type:

bool