boinor.twobody.events ===================== .. py:module:: boinor.twobody.events Classes ------- .. autoapisummary:: boinor.twobody.events.Event boinor.twobody.events.AltitudeCrossEvent boinor.twobody.events.LithobrakeEvent boinor.twobody.events.LatitudeCrossEvent boinor.twobody.events.EclipseEvent boinor.twobody.events.PenumbraEvent boinor.twobody.events.UmbraEvent boinor.twobody.events.NodeCrossEvent boinor.twobody.events.LosEvent Module Contents --------------- .. py:class:: Event(terminal, direction) Base class for event functionalities. :param terminal: Whether to terminate integration if this event occurs. :type terminal: bool :param direction: Handle triggering of event. :type direction: float .. py:property:: terminal .. py:property:: direction .. py:property:: last_t .. py:method:: __call__(t, u, k) :abstractmethod: .. py:class:: AltitudeCrossEvent(alt, R, terminal=True, direction=-1) Bases: :py:obj:`Event` Detect if a satellite crosses a specific threshold altitude. :param alt: Threshold altitude (km). :type alt: float :param R: Radius of the attractor (km). :type R: float :param terminal: Whether to terminate integration if this event occurs. :type terminal: bool :param direction: Handle triggering of event based on whether altitude is crossed from above or below, defaults to -1, i.e., event is triggered only if altitude is crossed from above (decreasing altitude). :type direction: float .. py:method:: __call__(t, u, k) .. py:property:: terminal .. py:property:: direction .. py:property:: last_t .. py:class:: LithobrakeEvent(R, terminal=True) Bases: :py:obj:`AltitudeCrossEvent` Terminal event that detects impact with the attractor surface. :param R: Radius of the attractor (km). :type R: float :param terminal: Whether to terminate integration if this event occurs. :type terminal: bool .. py:method:: __call__(t, u, k) .. py:property:: terminal .. py:property:: direction .. py:property:: last_t .. py:class:: LatitudeCrossEvent(orbit, lat, terminal=False, direction=0) Bases: :py:obj:`Event` Detect if a satellite crosses a specific threshold latitude. :param orbit: Orbit. :type orbit: ~boinor.twobody.orbit.Orbit :param lat: Threshold latitude. :type lat: astropy.quantity.Quantity :param terminal: Whether to terminate integration if this event occurs, defaults to True. :type terminal: bool, optional :param direction: Handle triggering of event based on whether latitude is crossed from above or below, defaults to 0, i.e., event is triggered while traversing from both directions. :type direction: float, optional .. py:method:: __call__(t, u_, k) .. py:property:: terminal .. py:property:: direction .. py:property:: last_t .. py:class:: EclipseEvent(orbit, terminal=False, direction=0) Bases: :py:obj:`Event` Base class for the eclipse event. :param orbit: Orbit of the satellite. :type orbit: boinor.twobody.orbit.Orbit :param terminal: Whether to terminate integration when the event occurs, defaults to False. :type terminal: bool, optional :param direction: Specify which direction must the event trigger, defaults to 0. :type direction: float, optional .. py:attribute:: k .. py:attribute:: R_sec .. py:attribute:: R_primary .. py:method:: __call__(t, u_, k) .. py:property:: terminal .. py:property:: direction .. py:property:: last_t .. py:class:: PenumbraEvent(orbit, terminal=False, direction=0) Bases: :py:obj:`EclipseEvent` Detect whether a satellite is in penumbra or not. :param orbit: Orbit of the satellite. :type orbit: boinor.twobody.orbit.Orbit :param terminal: Whether to terminate integration when the event occurs, defaults to False. :type terminal: bool, optional :param direction: Handle triggering of event based on whether entry is into or out of penumbra, defaults to 0, i.e., event is triggered at both, entry and exit points. :type direction: float, optional .. py:method:: __call__(t, u_, k) .. py:attribute:: k .. py:attribute:: R_sec .. py:attribute:: R_primary .. py:property:: terminal .. py:property:: direction .. py:property:: last_t .. py:class:: UmbraEvent(orbit, terminal=False, direction=0) Bases: :py:obj:`EclipseEvent` Detect whether a satellite is in umbra or not. :param orbit: Orbit of the satellite. :type orbit: boinor.twobody.orbit.Orbit :param terminal: Whether to terminate integration when the event occurs, defaults to False. :type terminal: bool, optional :param direction: Handle triggering of event based on whether entry is into or out of umbra, defaults to 0, i.e., event is triggered at both, entry and exit points. :type direction: float, optional .. py:method:: __call__(t, u_, k) .. py:attribute:: k .. py:attribute:: R_sec .. py:attribute:: R_primary .. py:property:: terminal .. py:property:: direction .. py:property:: last_t .. py:class:: NodeCrossEvent(terminal=False, direction=0) Bases: :py:obj:`Event` Detect equatorial node (ascending or descending) crossings. :param terminal: Whether to terminate integration when the event occurs, defaults to False. :type terminal: bool, optional :param direction: Handle triggering of event based on whether the node is crossed from above i.e. descending node, or is crossed from below i.e. ascending node, defaults to 0, i.e. event is triggered during both crossings. :type direction: float, optional .. py:method:: __call__(t, u_, k) .. py:property:: terminal .. py:property:: direction .. py:property:: last_t .. py:class:: LosEvent(attractor, pos_coords, terminal=False, direction=0) Bases: :py:obj:`Event` Detect whether there exists a LOS between two satellites. :param attractor: The central attractor with respect to which the position vectors of the satellites are defined. :type attractor: ~boinor.bodies.body :param pos_coords: A list of position coordinates for the secondary body. These coordinates can be found by propagating the body for a desired amount of time. :type pos_coords: ~astropy.quantity.Quantity .. py:method:: __call__(t, u_, k) .. py:property:: terminal .. py:property:: direction .. py:property:: last_t