ostk.astrodynamics.trajectory.Segment¶
- class Segment¶
Bases:
pybind11_objectA Segment that can be solved provided an initial State and termination Event Condition.
Methods
Create a coast segment.
Create a maneuvering segment that produces maneuvers with a constant direction in the local orbital frame.
Get the dynamics.
Get the event condition.
Get the name of the segment.
Get the numerical solver.
Get the type of the segment.
Create a maneuver segment.
Solve the segment.
- class Solution(self: ostk.astrodynamics.trajectory.Segment.Solution, name: ostk.core.type.String, dynamics: list[ostk::astrodynamics::Dynamics], states: list[ostk.astrodynamics.trajectory.State], condition_is_satisfied: bool, segment_type: ostk::astrodynamics::trajectory::Segment::Type)¶
Bases:
pybind11_objectThe Solution object returned when a Segment is solved.
Construct a Segment Solution.
- Parameters:
- access_end_instant( ) ostk.physics.time.Instant¶
Get the instant at which the segment ends.
- Returns:
The instant at which the segment ends.
- Return type:
Instant
- access_start_instant( ) ostk.physics.time.Instant¶
Get the instant at which the segment starts.
- Returns:
The instant at which the segment starts.
- Return type:
Instant
- calculate_states_at(
- self: ostk.astrodynamics.trajectory.Segment.Solution,
- instants: list[ostk.physics.time.Instant],
- numerical_solver: ostk.astrodynamics.trajectory.state.NumericalSolver,
- instants: list[ostk.physics.time.Instant],
Calculate the states in this segment's solution at the given instants.
- Parameters:
instants (list[Instant]) -- The instants at which the states will be calculated.
numerical_solver (NumericalSolver) -- The numerical solver used to calculate the states.
- Returns:
The states at the provided instants.
- Return type:
- compute_delta_mass( ) ostk.physics.unit.Mass¶
Compute the delta mass.
- Returns:
The delta mass.
- Return type:
Mass
- compute_delta_v(
- self: ostk.astrodynamics.trajectory.Segment.Solution,
- specific_impulse: ostk.core.type.Real,
Compute the delta V.
- extract_maneuvers( ) list[ostk::astrodynamics::flight::Maneuver]¶
Extract maneuvers from the (maneuvering) segment.
- get_all_dynamics_contributions( ) dict[ostk::astrodynamics::Dynamics, numpy.ndarray[numpy.float64[m, n]]]¶
Compute the contributions of all segment's dynamics in the provided frame for all states assocated with the segment.
- get_dynamics_acceleration_contribution(
- self: ostk.astrodynamics.trajectory.Segment.Solution,
- dynamics: ostk::astrodynamics::Dynamics,
- frame: ostk.physics.coordinate.Frame,
- dynamics: ostk::astrodynamics::Dynamics,
Compute the contribution of the provided dynamics to the acceleration in the provided frame for all states associated with the segment.
- Parameters:
dynamics (Dynamics) -- The dynamics.
frame (Frame) -- The frame.
- Returns:
The matrix of dynamics contributions to acceleration.
- Return type:
np.ndarray
- get_dynamics_contribution(
- self: ostk.astrodynamics.trajectory.Segment.Solution,
- dynamics: ostk::astrodynamics::Dynamics,
- frame: ostk.physics.coordinate.Frame,
- coordinate_subsets: list[ostk.astrodynamics.trajectory.state.CoordinateSubset] = [],
- dynamics: ostk::astrodynamics::Dynamics,
Compute the contribution of the provided dynamics in the provided frame for all states associated with the segment.
- Parameters:
dynamics (Dynamics) -- The dynamics.
frame (Frame) -- The frame.
coordinate_subsets (list[CoordinateSubset], optional) -- A subset of the dynamics writing coordinate subsets to consider.
- Returns:
The matrix of dynamics contributions for the selected coordinate subsets of the dynamics.
- Return type:
MatrixXd
- get_final_mass( ) ostk.physics.unit.Mass¶
Get the final mass.
- Returns:
The final mass.
- Return type:
Mass
- get_initial_mass( ) ostk.physics.unit.Mass¶
Get the initial mass.
- Returns:
The initial mass.
- Return type:
Mass
- get_interval( ) ostk.physics.time.Interval¶
Get the time interval of the solution.
- Returns:
The interval.
- Return type:
Interval
- get_propagation_duration( ) ostk.physics.time.Duration¶
Get the propagation duration.
- Returns:
The propagation duration.
- Return type:
Duration
- class Type(self: ostk.astrodynamics.trajectory.Segment.Type, value: int)¶
Bases:
pybind11_objectSegment type.
Members:
Coast : Coast
Maneuver : Maneuver
- property name¶
- static coast(name: ostk.core.type.String, event_condition: ostk::astrodynamics::EventCondition, dynamics: list[ostk::astrodynamics::Dynamics], numerical_solver: ostk.astrodynamics.trajectory.state.NumericalSolver) ostk.astrodynamics.trajectory.Segment¶
Create a coast segment.
- Parameters:
name (str) -- The name of the segment.
event_condition (EventCondition) -- The event condition.
dynamics (Dynamics) -- The dynamics.
numerical_solver (NumericalSolver) -- The numerical solver.
- Returns:
The coast segment.
- Return type:
- static constant_local_orbital_frame_direction_maneuver(name: ostk.core.type.String, event_condition: ostk::astrodynamics::EventCondition, thruster_dynamics: ostk::astrodynamics::dynamics::Thruster, dynamics: list[ostk::astrodynamics::Dynamics], numerical_solver: ostk.astrodynamics.trajectory.state.NumericalSolver, local_orbital_frame_factory: ostk.astrodynamics.trajectory.LocalOrbitalFrameFactory, maximum_allowed_angular_offset: ostk.physics.unit.Angle = Angle.Undefined()) ostk.astrodynamics.trajectory.Segment¶
Create a maneuvering segment that produces maneuvers with a constant direction in the local orbital frame.
The provided thruster dynamics are used to solve the segment at first. The maneuvers produced by this segement solution are then used to create a new thruster dynamics with a constant direction in the local orbital frame. This new thruster dynamics is then used to actually solve the segment.
If defined, a runtime error will be thrown if the maximum allowed angular offset between the original thruster dynamics and the mean thrust direction is violated.
- Parameters:
name (str) -- The name of the segment.
event_condition (EventCondition) -- The event condition.
thruster_dynamics (ThrusterDynamics) -- The thruster dynamics.
dynamics (Dynamics) -- The dynamics.
numerical_solver (NumericalSolver) -- The numerical solver.
local_orbital_frame_factory (LocalOrbitalFrameFactory) -- The local orbital frame factory.
maximum_allowed_angular_offset (Angle, optional) -- The maximum allowed angular offset to consider (if any). Defaults to Angle.undefined().
- Returns:
The maneuver segment.
- Return type:
- get_dynamics( ) list[ostk::astrodynamics::Dynamics]¶
Get the dynamics.
- Returns:
The dynamics.
- Return type:
- get_event_condition( ) ostk::astrodynamics::EventCondition¶
Get the event condition.
- Returns:
The event condition.
- Return type:
- get_name(self: ostk.astrodynamics.trajectory.Segment) ostk.core.type.String¶
Get the name of the segment.
- Returns:
The name of the segment.
- Return type:
- get_numerical_solver( ) ostk.astrodynamics.trajectory.state.NumericalSolver¶
Get the numerical solver.
- Returns:
The numerical solver.
- Return type:
- get_type( ) ostk.astrodynamics.trajectory.Segment.Type¶
Get the type of the segment.
- Returns:
The type of the segment.
- Return type:
- static maneuver(name: ostk.core.type.String, event_condition: ostk::astrodynamics::EventCondition, thruster_dynamics: ostk::astrodynamics::dynamics::Thruster, dynamics: list[ostk::astrodynamics::Dynamics], numerical_solver: ostk.astrodynamics.trajectory.state.NumericalSolver) ostk.astrodynamics.trajectory.Segment¶
Create a maneuver segment.
- Parameters:
name (str) -- The name of the segment.
event_condition (EventCondition) -- The event condition.
thruster_dynamics (ThrusterDynamics) -- The thruster dynamics.
dynamics (Dynamics) -- The dynamics.
numerical_solver (NumericalSolver) -- The numerical solver.
- Returns:
The maneuver segment.
- Return type:
- solve(
- self: ostk.astrodynamics.trajectory.Segment,
- state: ostk.astrodynamics.trajectory.State,
- maximum_propagation_duration: ostk.physics.time.Duration = Duration.days(30.0),
- state: ostk.astrodynamics.trajectory.State,
Solve the segment.
- Parameters:
state (State) -- The state.
maximum_propagation_duration (Duration, optional) -- The maximum propagation duration.
- Returns:
The segment solution.
- Return type:
SegmentSolution