a
    ߙfb                     @   s   d Z ddlZddlmZ ddlZddlmZ ddlm	Z
 ddlmZmZmZ ddlmZ d	gZd
ZdZdZdZdZdZdZdZdZdZdZedddddd	 ZdS )z
This module contains convenience functions implementing some of the
algorithms contained within Jean Meeus, 'Astronomical Algorithms',
second edition, 1998, Willmann-Bell.
    N)polyval)
deprecated)units   )ICRSSkyCoordGeocentricTrueEcliptic)get_jd12	calc_moon)<)r   r   r   r   i_ iu)   r   r   ip iY)r   r   r   r   i
 i@)r   r   r   r   irB iM)r   r   r   r   i,i  )r   r   r   r   idAi)r   r   r   i  i )r   r   r   r   i  i)r   r   r   r   iJ  ie)r   r   r   r   i  i)r   r   r   r   i%`i)r   r   r   r   i`xiǨ )r   r   r   r   iQi3 )r   r   r   r   i;  iQ(  )r   r   r   r   ir   )r   r   r   r   i*  i-7 )   r   r   r   i)  i"x)r   r      r   i2'  iV)r   r   r   r   id!  i|)r   r   r   r   i0i^  )r   r   r   r   iihx  )r   r   r   r   iiE)r   r   r   r   i{  iݾ)r   r   r   r   i  i)r   r   r   r   i  i3)r   r   r   r   i  i~)r   r   r   iQ  iC8  )r   r   r   r   ii)r   r   r   r   ir   )r   r   r   r   iV	  iH'  )r   r   r   r   ii  )r   r   r   r   i  id)r   r   r   r   iiw  )r   r   r   r   ir   )r   r   r   r   i   i)r   r   r   r   ii"  )r   r   r   r   ir   )r   r   r   r   i  i)r   r   r   r   ir   )r   r   r   r   ii  )r   r   r   r   ii8
  )r   r   r   r   i  i)r   r   r   r   i7i)r   r   r   r   iDi2	  )r   r   r   r   i  r   )r   r   r   r   T  r   )r   r   r   r   i%  iq)r   r   r   r   i  i)r   r   r   r   i  i)r   r   r   r   ii5)r   r   r   r   iqr   )r   r   r   r   ii)r   r   r   r   i_  r   )r   r   r   r   ir   )r   r   r   r   iJ  r   )r   r   r   r   iG  r   )r   r   r   r   ii  )r   r   r   r   i+  r   )r   r   r   r   i&  r   )r   r   r   r   r   i0"  )<)r   r   r   r   i?N )r   r   r   r   iH )r   r   r   r   i< )r   r   r   r   i )r   r   r   r   iu  )r   r   r   r   i  )r   r   r   r   i=  )r   r   r   r   i.C  )r   r   r   r   i2$  )r   r   r   r   iv"  )r   r   r   r   i   )r   r   r   r   i  )r   r   r   r   ih  )r   r   r   r   i)r   r   r   r   i	  )r   r   r   r   i  )r   r   r   r   i  )r   r   r   r   i)r   r   r   r   i$  )r   r   r   r   i)r   r   r   r   i+)r   r   r   r   i)r   r   r   r   i-)r   r   r   r   i=)r   r   r   r   i~)r   r   r   r   i)r   r   r   r   i)r   r   r   r   iS  )r   r   r   r   i  )r   r   r   r   iA  )r   r   r   r   i	  )r   r   r   r   i  )r   r   r   r   i_  )r   r   r   r   r   )r   r   r   r   i  )r   r   r   r   i=)r   r   r   r   i  )r   r   r   r   i  )r   r   r   r   i  )r   r   r   r   i)r   r   r   r   i)r   r   r   r   iK  )r   r   r   r   i;  )r   r   r   r   i.  )r   r   r   r   i)r   r   r   r   i)r   r   r   r      )r   r   r   r   r   )r   r   r   r   $)r   r   r   r   r   )r   r   r   r   iG)r   r   r   r      )r   r   r   r   iO)r   r   r   r      )r   r   r   r      )r   r   r   r   i\)r   r   r   r      )r   r   r   r   i)r   r   r   r   s   )r   r   r   r   k   )gO\W Jk@g/$_AgC Yg/">gKNxP)g"5br@gqL-Ag%B^ge$>g^~LB)gO:wXv@g@gv!$g9e>)g##`@gx; Ag:T?g>g75>r)g%jQW@gn~Agbmgs1VgǏhf>)g     ]@gI+{`@)gQJ@g(@A)g33333s@g-_A)g      ?gV6odg*ꂰ	߾z5.0zastropy.coordinates.get_moona  The private calc_moon function has been deprecated, as its functionality is now available in ERFA. Note that the coordinate system was not interpreted quite correctly, leading to small inaccuracies. Please use the public get_moon or get_body functions instead.)ZsinceZalternativemessagec                 C   s  | j jd d }tt|ttj}tt|ttj}tt|ttj}tt|t	tj}tt|t
tj}tt|ttj}tt|ttj}tt|ttj}	t|t}
d }}tD ]\}}}}}}|
t| }||| t|| ||  ||  ||   7 }||| t|| ||  ||  ||   7 }qd}tD ]N\}}}}}|
t| }||| t|| ||  ||  ||   7 }qP|dt| dt||   dt|  7 }|dt| dt|	  d	t||   d	t||   d
t||   dt||   7 }|tj }|tj }t| d\}}t||\}}|tj }|| | }|}d|d  tj }t|||| | d}t|t S )as  
    Lunar position model ELP2000-82 of (Chapront-Touze' and Chapront, 1983, 124, 50)

    This is the simplified version of Jean Meeus, Astronomical Algorithms,
    second edition, 1998, Willmann-Bell. Meeus claims approximate accuracy of 10"
    in longitude and 4" in latitude, with no specified time range.

    Tests against JPL ephemerides show accuracy of 10 arcseconds and 50 km over the
    date range CE 1950-2050.

    Parameters
    ----------
    t : `~astropy.time.Time`
        Time of observation.

    Returns
    -------
    skycoord : `~astropy.coordinates.SkyCoord`
        ICRS Coordinate for the body
    g     @@g      Y@g        iv  i  i>  iEi~        r   Zttgףp=Ai  )ZdistanceZobstimeZequinox)ZtdbZjyearuZQuantityr   _coLcZdeg_coD_coM_coMc_coF_coA1_coA2_coA3_coE	_MOON_L_RabsnpZsinZcos_MOON_BZmicrodegreer	   erfaZnut06aZradZkmr   r   Ztransform_tor   )tTZLcDMZMcFZA1ZA2ZA3EZsumlZsumrZDNumZMNumZMcNumZFNumZLFacZRFacZcorrZsumbZBFacZjd1Zjd2Znut_ZlonZlatZdistZecliptic_coo r3   Clib/python3.9/site-packages/astropy/coordinates/orbital_elements.pyr
      sN    
2462.


)__doc__Znumpyr)   Znumpy.polynomial.polynomialr   r+   Zastropy.utilsr   Zastropyr   r    r   r   r   Zbuiltin_frames.utilsr	   __all__r'   r*   r   r   r    r!   r"   r#   r$   r%   r&   r
   r3   r3   r3   r4   <module>   s0   AI