File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7575RETROGRADE = 1
7676STATIONARY = 2
7777
78+ """ Relative planetary rising / setting. """
79+ OCCIDENTAL = 0
80+ ORIENTAL = 1
81+
7882""" MC progression formulae. """
7983NAIBOD = 0
8084SOLAR_ARC = 1
Original file line number Diff line number Diff line change @@ -70,6 +70,14 @@ def object_movement_typical(object: dict) -> bool:
7070 return movement == calc .RETROGRADE if is_node else movement == calc .DIRECT
7171
7272
73+ def relative_position (object1 : dict | float , object2 : dict | float ) -> int :
74+ """ Calculate which side of object1 object2 is. """
75+ lon1 = object1 ['lon' ] if isinstance (object1 , dict ) else object1
76+ lon2 = object2 ['lon' ] if isinstance (object2 , dict ) else object2
77+
78+ return calc .OCCIDENTAL if swe .difdegn (lon1 , lon2 ) > 180 else calc .ORIENTAL
79+
80+
7381def is_out_of_bounds (object : dict | float , jd : float = None , obliquity : float = None ) -> bool :
7482 """ Returns whether the passed object is out of bounds either on the passed
7583 Julian date or relative to the passed obliquity. """
You can’t perform that action at this time.
0 commit comments