ostk.astrodynamics.trajectory.State¶
- class State(*args, **kwargs)¶
Bases:
pybind11_object
This class represents the physical state of an object.
Overloaded function.
__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
__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
__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
__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
__init__(self: ostk.astrodynamics.trajectory.State, state: ostk.astrodynamics.trajectory.State) -> None
Methods
Extract the coordinates associated to a subset of the state.
Extract the coordinates associated to a set of subsets of the state.
Create a State from a dictionary.
Get the angular velocity of the state.
Get the attitude of the state.
Get the coordinate subsets associated to the state.
Get the coordinates of the state.
Get the reference frame of the state.
Get the instant of the state.
Get the position of the state.
Get the size of the state.
Get the velocity of the state.
Check if the state has a given subset.
Transform the state to the provided reference frame.
Check if the state is defined.
Emit a custom class type for States.
Get an undefined state.
- __add__( ) ostk.astrodynamics.trajectory.State ¶
- extract_coordinate(
- self: ostk.astrodynamics.trajectory.State,
- coordinate_subset: ostk::astrodynamics::trajectory::state::CoordinateSubset,
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.
- get_angular_velocity( ) 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( ) 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( ) list[ostk::astrodynamics::trajectory::state::CoordinateSubset] ¶
Get the coordinate subsets associated to the state.
- Returns:
The coordinate subsets associated to the state.
- Return type:
- get_coordinates( ) numpy.ndarray[numpy.float64[m, 1]] ¶
Get the coordinates of the state.
- Returns:
The coordinates of the state.
- Return type:
np.array
- get_frame( ) ostk.physics.coordinate.Frame ¶
Get the reference frame of the state.
- Returns:
The reference frame of the state.
- Return type:
Frame
- get_instant( ) ostk.physics.time.Instant ¶
Get the instant of the state.
- Returns:
The instant of the state.
- Return type:
Instant
- get_position( ) 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:
- get_velocity( ) 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,
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:
- in_frame(
- self: ostk.astrodynamics.trajectory.State,
- frame: ostk.physics.coordinate.Frame,
Transform the state to the provided reference frame.
- Parameters:
frame (Frame) -- The reference frame to transform to.
- Returns:
The transformed state.
- Return type:
- 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:
- 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: