EarthLimbConstraint#

class m4opt.constraints.EarthLimbConstraint(min)[source] [edit on github]#

Bases: Constraint

Constrain the angle from the Earth limb.

Parameters:

min (Annotated[Quantity, PhysicalType('angle')]) – Minimum angular separation from the Earth’s limb.

Notes

This constraint assumes a spherical Earth, so it is only accurate to about a degree for observers in very low Earth orbit (height of 100 km).

Examples

>>> from astropy.constants import R_earth
>>> from astropy.coordinates import EarthLocation, SkyCoord
>>> from astropy.time import Time
>>> from astropy import units as u
>>> from m4opt.constraints import EarthLimbConstraint
>>> observer_location = EarthLocation.from_geocentric(0 * u.m, 0 * u.m, 2 * R_earth)
>>> target_coord = SkyCoord(300 * u.deg, -30 * u.deg)
>>> obstime = Time.now()
>>> constraint = EarthLimbConstraint(10 * u.deg)
>>> constraint(observer_location, target_coord, obstime)
np.True_

Methods Summary

__call__(*args)

Evaluate the constraint at a given observer location, target position, and time.

Methods Documentation

__call__(*args)[source] [edit on github]#

Evaluate the constraint at a given observer location, target position, and time.