ostk.astrodynamics.trajectory.StateBuilder

class StateBuilder(*args, **kwargs)

Bases: pybind11_object

This class makes it convenient to build a State object.

Overloaded function.

  1. __init__(self: ostk.astrodynamics.trajectory.StateBuilder, frame: ostk.physics.coordinate.Frame, coordinate_subsets: list[ostk.astrodynamics.trajectory.state.CoordinateSubset]) -> None

    Construct a new StateBuilder object.

    Arguments:

    frame (Frame): The reference frame. coordinate_subsets list[CoordinateSubset]: The coordinate subsets.

    Returns:

    StateBuilder: The new StateBuilder object.

  2. __init__(self: ostk.astrodynamics.trajectory.StateBuilder, frame: ostk.physics.coordinate.Frame, coordinate_broker: ostk.astrodynamics.trajectory.state.CoordinateBroker) -> None

    Construct a new StateBuilder object.

    Arguments:

    frame (Frame): The reference frame. coordinate_broker (CoordinateBroker): The coordinate broker.

    Returns:

    StateBuilder: The new StateBuilder object.

  3. __init__(self: ostk.astrodynamics.trajectory.StateBuilder, state: ostk.astrodynamics.trajectory.State) -> None

    Construct a new StateBuilder object.

    Arguments:

    state (State): The state.

    Returns:

    StateBuilder: The new StateBuilder object.

Methods

access_coordinate_broker

Access the coordinate broker of the StateBuilder.

build

Build a State object from the StateBuilder.

expand

Expand a State object to the coordinate subsets of the StateBuilder.

get_coordinate_subsets

Get the coordinate subsets of the StateBuilder.

get_frame

Get the reference frame of the StateBuilder.

get_size

Get the total size of all coordinates from all subsets.

is_defined

Check if the StateBuilder is defined.

reduce

Reduce a State object to the coordinate subsets of the StateBuilder.

undefined

Get an undefined StateBuilder.

__add__(
self: ostk.astrodynamics.trajectory.StateBuilder,
arg0: ostk.astrodynamics.trajectory.state.CoordinateSubset,
) ostk.astrodynamics.trajectory.StateBuilder

Add a coordinate subset to the StateBuilder.

Parameters:

coordinate_subsets (CoordinateSubset) -- The coordinate subset to add.

Returns:

The StateBuilder with the added coordinate subset.

Return type:

StateBuilder

access_coordinate_broker(
self: ostk.astrodynamics.trajectory.StateBuilder,
) ostk.astrodynamics.trajectory.state.CoordinateBroker

Access the coordinate broker of the StateBuilder.

Returns:

The coordinate broker of the StateBuilder.

Return type:

CoordinateBroker

build(
self: ostk.astrodynamics.trajectory.StateBuilder,
instant: ostk.physics.time.Instant,
coordinates: numpy.ndarray[numpy.float64[m, 1]],
) ostk.astrodynamics.trajectory.State

Build a State object from the StateBuilder.

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

  • coordinates (VectorXd) -- The coordinates of the state.

Returns:

A State object built from the StateBuilder.

Return type:

State

expand(
self: ostk.astrodynamics.trajectory.StateBuilder,
state: ostk.astrodynamics.trajectory.State,
default_state: ostk.astrodynamics.trajectory.State,
) ostk.astrodynamics.trajectory.State

Expand a State object to the coordinate subsets of the StateBuilder.

Parameters:
  • state (State) -- The State object to expand.

  • default_state (State) -- The State object used to supply any additional coordinates.

Returns:

A State object with the coordinate subsets of the StateBuilder.

Return type:

State

get_coordinate_subsets(
self: ostk.astrodynamics.trajectory.StateBuilder,
) list[ostk.astrodynamics.trajectory.state.CoordinateSubset]

Get the coordinate subsets of the StateBuilder.

Returns:

The coordinate subsets of the StateBuilder.

Return type:

Array<Shared<const CoordinateSubset>>

get_frame(
self: ostk.astrodynamics.trajectory.StateBuilder,
) ostk.physics.coordinate.Frame

Get the reference frame of the StateBuilder.

Returns:

The reference frame of the StateBuilder.

Return type:

Frame

get_size(self: ostk.astrodynamics.trajectory.StateBuilder) int

Get the total size of all coordinates from all subsets.

Returns:

The total size of all coordinates from all subsets.

Return type:

Size

is_defined(self: ostk.astrodynamics.trajectory.StateBuilder) bool

Check if the StateBuilder is defined.

Returns:

True if the StateBuilder is defined, False otherwise.

Return type:

bool

reduce(
self: ostk.astrodynamics.trajectory.StateBuilder,
state: ostk.astrodynamics.trajectory.State,
) ostk.astrodynamics.trajectory.State

Reduce a State object to the coordinate subsets of the StateBuilder.

Parameters:

state (State) -- The State object to reduce.

Returns:

A State object with the coordinate subsets of the StateBuilder.

Return type:

State

static undefined() ostk.astrodynamics.trajectory.StateBuilder

Get an undefined StateBuilder.

Returns:

The undefined StateBuilder.

Return type:

StateBuilder