ostk.astrodynamics.Dynamics

class Dynamics(self: ostk.astrodynamics.Dynamics, name: ostk.core.type.String)

Bases: pybind11_object

Abstract interface class for dynamics.

Can inherit and provide the virtual methods:
  • is_defined

  • get_read_coordinate_subsets

  • get_write_coordinate_subsets

  • compute_contribution

to create a custom dynamics class.

Construct a new Dynamics object.

Parameters:

name (str) -- The name of the dynamics.

Returns:

The new Dynamics object.

Return type:

dynamics (Dynamics)

Methods

compute_contribution

Compute the contribution of the dynamics at a given instant.

from_environment

Create a list of Dynamics objects from an environment.

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 dynamics is defined.

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

Compute the contribution of the dynamics at a given instant.

Parameters:
  • instant (Instant) -- The instant at which to compute the contribution.

  • state_vector (numpy.ndarray) -- The state vector at the instant.

  • frame (Frame) -- The reference frame in which to compute the contribution.

Returns:

The contribution of the dynamics at the instant.

Return type:

contribution (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_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) bool

Check if the dynamics is defined.

Returns:

True if the dynamics is defined, False otherwise.

Return type:

is_defined (bool)