ostk.astrodynamics.trajectory.State

class State(*args, **kwargs)

Bases: pybind11_object

This class represents the physical state of an object.

Overloaded function.

  1. __init__(self: ostk.astrodynamics.trajectory.State, instant: ostk.physics.time.Instant, position: ostk.physics.coordinate.Position, velocity: ostk.physics.coordinate.Velocity) -> None

    Utility constructor for Position/Velocity only.

    Args:

    instant (Instant): An instant position (Position): The cartesian position at the instant velocity (Velocity): The cartesian velocity at the instant

  2. __init__(self: ostk.astrodynamics.trajectory.State, instant: ostk.physics.time.Instant, position: ostk.physics.coordinate.Position, velocity: ostk.physics.coordinate.Velocity, attitude: ostk.mathematics.geometry.d3.transformation.rotation.Quaternion, angular_velocity: numpy.ndarray[numpy.float64[3, 1]], attitude_frame: ostk.physics.coordinate.Frame) -> None

    Utility constructor for Position/Velocity/Attitude/Angular velocity.

    Args:

    instant (Instant): An instant position (Position): The cartesian position at the instant velocity (Velocity): The cartesian velocity at the instant attitude (Quaternion): The attitude at the instant, representing the rotation required to go from the attitude reference frame to the satellite body frame angular_velocity (numpy.ndarray): The angular velocity at the instant, representing the angular velocity of the satellite body frame with respect ot teh attitude frame, expressed in body frame attitude_frame (Frame): The attitude reference frame

  3. __init__(self: ostk.astrodynamics.trajectory.State, instant: ostk.physics.time.Instant, coordinates: numpy.ndarray[numpy.float64[m, 1]], frame: ostk.physics.coordinate.Frame, coordinate_broker: ostk::astrodynamics::trajectory::state::CoordinateBroker) -> None

    Constructor with a pre-defined Coordinates Broker.

    Args:

    instant (Instant): An instant coordinates (numpy.ndarray): The coordinates at the instant in International System of Units frame (Frame): The reference frame in which the coordinates are referenced to and resolved in coordinate_broker (CoordinateBroker): The coordinate broker associated to the coordinates

  4. __init__(self: ostk.astrodynamics.trajectory.State, instant: ostk.physics.time.Instant, coordinates: numpy.ndarray[numpy.float64[m, 1]], frame: ostk.physics.coordinate.Frame, coordinate_subsets: list[ostk::astrodynamics::trajectory::state::CoordinateSubset]) -> None

    Constructor with coordinate subsets.

    Args:

    instant (Instant): An instant coordinates (numpy.ndarray): The coordinates at the instant in International System of Units frame (Frame): The reference frame in which the coordinates are referenced to and resolved in coordinate_subsets (CoordinateBroker): The coordinate subsets associated to the coordinates

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

Methods

extract_coordinate

Extract the coordinates associated to a subset of the state.

extract_coordinates

Extract the coordinates associated to a set of subsets of the state.

from_dict

Create a State from a dictionary.

get_angular_velocity

Get the angular velocity of the state.

get_attitude

Get the attitude of the state.

get_coordinate_subsets

Get the coordinate subsets associated to the state.

get_coordinates

Get the coordinates of the state.

get_frame

Get the reference frame of the state.

get_instant

Get the instant of the state.

get_position

Get the position of the state.

get_size

Get the size of the state.

get_velocity

Get the velocity of the state.

has_subset

Check if the state has a given subset.

in_frame

Transform the state to the provided reference frame.

is_defined

Check if the state is defined.

template

Emit a custom class type for States.

undefined

Get an undefined state.

__add__(
self: ostk.astrodynamics.trajectory.State,
arg0: ostk.astrodynamics.trajectory.State,
) ostk.astrodynamics.trajectory.State
extract_coordinate(
self: ostk.astrodynamics.trajectory.State,
coordinate_subset: ostk::astrodynamics::trajectory::state::CoordinateSubset,
) numpy.ndarray[numpy.float64[m, 1]]

Extract the coordinates associated to a subset of the state.

Parameters:

coordinate_subset (CoordinateSubset) -- The coordinate subset to extract.

Returns:

The coordinates associated to the subset.

Return type:

np.array

extract_coordinates(self: ostk.astrodynamics.trajectory.State, coordinate_subsets: list[ostk::astrodynamics::trajectory::state::CoordinateSubset]) numpy.ndarray[numpy.float64[m, 1]]

Extract the coordinates associated to a set of subsets of the state.

Parameters:

coordinate_subsets (list[CoordinateSubset]) -- The coordinate subsets to extract.

Returns:

The coordinates associated to the subsets.

Return type:

np.array

static from_dict(data: dict) State

Create a State from a dictionary.

Note: Implicit assumption that ECEF = ITRF, and ECI = GCRF.

The dictionary must contain the following: - 'timestamp': The timestamp of the state. - 'r_ITRF_x'/'rx'/'rx_eci'/'rx_ecef': The x-coordinate of the position. - 'r_ITRF_y'/'ry'/'ry_eci'/'ry_ecef': The y-coordinate of the position. - 'r_ITRF_z'/'rz'/'rz_eci'/'rz_ecef': The z-coordinate of the position. - 'v_ITRF_x'/'vx'/'vx_eci'/'vx_ecef': The x-coordinate of the velocity. - 'v_ITRF_y'/'vy'/'vy_eci'/'vy_ecef': The y-coordinate of the velocity. - 'v_ITRF_z'/'vz'/'vz_eci'/'vz_ecef': The z-coordinate of the velocity. - 'frame': The frame of the state. Required if 'rx', 'ry', 'rz', 'vx', 'vy', 'vz' are provided. - 'q_B_ECI_x': The x-coordinate of the quaternion. Optional. - 'q_B_ECI_y': The y-coordinate of the quaternion. Optional. - 'q_B_ECI_z': The z-coordinate of the quaternion. Optional. - 'q_B_ECI_s': The s-coordinate of the quaternion. Optional. - 'w_B_ECI_in_B_x': The x-coordinate of the angular velocity. Optional. - 'w_B_ECI_in_B_y': The y-coordinate of the angular velocity. Optional. - 'w_B_ECI_in_B_z': The z-coordinate of the angular velocity. Optional. - 'drag_coefficient'/'cd': The drag coefficient. Optional. - 'cross_sectional_area'/'surface_area': The cross-sectional area. Optional. - 'mass': The mass. Optional. - 'ballistic_coefficient'/'bc': The ballistic coefficient. Optional.

Parameters:

data (dict) -- The dictionary.

Returns:

The State.

Return type:

State

get_angular_velocity(
self: ostk.astrodynamics.trajectory.State,
) numpy.ndarray[numpy.float64[3, 1]]

Get the angular velocity of the state.

Returns:

The angular velocity of the state.

Return type:

np.array

get_attitude(
self: ostk.astrodynamics.trajectory.State,
) ostk.mathematics.geometry.d3.transformation.rotation.Quaternion

Get the attitude of the state.

Returns:

The attitude of the state.

Return type:

Quaternion

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

Get the coordinate subsets associated to the state.

Returns:

The coordinate subsets associated to the state.

Return type:

list[CoordinateSubset]

get_coordinates(
self: ostk.astrodynamics.trajectory.State,
) numpy.ndarray[numpy.float64[m, 1]]

Get the coordinates of the state.

Returns:

The coordinates of the state.

Return type:

np.array

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

Get the reference frame of the state.

Returns:

The reference frame of the state.

Return type:

Frame

get_instant(
self: ostk.astrodynamics.trajectory.State,
) ostk.physics.time.Instant

Get the instant of the state.

Returns:

The instant of the state.

Return type:

Instant

get_position(
self: ostk.astrodynamics.trajectory.State,
) ostk.physics.coordinate.Position

Get the position of the state.

Returns:

The position of the state.

Return type:

Position

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

Get the size of the state.

Returns:

The size of the state.

Return type:

int

get_velocity(
self: ostk.astrodynamics.trajectory.State,
) ostk.physics.coordinate.Velocity

Get the velocity of the state.

Returns:

The velocity of the state.

Return type:

Velocity

has_subset(
self: ostk.astrodynamics.trajectory.State,
subset: ostk::astrodynamics::trajectory::state::CoordinateSubset,
) bool

Check if the state has a given subset.

Parameters:

subset (CoordinateSubset) -- The subset to check.

Returns:

True if the state has the subset, False otherwise.

Return type:

bool

in_frame(
self: ostk.astrodynamics.trajectory.State,
frame: ostk.physics.coordinate.Frame,
) ostk.astrodynamics.trajectory.State

Transform the state to the provided reference frame.

Parameters:

frame (Frame) -- The reference frame to transform to.

Returns:

The transformed state.

Return type:

State

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

Check if the state is defined.

Returns:

True if the state is defined, False otherwise.

Return type:

bool

static template(frame: Frame, coordinate_subsets: list) type

Emit a custom class type for States. This is meta-programming syntactic sugar on top of the StateBuilder class.

StateType = State.template(frame, coordinate_subsets) state = StateType(instant, coordinates)

is equivalent to

state_builder = StateBuilder(frame, coordinate_subsets) state = state_builder.build(instant, coordinates)

static undefined() ostk.astrodynamics.trajectory.State

Get an undefined state.

Returns:

An undefined state.

Return type:

State