ostk.astrodynamics.event_condition.InstantCondition

class InstantCondition(
self: ostk.astrodynamics.event_condition.InstantCondition,
criterion: ostk.astrodynamics.event_condition.RealCondition.Criterion,
instant: ostk.physics.time.Instant,
)

Bases: RealCondition

An Instant Event Condition.

Constructor.

Parameters:
  • criterion (Criterion) -- The criterion.

  • instant (Instant) -- The instant.

Methods

duration_condition

Generate a duration condition.

evaluate

Evaluate the condition.

get_criterion

Get the criterion of the condition.

get_evaluator

Get the evaluator of the event condition.

get_instant

Get the instant.

get_name

Get the name of the event condition.

get_target

Get the target of the event condition.

is_satisfied

Check if the condition is satisfied.

string_from_criterion

Get the string representation of a criterion.

update_target

Update the target value if the event condition is relative.

class Criterion(
self: ostk.astrodynamics.event_condition.RealCondition.Criterion,
value: int,
)

Bases: pybind11_object

The Criterion that defines how the condition is satisfied.

Members:

PositiveCrossing : The positive crossing criterion

NegativeCrossing : The negative crossing criterion

AnyCrossing : The any crossing criterion

StrictlyPositive : The strictly positive criterion

StrictlyNegative : The strictly negative criterion

property name
class Target(*args, **kwargs)

Bases: pybind11_object

The Event Condition Target.

Overloaded function.

  1. __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.

  2. __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.

  3. __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(
arg0: ostk.astrodynamics.EventCondition.Target.Type,
) 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
property type

The type of the target.

Type:

Type

property value

The value of the target.

Type:

float

property value_offset

The value offset of the target. Used for Relative targets.

Type:

float

static duration_condition(
criterion: ostk.astrodynamics.event_condition.RealCondition.Criterion,
duration: ostk.physics.time.Duration,
) ostk.astrodynamics.event_condition.RealCondition

Generate a duration condition.

Parameters:
  • criterion (Criterion) -- The criterion of the condition.

  • duration (Duration) -- Duration target.

Returns:

The duration condition.

Return type:

RealCondition

evaluate(
self: ostk.astrodynamics.event_condition.RealCondition,
state: ostk.astrodynamics.trajectory.State,
) ostk.core.type.Real

Evaluate the condition.

Parameters:

state (State) -- The state.

Returns:

True if the condition is satisfied, False otherwise.

Return type:

bool

get_criterion(
self: ostk.astrodynamics.event_condition.RealCondition,
) ostk.astrodynamics.event_condition.RealCondition.Criterion

Get the criterion of the condition.

Returns:

The criterion.

Return type:

Criterion

get_evaluator(
self: ostk.astrodynamics.EventCondition,
) 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_instant(
self: ostk.astrodynamics.event_condition.InstantCondition,
) ostk.physics.time.Instant

Get the instant.

Returns:

The instant.

Return type:

Instant

get_name(
self: ostk.astrodynamics.EventCondition,
) ostk.core.type.String

Get the name of the event condition.

Returns:

The name of the event condition.

Return type:

name (str)

get_target(
self: ostk.astrodynamics.EventCondition,
) ostk.astrodynamics.EventCondition.Target

Get the target of the event condition.

Returns:

The target of the event condition.

Return type:

target (EventConditionTarget)

is_satisfied(
self: ostk.astrodynamics.event_condition.RealCondition,
current_state: ostk.astrodynamics.trajectory.State,
previous_state: ostk.astrodynamics.trajectory.State,
) bool

Check if the condition is satisfied.

Parameters:
  • current_state (State) -- The current state.

  • previous_state (State) -- The previous state.

Returns:

True if the condition is satisfied, False otherwise.

Return type:

bool

static string_from_criterion(
criterion: ostk.astrodynamics.event_condition.RealCondition.Criterion,
) ostk.core.type.String

Get the string representation of a criterion.

Parameters:

criterion (Criterion) -- The criterion.

Returns:

The string representation.

Return type:

str

update_target(
self: ostk.astrodynamics.EventCondition,
state: ostk.astrodynamics.trajectory.State,
) None

Update the target value if the event condition is relative.

Parameters:

state (State) -- The state to calculate the relative target from.