Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
Add slew constraints
Browse files Browse the repository at this point in the history
* Add properties to the Mission class for overhead, slew
  velocity, and slew acceleration.
* Change the observation time from a binary decision variable to
  a continuous one.
* Implement the position-dependent slew constraints using a lazy
  constraint callback to keep the problem size manageable.
  • Loading branch information
lpsinger committed May 10, 2021
1 parent ebe49ee commit 4f98f16
Show file tree
Hide file tree
Showing 2 changed files with 198 additions and 64 deletions.
48 changes: 45 additions & 3 deletions dorado/scheduling/mission.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@

import astroplan
from astropy import units as u
import numpy as np

from . import data
from .constraints import (BrightEarthLimbConstraint, EarthLimbConstraint,
TrappedParticleFluxConstraint, get_field_of_regard)
from .fov import FOV
from .orbit import Orbit
from ._slew import slew_time

__all__ = ('Mission', 'dorado', 'ultrasat', 'uvex')

Expand All @@ -32,13 +34,34 @@ class Mission:
"""Container for mission configuration."""

constraints: Collection
"""Observing constraint."""

fov: FOV
"""Field of view."""

orbit: Orbit
"""The orbit."""

min_overhead: u.Quantity
"""Minimum overhead between observations (readout and settling time)."""

max_angular_velocity: u.Quantity
"""Maximum angular velocity for slews."""

max_angular_acceleration: u.Quantity
"""Maximum angular acceleration for slews."""

def get_field_of_regard(self, *args, **kwargs):
return get_field_of_regard(self.orbit, self.constraints,
*args, **kwargs)

def overhead(self, coord1, coord2):
# FIXME: doesn't handle slews between different roll angles!
return np.maximum(self.min_overhead,
slew_time(coord1.separation(coord2),
self.max_angular_velocity,
self.max_angular_acceleration))


dorado = Mission(
constraints=(
Expand All @@ -50,7 +73,10 @@ def get_field_of_regard(self, *args, **kwargs):
astroplan.MoonSeparationConstraint(23 * u.deg),
astroplan.GalacticLatitudeConstraint(10 * u.deg)),
fov=FOV.from_rectangle(7.1 * u.deg),
orbit=_read_orbit('dorado-625km-sunsync.tle')
orbit=_read_orbit('dorado-625km-sunsync.tle'),
min_overhead=42 * u.s,
max_angular_velocity=0.872 * u.deg / u.s,
max_angular_acceleration=0.244 * u.deg / u.s**2
)
"""Configuration for Dorado.
Expand All @@ -66,6 +92,10 @@ def get_field_of_regard(self, *args, **kwargs):
* The orbit one of four synthetic plausible orbits generated by Craig
Markwardt. It is a nearly circular sun-synchronous orbit at an altitude of
625 km.
* The maximum angular acceleration and angular velocity about its three
principal axes were given to us by the spacecraft vendor, but to be
conservative we are using the smallest values.
"""


Expand All @@ -76,7 +106,10 @@ def get_field_of_regard(self, *args, **kwargs):
astroplan.MoonSeparationConstraint(23 * u.deg),
astroplan.GalacticLatitudeConstraint(10 * u.deg)),
fov=FOV.from_rectangle(14.1 * u.deg),
orbit=_read_orbit('goes17.tle')
orbit=_read_orbit('goes17.tle'),
min_overhead=42 * u.s,
max_angular_velocity=0.872 * u.deg / u.s,
max_angular_acceleration=0.244 * u.deg / u.s**2
)
"""Configuration for ULTRASAT.
Expand All @@ -94,6 +127,9 @@ def get_field_of_regard(self, *args, **kwargs):
* ULTRASAT will be in a geosynchronous orbit. Here, we are using the orbital
elements of GOES-17, a real geosynchronous weather satellite that is
currently on orbit.
* Maximum angular acceleration, maximum angular velocity, and overhead time are
assumed to be the same as for Dorado.
"""


Expand All @@ -104,7 +140,10 @@ def get_field_of_regard(self, *args, **kwargs):
astroplan.MoonSeparationConstraint(23 * u.deg)
),
fov=FOV.from_rectangle(3.3 * u.deg),
orbit=_read_orbit('vela1.tle')
orbit=_read_orbit('vela1.tle'),
min_overhead=42 * u.s,
max_angular_velocity=0.872 * u.deg / u.s,
max_angular_acceleration=0.244 * u.deg / u.s**2
)
"""Configuration for UVEX.
Expand All @@ -122,4 +161,7 @@ def get_field_of_regard(self, *args, **kwargs):
with a perigee greater than 45,000 km. As a proxy, we use the actual two-line
elements for VELA 1, a historically important gamma-ray satellite with a
similar orbit.
* Maximum angular acceleration, maximum angular velocity, and overhead time are
assumed to be the same as for Dorado.
"""
Loading

0 comments on commit 4f98f16

Please sign in to comment.