# poliastro.twobody.events¶

## Module Contents¶

### Classes¶

 Event Base class for event functionalities. AltitudeCrossEvent Detect if a satellite crosses a specific threshold altitude. LithobrakeEvent Terminal event that detects impact with the attractor surface. LatitudeCrossEvent Detect if a satellite crosses a specific threshold latitude. EclipseEvent Base class for the eclipse event. PenumbraEvent Detect whether a satellite is in penumbra or not. UmbraEvent Detect whether a satellite is in umbra or not. NodeCrossEvent Detect equatorial node (ascending or descending) crossings. LosEvent Detect whether there exists a LOS between two satellites.
class poliastro.twobody.events.Event(terminal, direction)

Base class for event functionalities.

Parameters
• terminal (bool) – Whether to terminate integration if this event occurs.

• direction (float) – Handle triggering of event.

property terminal(self)
property direction(self)
property last_t(self)
abstract __call__(self, t, u, k)
class poliastro.twobody.events.AltitudeCrossEvent(alt, R, terminal=True, direction=- 1)

Bases:

Detect if a satellite crosses a specific threshold altitude.

Parameters
• alt (float) – Threshold altitude (km).

• R (float) – Radius of the attractor (km).

• terminal (bool) – Whether to terminate integration if this event occurs.

• direction (float) – Handle triggering of event based on whether altitude is crossed from above or below, defaults to -1, i.e., event is triggered only if altitude is crossed from above (decreasing altitude).

__call__(self, t, u, k)
class poliastro.twobody.events.LithobrakeEvent(R, terminal=True)

Terminal event that detects impact with the attractor surface.

Parameters
• R (float) – Radius of the attractor (km).

• terminal (bool) – Whether to terminate integration if this event occurs.

class poliastro.twobody.events.LatitudeCrossEvent(orbit, lat, terminal=False, direction=0)

Bases:

Detect if a satellite crosses a specific threshold latitude.

Parameters
• orbit () – Orbit.

• lat (astropy.quantity.Quantity) – Threshold latitude.

• terminal (bool, optional) – Whether to terminate integration if this event occurs, defaults to True.

• direction (float, optional) – Handle triggering of event based on whether latitude is crossed from above or below, defaults to 0, i.e., event is triggered while traversing from both directions.

__call__(self, t, u_, k)
class poliastro.twobody.events.EclipseEvent(orbit, terminal=False, direction=0)

Bases:

Base class for the eclipse event.

Parameters
• orbit () – Orbit of the satellite.

• terminal (bool, optional) – Whether to terminate integration when the event occurs, defaults to False.

• direction (float, optional) – Specify which direction must the event trigger, defaults to 0.

__call__(self, t, u_, k)
class poliastro.twobody.events.PenumbraEvent(orbit, terminal=False, direction=0)

Bases:

Detect whether a satellite is in penumbra or not.

Parameters
• orbit () – Orbit of the satellite.

• terminal (bool, optional) – Whether to terminate integration when the event occurs, defaults to False.

• direction (float, optional) – Handle triggering of event based on whether entry is into or out of penumbra, defaults to 0, i.e., event is triggered at both, entry and exit points.

__call__(self, t, u_, k)
class poliastro.twobody.events.UmbraEvent(orbit, terminal=False, direction=0)

Bases:

Detect whether a satellite is in umbra or not.

Parameters
• orbit () – Orbit of the satellite.

• terminal (bool, optional) – Whether to terminate integration when the event occurs, defaults to False.

• direction (float, optional) – Handle triggering of event based on whether entry is into or out of umbra, defaults to 0, i.e., event is triggered at both, entry and exit points.

__call__(self, t, u_, k)
class poliastro.twobody.events.NodeCrossEvent(terminal=False, direction=0)

Bases:

Detect equatorial node (ascending or descending) crossings.

Parameters
• terminal (bool, optional) – Whether to terminate integration when the event occurs, defaults to False.

• direction (float, optional) – Handle triggering of event based on whether the node is crossed from above i.e. descending node, or is crossed from below i.e. ascending node, defaults to 0, i.e. event is triggered during both crossings.

__call__(self, t, u_, k)
class poliastro.twobody.events.LosEvent(attractor, pos_coords, terminal=False, direction=0)

Bases:

Detect whether there exists a LOS between two satellites.

Parameters
• attractor (body) – The central attractor with respect to which the position vectors of the satellites are defined.

• pos_coords (Quantity) – A list of position coordinates for the secondary body. These coordinates can be found by propagating the body for a desired amount of time.

__call__(self, t, u_, k)