Skip to content

Constraints

Constraints define criteria that must be satisfied for satellite access.

Built-in Constraints

ElevationConstraint

ElevationConstraint

ElevationConstraint(min_elevation_deg: float | None, max_elevation_deg: float | None)

Elevation angle constraint for satellite visibility.

Constrains access based on the elevation angle of the satellite above the local horizon at the ground location.

Parameters:

Name Type Description Default
min_elevation_deg float | None

Minimum elevation angle in degrees, or None for no minimum

required
max_elevation_deg float | None

Maximum elevation angle in degrees, or None for no maximum

required

Raises:

Type Description
ValueError

If both min and max are None (unbounded constraint is meaningless)

Example
import brahe as bh

# Typical ground station constraint: 5° minimum elevation
constraint = bh.ElevationConstraint(min_elevation_deg=5.0, max_elevation_deg=None)

# Both bounds specified
constraint = bh.ElevationConstraint(min_elevation_deg=5.0, max_elevation_deg=85.0)

# Only maximum (e.g., avoid zenith)
constraint = bh.ElevationConstraint(min_elevation_deg=None, max_elevation_deg=85.0)

Initialize instance.

__doc__ class-attribute

__doc__ = 'Elevation angle constraint for satellite visibility.\n\nConstrains access based on the elevation angle of the satellite above\nthe local horizon at the ground location.\n\nArgs:\n    min_elevation_deg (float | None): Minimum elevation angle in degrees, or None for no minimum\n    max_elevation_deg (float | None): Maximum elevation angle in degrees, or None for no maximum\n\nRaises:\n    ValueError: If both min and max are None (unbounded constraint is meaningless)\n\nExample:\n    ```python\n    import brahe as bh\n\n    # Typical ground station constraint: 5° minimum elevation\n    constraint = bh.ElevationConstraint(min_elevation_deg=5.0, max_elevation_deg=None)\n\n    # Both bounds specified\n    constraint = bh.ElevationConstraint(min_elevation_deg=5.0, max_elevation_deg=85.0)\n\n    # Only maximum (e.g., avoid zenith)\n    constraint = bh.ElevationConstraint(min_elevation_deg=None, max_elevation_deg=85.0)\n    ```'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

__module__ class-attribute

__module__ = 'brahe._brahe'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

__repr__ method descriptor

__repr__() -> str

Return repr(self).

__str__ method descriptor

__str__() -> str

Return str(self).

evaluate method descriptor

evaluate(epoch: Epoch, sat_state_ecef: ndarray, location_ecef: ndarray) -> bool

Evaluate whether the constraint is satisfied.

Parameters:

Name Type Description Default
epoch Epoch

Time of evaluation

required
sat_state_ecef ndarray

Satellite state in ECEF [x, y, z, vx, vy, vz] (meters, m/s)

required
location_ecef ndarray

Ground location in ECEF [x, y, z] (meters)

required

Returns:

Name Type Description
bool bool

True if constraint is satisfied, False otherwise

name method descriptor

name() -> Any

Get the constraint name

ElevationMaskConstraint

ElevationMaskConstraint

ElevationMaskConstraint(mask: list[tuple[float, float]])

Azimuth-dependent elevation mask constraint.

Constrains access based on azimuth-dependent elevation masks. Useful for ground stations with terrain obstructions or antenna limitations.

The mask is defined as a list of (azimuth, elevation) pairs in degrees. Linear interpolation is used between points, and the mask wraps at 0°/360°.

Parameters:

Name Type Description Default
mask list[tuple[float, float]]

List of (azimuth_deg, min_elevation_deg) pairs

required
Example
import brahe as bh

# Ground station with terrain obstruction to the north
mask = [
    (0.0, 15.0),     # North: 15° minimum
    (90.0, 5.0),     # East: 5° minimum
    (180.0, 5.0),    # South: 5° minimum
    (270.0, 5.0),    # West: 5° minimum
]
constraint = bh.ElevationMaskConstraint(mask)

Initialize instance.

__doc__ class-attribute

__doc__ = 'Azimuth-dependent elevation mask constraint.\n\nConstrains access based on azimuth-dependent elevation masks.\nUseful for ground stations with terrain obstructions or antenna limitations.\n\nThe mask is defined as a list of (azimuth, elevation) pairs in degrees.\nLinear interpolation is used between points, and the mask wraps at 0°/360°.\n\nArgs:\n    mask (list[tuple[float, float]]): List of (azimuth_deg, min_elevation_deg) pairs\n\nExample:\n    ```python\n    import brahe as bh\n\n    # Ground station with terrain obstruction to the north\n    mask = [\n        (0.0, 15.0),     # North: 15° minimum\n        (90.0, 5.0),     # East: 5° minimum\n        (180.0, 5.0),    # South: 5° minimum\n        (270.0, 5.0),    # West: 5° minimum\n    ]\n    constraint = bh.ElevationMaskConstraint(mask)\n    ```'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

__module__ class-attribute

__module__ = 'brahe._brahe'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

__repr__ method descriptor

__repr__() -> str

Return repr(self).

__str__ method descriptor

__str__() -> str

Return str(self).

evaluate method descriptor

evaluate(epoch: Epoch, sat_state_ecef: ndarray, location_ecef: ndarray) -> bool

Evaluate whether the constraint is satisfied.

Parameters:

Name Type Description Default
epoch Epoch

Time of evaluation

required
sat_state_ecef ndarray

Satellite state in ECEF [x, y, z, vx, vy, vz] (meters, m/s)

required
location_ecef ndarray

Ground location in ECEF [x, y, z] (meters)

required

Returns:

Name Type Description
bool bool

True if constraint is satisfied, False otherwise

name method descriptor

name() -> Any

Get the constraint name

OffNadirConstraint

OffNadirConstraint

OffNadirConstraint(min_off_nadir_deg: float | None, max_off_nadir_deg: float | None)

Off-nadir angle constraint for satellite imaging.

Constrains access based on the off-nadir angle (angle between the satellite's nadir vector and the line-of-sight to the location).

Parameters:

Name Type Description Default
min_off_nadir_deg float | None

Minimum off-nadir angle in degrees, or None for no minimum

required
max_off_nadir_deg float | None

Maximum off-nadir angle in degrees, or None for no maximum

required

Raises:

Type Description
ValueError

If both min and max are None, or if any angle is negative

Example
import brahe as bh

# Imaging satellite with 45° maximum slew angle
constraint = bh.OffNadirConstraint(min_off_nadir_deg=None, max_off_nadir_deg=45.0)

# Minimum 10° to avoid nadir (e.g., for oblique imaging)
constraint = bh.OffNadirConstraint(min_off_nadir_deg=10.0, max_off_nadir_deg=45.0)

Initialize instance.

__doc__ class-attribute

__doc__ = "Off-nadir angle constraint for satellite imaging.\n\nConstrains access based on the off-nadir angle (angle between the satellite's\nnadir vector and the line-of-sight to the location).\n\nArgs:\n    min_off_nadir_deg (float | None): Minimum off-nadir angle in degrees, or None for no minimum\n    max_off_nadir_deg (float | None): Maximum off-nadir angle in degrees, or None for no maximum\n\nRaises:\n    ValueError: If both min and max are None, or if any angle is negative\n\nExample:\n    ```python\n    import brahe as bh\n\n    # Imaging satellite with 45° maximum slew angle\n    constraint = bh.OffNadirConstraint(min_off_nadir_deg=None, max_off_nadir_deg=45.0)\n\n    # Minimum 10° to avoid nadir (e.g., for oblique imaging)\n    constraint = bh.OffNadirConstraint(min_off_nadir_deg=10.0, max_off_nadir_deg=45.0)\n    ```"

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

__module__ class-attribute

__module__ = 'brahe._brahe'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

__repr__ method descriptor

__repr__() -> str

Return repr(self).

__str__ method descriptor

__str__() -> str

Return str(self).

evaluate method descriptor

evaluate(epoch: Epoch, sat_state_ecef: ndarray, location_ecef: ndarray) -> bool

Evaluate whether the constraint is satisfied.

Parameters:

Name Type Description Default
epoch Epoch

Time of evaluation

required
sat_state_ecef ndarray

Satellite state in ECEF [x, y, z, vx, vy, vz] (meters, m/s)

required
location_ecef ndarray

Ground location in ECEF [x, y, z] (meters)

required

Returns:

Name Type Description
bool bool

True if constraint is satisfied, False otherwise

name method descriptor

name() -> Any

Get the constraint name

LookDirectionConstraint

LookDirectionConstraint

LookDirectionConstraint(allowed: LookDirection)

Look direction constraint (left/right relative to velocity).

Constrains access based on the look direction of the satellite relative to its velocity vector.

Parameters:

Name Type Description Default
allowed LookDirection

Required look direction (LEFT, RIGHT, or EITHER)

required
Example
import brahe as bh

# Satellite can only look right
constraint = bh.LookDirectionConstraint(allowed=bh.LookDirection.RIGHT)

# Either direction is acceptable
constraint = bh.LookDirectionConstraint(allowed=bh.LookDirection.EITHER)

Initialize instance.

__doc__ class-attribute

__doc__ = 'Look direction constraint (left/right relative to velocity).\n\nConstrains access based on the look direction of the satellite relative\nto its velocity vector.\n\nArgs:\n    allowed (LookDirection): Required look direction (LEFT, RIGHT, or EITHER)\n\nExample:\n    ```python\n    import brahe as bh\n\n    # Satellite can only look right\n    constraint = bh.LookDirectionConstraint(allowed=bh.LookDirection.RIGHT)\n\n    # Either direction is acceptable\n    constraint = bh.LookDirectionConstraint(allowed=bh.LookDirection.EITHER)\n    ```'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

__module__ class-attribute

__module__ = 'brahe._brahe'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

__repr__ method descriptor

__repr__() -> str

Return repr(self).

__str__ method descriptor

__str__() -> str

Return str(self).

evaluate method descriptor

evaluate(epoch: Epoch, sat_state_ecef: ndarray, location_ecef: ndarray) -> bool

Evaluate whether the constraint is satisfied.

Parameters:

Name Type Description Default
epoch Epoch

Time of evaluation

required
sat_state_ecef ndarray

Satellite state in ECEF [x, y, z, vx, vy, vz] (meters, m/s)

required
location_ecef ndarray

Ground location in ECEF [x, y, z] (meters)

required

Returns:

Name Type Description
bool bool

True if constraint is satisfied, False otherwise

name method descriptor

name() -> Any

Get the constraint name

LocalTimeConstraint

LocalTimeConstraint

LocalTimeConstraint(time_windows: list[tuple[int, int]])

Local solar time constraint.

Constrains access based on the local solar time at the ground location. Useful for sun-synchronous orbits or daytime-only imaging.

Time windows are specified in military time format (HHMM). Wrap-around windows (e.g., 2200-0200) are supported.

Parameters:

Name Type Description Default
time_windows list[tuple[int, int]]

List of (start_military, end_military) tuples (0-2400)

required

Raises:

Type Description
ValueError

If any military time is invalid (>2400 or minutes >=60)

Example
import brahe as bh

# Only daytime (6 AM to 6 PM local time)
constraint = bh.LocalTimeConstraint(time_windows=[(600, 1800)])

# Two windows: morning (6-9 AM) and evening (4-7 PM)
constraint = bh.LocalTimeConstraint(time_windows=[(600, 900), (1600, 1900)])

# Overnight window (10 PM to 2 AM) - handles wrap-around
constraint = bh.LocalTimeConstraint(time_windows=[(2200, 200)])

Initialize instance.

__doc__ class-attribute

__doc__ = 'Local solar time constraint.\n\nConstrains access based on the local solar time at the ground location.\nUseful for sun-synchronous orbits or daytime-only imaging.\n\nTime windows are specified in military time format (HHMM).\nWrap-around windows (e.g., 2200-0200) are supported.\n\nArgs:\n    time_windows (list[tuple[int, int]]): List of (start_military, end_military) tuples (0-2400)\n\nRaises:\n    ValueError: If any military time is invalid (>2400 or minutes >=60)\n\nExample:\n    ```python\n    import brahe as bh\n\n    # Only daytime (6 AM to 6 PM local time)\n    constraint = bh.LocalTimeConstraint(time_windows=[(600, 1800)])\n\n    # Two windows: morning (6-9 AM) and evening (4-7 PM)\n    constraint = bh.LocalTimeConstraint(time_windows=[(600, 900), (1600, 1900)])\n\n    # Overnight window (10 PM to 2 AM) - handles wrap-around\n    constraint = bh.LocalTimeConstraint(time_windows=[(2200, 200)])\n    ```'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

__module__ class-attribute

__module__ = 'brahe._brahe'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

__repr__ method descriptor

__repr__() -> str

Return repr(self).

__str__ method descriptor

__str__() -> str

Return str(self).

evaluate method descriptor

evaluate(epoch: Epoch, sat_state_ecef: ndarray, location_ecef: ndarray) -> bool

Evaluate whether the constraint is satisfied.

Parameters:

Name Type Description Default
epoch Epoch

Time of evaluation

required
sat_state_ecef ndarray

Satellite state in ECEF [x, y, z, vx, vy, vz] (meters, m/s)

required
location_ecef ndarray

Ground location in ECEF [x, y, z] (meters)

required

Returns:

Name Type Description
bool bool

True if constraint is satisfied, False otherwise

from_hours builtin

from_hours(time_windows: list[tuple[float, float]]) -> LocalTimeConstraint

Create from decimal hour windows instead of military time.

Parameters:

Name Type Description Default
time_windows list[tuple[float, float]]

List of (start_hour, end_hour) tuples [0, 24)

required

Returns:

Name Type Description
LocalTimeConstraint LocalTimeConstraint

The constraint instance

Example
import brahe as bh

# Only daytime (6 AM to 6 PM local time)
constraint = bh.LocalTimeConstraint.from_hours([(6.0, 18.0)])

# Overnight window (10 PM to 2 AM)
constraint = bh.LocalTimeConstraint.from_hours([(22.0, 2.0)])

name method descriptor

name() -> Any

Get the constraint name

AscDscConstraint

AscDscConstraint

AscDscConstraint(allowed: AscDsc)

Ascending/descending pass constraint.

Constrains access based on whether the satellite is on an ascending or descending pass (moving north or south).

Parameters:

Name Type Description Default
allowed AscDsc

Required pass type (ASCENDING, DESCENDING, or EITHER)

required
Example
import brahe as bh

# Only ascending passes
constraint = bh.AscDscConstraint(allowed=bh.AscDsc.ASCENDING)

# Either type is acceptable
constraint = bh.AscDscConstraint(allowed=bh.AscDsc.EITHER)

Initialize instance.

__doc__ class-attribute

__doc__ = 'Ascending/descending pass constraint.\n\nConstrains access based on whether the satellite is on an ascending or\ndescending pass (moving north or south).\n\nArgs:\n    allowed (AscDsc): Required pass type (ASCENDING, DESCENDING, or EITHER)\n\nExample:\n    ```python\n    import brahe as bh\n\n    # Only ascending passes\n    constraint = bh.AscDscConstraint(allowed=bh.AscDsc.ASCENDING)\n\n    # Either type is acceptable\n    constraint = bh.AscDscConstraint(allowed=bh.AscDsc.EITHER)\n    ```'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

__module__ class-attribute

__module__ = 'brahe._brahe'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

__repr__ method descriptor

__repr__() -> str

Return repr(self).

__str__ method descriptor

__str__() -> str

Return str(self).

evaluate method descriptor

evaluate(epoch: Epoch, sat_state_ecef: ndarray, location_ecef: ndarray) -> bool

Evaluate whether the constraint is satisfied.

Parameters:

Name Type Description Default
epoch Epoch

Time of evaluation

required
sat_state_ecef ndarray

Satellite state in ECEF [x, y, z, vx, vy, vz] (meters, m/s)

required
location_ecef ndarray

Ground location in ECEF [x, y, z] (meters)

required

Returns:

Name Type Description
bool bool

True if constraint is satisfied, False otherwise

name method descriptor

name() -> Any

Get the constraint name

Logical Composition

ConstraintAll

ConstraintAll

ConstraintAll(constraints: List)

Composite constraint combining multiple constraints with AND logic.

All constraints must be satisfied for the composite to evaluate to true.

Parameters:

Name Type Description Default
constraints list

List of constraint objects to combine with AND logic

required
Example
import brahe as bh

# Ground station with multiple requirements
elev = bh.ElevationConstraint(min_elevation_deg=5.0, max_elevation_deg=None)
time = bh.LocalTimeConstraint(time_windows=[(600, 1800)])
combined = bh.ConstraintAll(constraints=[elev, time])

Initialize instance.

__doc__ class-attribute

__doc__ = 'Composite constraint combining multiple constraints with AND logic.\n\nAll constraints must be satisfied for the composite to evaluate to true.\n\nArgs:\n    constraints (list): List of constraint objects to combine with AND logic\n\nExample:\n    ```python\n    import brahe as bh\n\n    # Ground station with multiple requirements\n    elev = bh.ElevationConstraint(min_elevation_deg=5.0, max_elevation_deg=None)\n    time = bh.LocalTimeConstraint(time_windows=[(600, 1800)])\n    combined = bh.ConstraintAll(constraints=[elev, time])\n    ```'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

__module__ class-attribute

__module__ = 'brahe._brahe'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

__repr__ method descriptor

__repr__() -> str

Return repr(self).

__str__ method descriptor

__str__() -> str

Return str(self).

evaluate method descriptor

evaluate(epoch: Epoch, sat_state_ecef: ndarray, location_ecef: ndarray) -> bool

Evaluate whether the constraint is satisfied.

Parameters:

Name Type Description Default
epoch Epoch

Time of evaluation

required
sat_state_ecef ndarray

Satellite state in ECEF [x, y, z, vx, vy, vz] (meters, m/s)

required
location_ecef ndarray

Ground location in ECEF [x, y, z] (meters)

required

Returns:

Name Type Description
bool bool

True if ALL constraints are satisfied, False otherwise

name method descriptor

name() -> Any

Get the constraint name

ConstraintAny

ConstraintAny

ConstraintAny(constraints: List)

Composite constraint combining multiple constraints with OR logic.

At least one constraint must be satisfied for the composite to evaluate to true.

Parameters:

Name Type Description Default
constraints list

List of constraint objects to combine with OR logic

required
Example
import brahe as bh

# Accept either high elevation or specific time window
elev = bh.ElevationConstraint(min_elevation_deg=60.0, max_elevation_deg=None)
time = bh.LocalTimeConstraint(time_windows=[(1200, 1400)])
combined = bh.ConstraintAny(constraints=[elev, time])

Initialize instance.

__doc__ class-attribute

__doc__ = 'Composite constraint combining multiple constraints with OR logic.\n\nAt least one constraint must be satisfied for the composite to evaluate to true.\n\nArgs:\n    constraints (list): List of constraint objects to combine with OR logic\n\nExample:\n    ```python\n    import brahe as bh\n\n    # Accept either high elevation or specific time window\n    elev = bh.ElevationConstraint(min_elevation_deg=60.0, max_elevation_deg=None)\n    time = bh.LocalTimeConstraint(time_windows=[(1200, 1400)])\n    combined = bh.ConstraintAny(constraints=[elev, time])\n    ```'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

__module__ class-attribute

__module__ = 'brahe._brahe'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

__repr__ method descriptor

__repr__() -> str

Return repr(self).

__str__ method descriptor

__str__() -> str

Return str(self).

evaluate method descriptor

evaluate(epoch: Epoch, sat_state_ecef: ndarray, location_ecef: ndarray) -> bool

Evaluate whether the constraint is satisfied.

Parameters:

Name Type Description Default
epoch Epoch

Time of evaluation

required
sat_state_ecef ndarray

Satellite state in ECEF [x, y, z, vx, vy, vz] (meters, m/s)

required
location_ecef ndarray

Ground location in ECEF [x, y, z] (meters)

required

Returns:

Name Type Description
bool bool

True if AT LEAST ONE constraint is satisfied, False otherwise

name method descriptor

name() -> Any

Get the constraint name

ConstraintNot

ConstraintNot

ConstraintNot()

Composite constraint negating another constraint with NOT logic.

The negated constraint must NOT be satisfied for this to evaluate to true.

Parameters:

Name Type Description Default
constraint

Constraint object to negate

required
Example
import brahe as bh

# Avoid low elevation angles (i.e., require high elevation)
low_elev = bh.ElevationConstraint(min_elevation_deg=None, max_elevation_deg=10.0)
high_elev = bh.ConstraintNot(constraint=low_elev)

Initialize instance.

__doc__ class-attribute

__doc__ = 'Composite constraint negating another constraint with NOT logic.\n\nThe negated constraint must NOT be satisfied for this to evaluate to true.\n\nArgs:\n    constraint: Constraint object to negate\n\nExample:\n    ```python\n    import brahe as bh\n\n    # Avoid low elevation angles (i.e., require high elevation)\n    low_elev = bh.ElevationConstraint(min_elevation_deg=None, max_elevation_deg=10.0)\n    high_elev = bh.ConstraintNot(constraint=low_elev)\n    ```'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

__module__ class-attribute

__module__ = 'brahe._brahe'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

__repr__ method descriptor

__repr__() -> str

Return repr(self).

__str__ method descriptor

__str__() -> str

Return str(self).

evaluate method descriptor

evaluate(epoch: Epoch, sat_state_ecef: ndarray, location_ecef: ndarray) -> bool

Evaluate whether the constraint is satisfied.

Parameters:

Name Type Description Default
epoch Epoch

Time of evaluation

required
sat_state_ecef ndarray

Satellite state in ECEF [x, y, z, vx, vy, vz] (meters, m/s)

required
location_ecef ndarray

Ground location in ECEF [x, y, z] (meters)

required

Returns:

Name Type Description
bool bool

True if the negated constraint is NOT satisfied, False otherwise

name method descriptor

name() -> Any

Get the constraint name

Custom Constraints

AccessPropertyComputer

AccessPropertyComputer

AccessPropertyComputer(window: AccessWindow, satellite_state_ecef: ndarray, location_ecef: ndarray)

Base class for custom access property computers.

Subclass this class and implement the compute and property_names methods to create custom property calculations that can be applied to access windows.

The compute method is called for each access window and should return a dictionary of property names to values. Properties can be scalars, vectors, time series, booleans, strings, or any JSON-serializable value.

Example
import brahe as bh
import numpy as np

class DopplerComputer(bh.AccessPropertyComputer):
    '''Computes Doppler shift at window midtime.'''

    def compute(self, window: bh.AccessWindow, satellite_state_ecef: np.ndarray, location_ecef: np.ndarray) -> dict:
        '''
        Args:
            window (AccessWindow): AccessWindow with timing information
            satellite_state_ecef (ndarray): Satellite state [x,y,z,vx,vy,vz] in ECEF (m, m/s)
            location_ecef (ndarray): Location position [x,y,z] in ECEF (m)

        Returns:
            dict: Property name -> value
        '''
        # Extract velocity
        vx, vy, vz = satellite_state_ecef[3:6]

        # Line-of-sight vector
        sat_pos = satellite_state_ecef[:3]
        los = location_ecef - sat_pos
        los_unit = los / np.linalg.norm(los)

        # Radial velocity
        sat_vel = np.array([vx, vy, vz])
        radial_velocity = np.dot(sat_vel, los_unit)

        # Doppler shift (L-band)
        freq_hz = 1.57542e9  # GPS L1
        doppler_hz = -radial_velocity * freq_hz / bh.C_LIGHT

        return {"doppler_shift": doppler_hz}

    def property_names(self) -> list:
        '''Return list of property names this computer produces.'''
        return ["doppler_shift"]

# Use with access computation (future)
computer = DopplerComputer()
# accesses = bh.compute_accesses(..., property_computers=[computer])
Notes
  • The compute method receives ECEF coordinates in SI units (meters, m/s)
  • Property values are automatically converted to appropriate Rust types
  • The window parameter provides access to timing via:
  • window.window_open: Start epoch
  • window.window_close: End epoch
  • window.midtime(): Midpoint epoch
  • window.duration(): Duration in seconds

Initialize instance.

__doc__ class-attribute

__doc__ = 'Base class for custom access property computers.\n\nSubclass this class and implement the `compute` and `property_names` methods\nto create custom property calculations that can be applied to access windows.\n\nThe compute method is called for each access window and should return a dictionary\nof property names to values. Properties can be scalars, vectors, time series,\nbooleans, strings, or any JSON-serializable value.\n\nExample:\n    ```python\n    import brahe as bh\n    import numpy as np\n\n    class DopplerComputer(bh.AccessPropertyComputer):\n        \'\'\'Computes Doppler shift at window midtime.\'\'\'\n\n        def compute(self, window: bh.AccessWindow, satellite_state_ecef: np.ndarray, location_ecef: np.ndarray) -> dict:\n            \'\'\'\n            Args:\n                window (AccessWindow): AccessWindow with timing information\n                satellite_state_ecef (ndarray): Satellite state [x,y,z,vx,vy,vz] in ECEF (m, m/s)\n                location_ecef (ndarray): Location position [x,y,z] in ECEF (m)\n\n            Returns:\n                dict: Property name -> value\n            \'\'\'\n            # Extract velocity\n            vx, vy, vz = satellite_state_ecef[3:6]\n\n            # Line-of-sight vector\n            sat_pos = satellite_state_ecef[:3]\n            los = location_ecef - sat_pos\n            los_unit = los / np.linalg.norm(los)\n\n            # Radial velocity\n            sat_vel = np.array([vx, vy, vz])\n            radial_velocity = np.dot(sat_vel, los_unit)\n\n            # Doppler shift (L-band)\n            freq_hz = 1.57542e9  # GPS L1\n            doppler_hz = -radial_velocity * freq_hz / bh.C_LIGHT\n\n            return {"doppler_shift": doppler_hz}\n\n        def property_names(self) -> list:\n            \'\'\'Return list of property names this computer produces.\'\'\'\n            return ["doppler_shift"]\n\n    # Use with access computation (future)\n    computer = DopplerComputer()\n    # accesses = bh.compute_accesses(..., property_computers=[computer])\n    ```\n\nNotes:\n    - The `compute` method receives ECEF coordinates in SI units (meters, m/s)\n    - Property values are automatically converted to appropriate Rust types\n    - The window parameter provides access to timing via:\n      - `window.window_open`: Start epoch\n      - `window.window_close`: End epoch\n      - `window.midtime()`: Midpoint epoch\n      - `window.duration()`: Duration in seconds'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

__module__ class-attribute

__module__ = 'brahe._brahe'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

compute method descriptor

compute(_window, _satellite_state_ecef, _location_ecef) -> dict

Compute custom properties for an access window.

Override this method in your subclass to implement custom property calculations.

Parameters:

Name Type Description Default
window AccessWindow

Access window with timing information

required
satellite_state_ecef ndarray

Satellite state in ECEF [x,y,z,vx,vy,vz] (meters, m/s)

required
location_ecef ndarray

Location position in ECEF [x,y,z] (meters)

required

Returns:

Name Type Description
dict dict

Dictionary mapping property names (str) to values (scalar, list, dict, etc.)

property_names method descriptor

property_names() -> list[str]

Return list of property names this computer will produce.

Override this method to return the list of property names that your compute() method will include in its returned dictionary.

Returns:

Type Description
list[str]

list[str]: List of property names

__repr__

__repr__() -> str

Return repr(self).

__str__

__str__() -> str

Return str(self).