ostk.astrodynamics.event_condition.AngularCondition¶
- class AngularCondition(*args, **kwargs)¶
Bases:
EventCondition
An Angular Event Condition.
Overloaded function.
__init__(self: ostk.astrodynamics.event_condition.AngularCondition, name: ostk.core.type.String, criterion: ostk.astrodynamics.event_condition.AngularCondition.Criterion, evaluator: Callable[[ostk.astrodynamics.trajectory.State], ostk.core.type.Real], target_angle: ostk.physics.unit.Angle) -> None
Constructor.
- Args:
name (str): The name of the condition. criterion (ostk.astrodynamics.event_condition.AngularCondition.Criterion): The criterion of the condition. evaluator (function): The evaluator of the condition. target_angle (Angle): The target angle of the condition.
__init__(self: ostk.astrodynamics.event_condition.AngularCondition, name: ostk.core.type.String, criterion: ostk.astrodynamics.event_condition.AngularCondition.Criterion, evaluator: Callable[[ostk.astrodynamics.trajectory.State], ostk.core.type.Real], target: ostk.astrodynamics.EventCondition.Target) -> None
Constructor.
- Args:
name (str): The name of the condition. criterion (ostk.astrodynamics.event_condition.AngularCondition.Criterion): The criterion of the condition. evaluator (function): The evaluator of the condition. target (EventConditionTarget): The target of the condition.
Methods
Get the criterion of the condition.
Get the evaluator of the event condition.
Get the name of the event condition.
Get the target of the event condition.
Get the target angle of the condition.
Get the target range of the condition.
Check if the condition is satisfied.
Get the string representation of a criterion.
Update the target value if the event condition is relative.
Create an angular condition that is satisfied when the angle is within a range.
- class Criterion(
- self: ostk.astrodynamics.event_condition.AngularCondition.Criterion,
- value: int,
Bases:
pybind11_object
Angular condition criterion.
Members:
PositiveCrossing
NegativeCrossing
AnyCrossing
WithinRange
- property name¶
- class Target(*args, **kwargs)¶
Bases:
pybind11_object
The Event Condition Target.
Overloaded function.
__init__(self: ostk.astrodynamics.EventCondition.Target, value: ostk.core.type.Real, type: ostk.astrodynamics.EventCondition.Target.Type = <Type.Absolute: 0>) -> None
Construct a new EventConditionTarget object.
- Args:
value (float): The value of the target. type (EventConditionTarget.Type): The type of the target. Defaults to EventConditionTarget.Type.Absolute.
- Returns:
event_condition_target (EventConditionTarget): The new EventConditionTarget object.
__init__(self: ostk.astrodynamics.EventCondition.Target, value: ostk.physics.unit.Length, type: ostk.astrodynamics.EventCondition.Target.Type = <Type.Absolute: 0>) -> None
Construct a new EventConditionTarget object.
- Args:
length (Length): The value of the target as a Length. type (EventConditionTarget.Type): The type of the target. Defaults to EventConditionTarget.Type.Absolute.
- Returns:
event_condition_target (EventConditionTarget): The new EventConditionTarget object.
__init__(self: ostk.astrodynamics.EventCondition.Target, value: ostk.physics.unit.Angle, type: ostk.astrodynamics.EventCondition.Target.Type = <Type.Absolute: 0>) -> None
Construct a new EventConditionTarget object.
- Args:
angle (Angle): The value of the target as an Angle. type (EventConditionTarget.Type): The type of the target. Defaults to EventConditionTarget.Type.Absolute.
- Returns:
event_condition_target (EventConditionTarget): The new EventConditionTarget object.
- static StringFromType( ) ostk.core.type.String ¶
Enum as a string
- Parameters:
type (EventConditionTarget.Type) -- The type of the target.
- Returns:
Name of the enum as a string.
- Return type:
string (str)
- class Type(
- self: ostk.astrodynamics.EventCondition.Target.Type,
- value: int,
Bases:
pybind11_object
Event Condition Target type.
Members:
Absolute : Absolute
Relative : Relative to the provided State.
- property name¶
- get_criterion( ) ostk.astrodynamics.event_condition.AngularCondition.Criterion ¶
Get the criterion of the condition.
- Returns:
The criterion of the condition.
- Return type:
ostk.astrodynamics.event_condition.AngularCondition.Criterion
- get_evaluator( ) Callable[[ostk.astrodynamics.trajectory.State], ostk.core.type.Real] ¶
Get the evaluator of the event condition.
- Returns:
The evaluator of the event condition.
- Return type:
evaluator (str)
- get_name( ) ostk.core.type.String ¶
Get the name of the event condition.
- Returns:
The name of the event condition.
- Return type:
name (str)
- get_target( ) ostk.astrodynamics.EventCondition.Target ¶
Get the target of the event condition.
- Returns:
The target of the event condition.
- Return type:
target (EventConditionTarget)
- get_target_angle( ) ostk.physics.unit.Angle ¶
Get the target angle of the condition.
- Returns:
The target angle of the condition.
- Return type:
Angle
- get_target_range( ) tuple[ostk.physics.unit.Angle, ostk.physics.unit.Angle] ¶
Get the target range of the condition.
- Returns:
The target range of the condition.
- Return type:
- is_satisfied(
- self: ostk.astrodynamics.event_condition.AngularCondition,
- current_state: ostk.astrodynamics.trajectory.State,
- previous_state: ostk.astrodynamics.trajectory.State,
- current_state: ostk.astrodynamics.trajectory.State,
Check if the condition is satisfied.
- static string_from_criterion( ) ostk.core.type.String ¶
Get the string representation of a criterion.
- Parameters:
criterion (ostk.astrodynamics.event_condition.AngularCondition.Criterion) -- The criterion.
- Returns:
The string representation of the criterion.
- Return type:
- update_target( ) None ¶
Update the target value if the event condition is relative.
- Parameters:
state (State) -- The state to calculate the relative target from.
- static within_range(
- name: ostk.core.type.String,
- evaluator: Callable[[ostk.astrodynamics.trajectory.State], ostk.core.type.Real],
- target_range: tuple[ostk.physics.unit.Angle, ostk.physics.unit.Angle],
- evaluator: Callable[[ostk.astrodynamics.trajectory.State], ostk.core.type.Real],
Create an angular condition that is satisfied when the angle is within a range.
- Parameters:
- Returns:
The angular condition.
- Return type: