Pre-made Events¶
Convenience event detectors for common scenarios. These provide ready-to-use event detection for frequently needed conditions.
Overview¶
| Category | Events |
|---|---|
| State-Derived | AltitudeEvent, SpeedEvent, LongitudeEvent, LatitudeEvent |
| Orbital Elements | SemiMajorAxisEvent, EccentricityEvent, InclinationEvent, ArgumentOfPerigeeEvent, MeanAnomalyEvent, EccentricAnomalyEvent, TrueAnomalyEvent, ArgumentOfLatitudeEvent |
| Node Crossings | AscendingNodeEvent, DescendingNodeEvent |
| Eclipse/Shadow | UmbraEvent, PenumbraEvent, EclipseEvent, SunlitEvent |
| Area of Interest | AOIEntryEvent, AOIExitEvent |
State-Derived Events¶
AltitudeEvent ¶
AltitudeEvent(value_altitude: float, name: str, direction: EventDirection)
Altitude-based event detector (convenience wrapper).
Detects when geodetic altitude crosses a value. This is a convenience wrapper that automatically handles ECI → ECEF → geodetic transformations to compute altitude above the WGS84 ellipsoid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value_altitude | float | Geodetic altitude value in meters above WGS84 | required |
name | str | Event name for identification | required |
direction | EventDirection | Detection direction (INCREASING, DECREASING, or ANY) | required |
Note
Requires EOP (Earth Orientation Parameters) to be initialized for accurate transformations. Use bh.initialize_eop() or set a custom provider.
Example
Initialize instance.
set_terminal method descriptor ¶
set_terminal() -> AltitudeEvent
Mark this event as terminal (stops propagation).
Returns:
| Name | Type | Description |
|---|---|---|
AltitudeEvent | AltitudeEvent | Self for method chaining |
with_callback method descriptor ¶
with_callback(callback: callable) -> AltitudeEvent
Set event callback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
callback | callable | Function (epoch, state) -> (Optional[state], EventAction) | required |
Returns:
| Name | Type | Description |
|---|---|---|
AltitudeEvent | AltitudeEvent | Self for method chaining |
with_instance method descriptor ¶
with_instance(instance: int) -> AltitudeEvent
Set instance number for display name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instance | int | Instance number to append | required |
Returns:
| Name | Type | Description |
|---|---|---|
AltitudeEvent | AltitudeEvent | Self for method chaining |
with_tolerances method descriptor ¶
with_tolerances(time_tol: float, value_tol: float) -> AltitudeEvent
Set custom tolerances for event detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
time_tol | float | Time tolerance in seconds (default: 1e-6) | required |
value_tol | float | Value tolerance (default: 1e-9) | required |
Returns:
| Name | Type | Description |
|---|---|---|
AltitudeEvent | AltitudeEvent | Self for method chaining |
SpeedEvent ¶
SpeedEvent(value: float, name: str, direction: EventDirection)
Speed event detector.
Detects when velocity magnitude crosses a value value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value | float | Speed value in m/s | required |
name | str | Event name for identification | required |
direction | EventDirection | Detection direction | required |
Example
Initialize instance.
LongitudeEvent ¶
LongitudeEvent(value: float, name: str, direction: EventDirection, angle_format: AngleFormat)
Longitude event detector.
Detects when geodetic longitude crosses a value value. Requires EOP initialization for ECI->ECEF transformation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value | float | Longitude value | required |
name | str | Event name for identification | required |
direction | EventDirection | Detection direction | required |
angle_format | AngleFormat | Whether value is in degrees or radians | required |
Example
Initialize instance.
LatitudeEvent ¶
LatitudeEvent(value: float, name: str, direction: EventDirection, angle_format: AngleFormat)
Latitude event detector.
Detects when geodetic latitude crosses a value value. Requires EOP initialization for ECI->ECEF transformation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value | float | Latitude value | required |
name | str | Event name for identification | required |
direction | EventDirection | Detection direction | required |
angle_format | AngleFormat | Whether value is in degrees or radians | required |
Example
Initialize instance.
Orbital Element Events¶
SemiMajorAxisEvent ¶
SemiMajorAxisEvent(value: float, name: str, direction: EventDirection)
Semi-major axis event detector.
Detects when orbital semi-major axis crosses a value value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value | float | Semi-major axis value in meters | required |
name | str | Event name for identification | required |
direction | EventDirection | Detection direction | required |
Example
Initialize instance.
EccentricityEvent ¶
EccentricityEvent(value: float, name: str, direction: EventDirection)
Eccentricity event detector.
Detects when orbital eccentricity crosses a value value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value | float | Eccentricity value (dimensionless) | required |
name | str | Event name for identification | required |
direction | EventDirection | Detection direction | required |
Example
Initialize instance.
InclinationEvent ¶
InclinationEvent(value: float, name: str, direction: EventDirection, angle_format: AngleFormat)
Inclination event detector.
Detects when orbital inclination crosses a value value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value | float | Inclination value | required |
name | str | Event name for identification | required |
direction | EventDirection | Detection direction | required |
angle_format | AngleFormat | Whether value is in degrees or radians | required |
Example
Initialize instance.
ArgumentOfPerigeeEvent ¶
ArgumentOfPerigeeEvent(value: float, name: str, direction: EventDirection, angle_format: AngleFormat)
Argument of perigee event detector.
Detects when argument of perigee crosses a value value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value | float | Argument of perigee value | required |
name | str | Event name for identification | required |
direction | EventDirection | Detection direction | required |
angle_format | AngleFormat | Whether value is in degrees or radians | required |
Initialize instance.
MeanAnomalyEvent ¶
MeanAnomalyEvent(value: float, name: str, direction: EventDirection, angle_format: AngleFormat)
Mean anomaly event detector.
Detects when mean anomaly crosses a value value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value | float | Mean anomaly value | required |
name | str | Event name for identification | required |
direction | EventDirection | Detection direction | required |
angle_format | AngleFormat | Whether value is in degrees or radians | required |
Initialize instance.
EccentricAnomalyEvent ¶
EccentricAnomalyEvent(value: float, name: str, direction: EventDirection, angle_format: AngleFormat)
Eccentric anomaly event detector.
Detects when eccentric anomaly crosses a value value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value | float | Eccentric anomaly value | required |
name | str | Event name for identification | required |
direction | EventDirection | Detection direction | required |
angle_format | AngleFormat | Whether value is in degrees or radians | required |
Initialize instance.
TrueAnomalyEvent ¶
TrueAnomalyEvent(value: float, name: str, direction: EventDirection, angle_format: AngleFormat)
True anomaly event detector.
Detects when true anomaly crosses a value value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value | float | True anomaly value | required |
name | str | Event name for identification | required |
direction | EventDirection | Detection direction | required |
angle_format | AngleFormat | Whether value is in degrees or radians | required |
Initialize instance.
ArgumentOfLatitudeEvent ¶
ArgumentOfLatitudeEvent(value: float, name: str, direction: EventDirection, angle_format: AngleFormat)
Argument of latitude event detector.
Detects when argument of latitude (omega + true anomaly) crosses a value value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value | float | Argument of latitude value | required |
name | str | Event name for identification | required |
direction | EventDirection | Detection direction | required |
angle_format | AngleFormat | Whether value is in degrees or radians | required |
Initialize instance.
Node Crossing Events¶
AscendingNodeEvent ¶
AscendingNodeEvent(name: str)
Ascending node event detector.
Detects when spacecraft crosses the ascending node (equator from south to north).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str | Event name for identification | required |
Example
Initialize instance.
DescendingNodeEvent ¶
DescendingNodeEvent(name: str)
Descending node event detector.
Detects when spacecraft crosses the descending node (equator from north to south).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str | Event name for identification | required |
Example
Initialize instance.
Eclipse/Shadow Events¶
UmbraEvent ¶
Umbra event detector.
Detects when spacecraft enters/exits Earth's umbra (full shadow). Uses the conical shadow model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str | Event name for identification | required |
edge | EdgeType | Edge type (RISING_EDGE = entering, FALLING_EDGE = exiting) | required |
ephemeris_source | EphemerisSource | None | Source for sun position (None for low-precision) | required |
Example
Initialize instance.
PenumbraEvent ¶
Penumbra event detector.
Detects when spacecraft enters/exits Earth's penumbra (partial shadow). Uses the conical shadow model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str | Event name for identification | required |
edge | EdgeType | Edge type (RISING_EDGE = entering, FALLING_EDGE = exiting) | required |
ephemeris_source | EphemerisSource | None | Source for sun position (None for low-precision) | required |
Example
Initialize instance.
EclipseEvent ¶
Eclipse event detector.
Detects when spacecraft enters/exits eclipse (either umbra or penumbra). Uses the conical shadow model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str | Event name for identification | required |
edge | EdgeType | Edge type (RISING_EDGE = entering, FALLING_EDGE = exiting) | required |
ephemeris_source | EphemerisSource | None | Source for sun position (None for low-precision) | required |
Example
Initialize instance.
SunlitEvent ¶
Sunlit event detector.
Detects when spacecraft enters/exits sunlight (fully illuminated). Uses the conical shadow model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str | Event name for identification | required |
edge | EdgeType | Edge type (RISING_EDGE = entering, FALLING_EDGE = leaving) | required |
ephemeris_source | EphemerisSource | None | Source for sun position (None for low-precision) | required |
Example
Initialize instance.
Area of Interest Events¶
AOIEntryEvent ¶
AOIEntryEvent(polygon: PolygonLocation, name: str)
AOI Entry event detector.
Detects when a satellite's sub-satellite point enters a polygonal Area of Interest. The sub-satellite point is computed by transforming the ECI position to geodetic coordinates (longitude, latitude).
The polygon can be defined either from a PolygonLocation object or from raw (longitude, latitude) coordinate pairs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
polygon | PolygonLocation | Polygon defining the Area of Interest | required |
name | str | Event name for identification | required |
Example
Initialize instance.
from_coordinates staticmethod ¶
from_coordinates(vertices: list[tuple[float, float]], name: str, angle_format: AngleFormat) -> AOIEntryEvent
Create an AOI entry event from raw coordinate pairs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
vertices | list[tuple[float, float]] | AOI vertices as (longitude, latitude) pairs | required |
name | str | Event name for identification | required |
angle_format | AngleFormat | Whether coordinates are in DEGREES or RADIANS | required |
Returns:
| Name | Type | Description |
|---|---|---|
AOIEntryEvent | AOIEntryEvent | New AOI entry event detector |
set_terminal method descriptor ¶
set_terminal() -> AOIEntryEvent
Mark this event as terminal (stops propagation).
Returns:
| Name | Type | Description |
|---|---|---|
AOIEntryEvent | AOIEntryEvent | Self for method chaining |
with_instance method descriptor ¶
with_instance(instance: int) -> AOIEntryEvent
Set instance number for display name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instance | int | Instance number to append | required |
Returns:
| Name | Type | Description |
|---|---|---|
AOIEntryEvent | AOIEntryEvent | Self for method chaining |
with_tolerances method descriptor ¶
with_tolerances(time_tol: float, value_tol: float) -> AOIEntryEvent
Set custom tolerances for event detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
time_tol | float | Time tolerance in seconds | required |
value_tol | float | Value tolerance | required |
Returns:
| Name | Type | Description |
|---|---|---|
AOIEntryEvent | AOIEntryEvent | Self for method chaining |
AOIExitEvent ¶
AOIExitEvent(polygon: PolygonLocation, name: str)
AOI Exit event detector.
Detects when a satellite's sub-satellite point exits a polygonal Area of Interest. The sub-satellite point is computed by transforming the ECI position to geodetic coordinates (longitude, latitude).
The polygon can be defined either from a PolygonLocation object or from raw (longitude, latitude) coordinate pairs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
polygon | PolygonLocation | Polygon defining the Area of Interest | required |
name | str | Event name for identification | required |
Example
Initialize instance.
from_coordinates staticmethod ¶
from_coordinates(vertices: list[tuple[float, float]], name: str, angle_format: AngleFormat) -> AOIExitEvent
Create an AOI exit event from raw coordinate pairs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
vertices | list[tuple[float, float]] | AOI vertices as (longitude, latitude) pairs | required |
name | str | Event name for identification | required |
angle_format | AngleFormat | Whether coordinates are in DEGREES or RADIANS | required |
Returns:
| Name | Type | Description |
|---|---|---|
AOIExitEvent | AOIExitEvent | New AOI exit event detector |
set_terminal method descriptor ¶
set_terminal() -> AOIExitEvent
Mark this event as terminal (stops propagation).
Returns:
| Name | Type | Description |
|---|---|---|
AOIExitEvent | AOIExitEvent | Self for method chaining |
with_instance method descriptor ¶
with_instance(instance: int) -> AOIExitEvent
Set instance number for display name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instance | int | Instance number to append | required |
Returns:
| Name | Type | Description |
|---|---|---|
AOIExitEvent | AOIExitEvent | Self for method chaining |
with_tolerances method descriptor ¶
with_tolerances(time_tol: float, value_tol: float) -> AOIExitEvent
Set custom tolerances for event detection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
time_tol | float | Time tolerance in seconds | required |
value_tol | float | Value tolerance | required |
Returns:
| Name | Type | Description |
|---|---|---|
AOIExitEvent | AOIExitEvent | Self for method chaining |
See Also¶
- Premade Events (Learn) - Conceptual guide and usage examples
- Event Detectors - Core event detector classes
- Event Results - DetectedEvent and EventQuery
- Enumerations - EventDirection, EventAction, etc.