Constraints¶
Constraints define criteria that must be satisfied for satellite access.
Built-in Constraints¶
ElevationConstraint¶
ElevationConstraint ¶
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 | None |
max_elevation_deg | float | None | Maximum elevation angle in degrees, or None for no maximum | None |
Raises:
| Type | Description |
|---|---|
ValueError | If both min and max are None (unbounded constraint is meaningless) |
Example
Initialize instance.
evaluate method descriptor ¶
evaluate(epoch: Epoch, sat_state_ecef: Union[ndarray, List], location_ecef: Union[ndarray, List]) -> bool
Evaluate whether the constraint is satisfied.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epoch | Epoch | Time of evaluation | required |
sat_state_ecef | ndarray or list | Satellite state in ECEF [x, y, z, vx, vy, vz] (meters, m/s) | required |
location_ecef | ndarray or list | Ground location in ECEF [x, y, z] (meters) | required |
Returns:
| Name | Type | Description |
|---|---|---|
bool | bool | True if constraint is satisfied, False otherwise |
ElevationMaskConstraint¶
ElevationMaskConstraint ¶
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
Initialize instance.
evaluate method descriptor ¶
evaluate(epoch: Epoch, sat_state_ecef: Union[ndarray, List], location_ecef: Union[ndarray, List]) -> bool
Evaluate whether the constraint is satisfied.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epoch | Epoch | Time of evaluation | required |
sat_state_ecef | ndarray or list | Satellite state in ECEF [x, y, z, vx, vy, vz] (meters, m/s) | required |
location_ecef | ndarray or list | Ground location in ECEF [x, y, z] (meters) | required |
Returns:
| Name | Type | Description |
|---|---|---|
bool | bool | True if constraint is satisfied, False otherwise |
OffNadirConstraint¶
OffNadirConstraint ¶
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 | None |
max_off_nadir_deg | float | None | Maximum off-nadir angle in degrees, or None for no maximum | None |
Raises:
| Type | Description |
|---|---|
ValueError | If both min and max are None, or if any angle is negative |
Example
Initialize instance.
evaluate method descriptor ¶
evaluate(epoch: Epoch, sat_state_ecef: Union[ndarray, List], location_ecef: Union[ndarray, List]) -> bool
Evaluate whether the constraint is satisfied.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epoch | Epoch | Time of evaluation | required |
sat_state_ecef | ndarray or list | Satellite state in ECEF [x, y, z, vx, vy, vz] (meters, m/s) | required |
location_ecef | ndarray or list | Ground location in ECEF [x, y, z] (meters) | required |
Returns:
| Name | Type | Description |
|---|---|---|
bool | bool | True if constraint is satisfied, False otherwise |
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
Initialize instance.
evaluate method descriptor ¶
evaluate(epoch: Epoch, sat_state_ecef: Union[ndarray, List], location_ecef: Union[ndarray, List]) -> bool
Evaluate whether the constraint is satisfied.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epoch | Epoch | Time of evaluation | required |
sat_state_ecef | ndarray or list | Satellite state in ECEF [x, y, z, vx, vy, vz] (meters, m/s) | required |
location_ecef | ndarray or list | Ground location in ECEF [x, y, z] (meters) | required |
Returns:
| Name | Type | Description |
|---|---|---|
bool | bool | True if constraint is satisfied, False otherwise |
LocalTimeConstraint¶
LocalTimeConstraint ¶
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
Initialize instance.
evaluate method descriptor ¶
evaluate(epoch: Epoch, sat_state_ecef: Union[ndarray, List], location_ecef: Union[ndarray, List]) -> bool
Evaluate whether the constraint is satisfied.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epoch | Epoch | Time of evaluation | required |
sat_state_ecef | ndarray or list | Satellite state in ECEF [x, y, z, vx, vy, vz] (meters, m/s) | required |
location_ecef | ndarray or list | 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 |
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
Initialize instance.
evaluate method descriptor ¶
evaluate(epoch: Epoch, sat_state_ecef: Union[ndarray, List], location_ecef: Union[ndarray, List]) -> bool
Evaluate whether the constraint is satisfied.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epoch | Epoch | Time of evaluation | required |
sat_state_ecef | ndarray or list | Satellite state in ECEF [x, y, z, vx, vy, vz] (meters, m/s) | required |
location_ecef | ndarray or list | Ground location in ECEF [x, y, z] (meters) | required |
Returns:
| Name | Type | Description |
|---|---|---|
bool | bool | True if constraint is satisfied, False otherwise |
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
Initialize instance.
evaluate method descriptor ¶
evaluate(epoch: Epoch, sat_state_ecef: Union[ndarray, List], location_ecef: Union[ndarray, List]) -> bool
Evaluate whether the constraint is satisfied.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epoch | Epoch | Time of evaluation | required |
sat_state_ecef | ndarray or list | Satellite state in ECEF [x, y, z, vx, vy, vz] (meters, m/s) | required |
location_ecef | ndarray or list | Ground location in ECEF [x, y, z] (meters) | required |
Returns:
| Name | Type | Description |
|---|---|---|
bool | bool | True if ALL constraints are satisfied, False otherwise |
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
Initialize instance.
evaluate method descriptor ¶
evaluate(epoch: Epoch, sat_state_ecef: Union[ndarray, List], location_ecef: Union[ndarray, List]) -> bool
Evaluate whether the constraint is satisfied.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epoch | Epoch | Time of evaluation | required |
sat_state_ecef | ndarray or list | Satellite state in ECEF [x, y, z, vx, vy, vz] (meters, m/s) | required |
location_ecef | ndarray or list | 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 |
ConstraintNot¶
ConstraintNot ¶
ConstraintNot(constraint: object)
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 | object | Constraint object to negate | required |
Example
Initialize instance.
evaluate method descriptor ¶
evaluate(epoch: Epoch, sat_state_ecef: Union[ndarray, List], location_ecef: Union[ndarray, List]) -> bool
Evaluate whether the constraint is satisfied.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epoch | Epoch | Time of evaluation | required |
sat_state_ecef | ndarray or list | Satellite state in ECEF [x, y, z, vx, vy, vz] (meters, m/s) | required |
location_ecef | ndarray or list | 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 |