boinor.twobody.elements ======================= .. py:module:: boinor.twobody.elements .. autoapi-nested-parse:: module handling orbital elements for sub-package twobody Attributes ---------- .. autoapisummary:: boinor.twobody.elements.u_kms boinor.twobody.elements.u_km3s2 Functions --------- .. autoapisummary:: boinor.twobody.elements.circular_velocity boinor.twobody.elements.mean_motion boinor.twobody.elements.period boinor.twobody.elements.energy boinor.twobody.elements.eccentricity_vector boinor.twobody.elements.t_p boinor.twobody.elements.heliosynchronous boinor.twobody.elements.hyp_nu_limit boinor.twobody.elements.get_eccentricity_critical_argp boinor.twobody.elements.get_inclination_critical_argp boinor.twobody.elements.get_eccentricity_critical_inc boinor.twobody.elements.coe2rv boinor.twobody.elements.coe2rv_many Module Contents --------------- .. py:data:: u_kms .. py:data:: u_km3s2 .. py:function:: circular_velocity(k, a) Circular velocity for a given body (k) and semimajor axis (a). .. py:function:: mean_motion(k, a) Mean motion given body (k) and semimajor axis (a). .. py:function:: period(k, a) Period given body (k) and semimajor axis (a). .. py:function:: energy(k, r, v) Specific energy. .. py:function:: eccentricity_vector(k, r, v) Eccentricity vector. .. py:function:: t_p(nu, ecc, k, r_p) Elapsed time since latest perifocal passage. .. py:function:: heliosynchronous(k, R, J2, n_sunsync, a=None, ecc=None, inc=None) check whether Sun-synchronous orbit can be calculated and try to do it .. py:function:: hyp_nu_limit(ecc, r_max_ratio=np.inf) Limit true anomaly for hyperbolic orbits. :param ecc: Eccentricity, should be larger than 1. :type ecc: ~astropy.units.Quantity :param r_max_ratio: Value of :math:`r_{\text{max}} / p` for this angle, default to infinity. :type r_max_ratio: float, optional .. py:function:: get_eccentricity_critical_argp(R, J2, J3, a, inc) Cccentricity for frozen orbits when the argument of perigee is critical. :param R: Planet radius. :type R: ~astropy.units.Quantity :param J2: Planet J2 coefficient. :type J2: ~astropy.units.Quantity :param J3: Planet J3 coefficient. :type J3: ~astropy.units.Quantity :param a: Orbit's semimajor axis :type a: ~astropy.units.Quantity :param inc: Inclination. :type inc: ~astropy.units.Quantity .. py:function:: get_inclination_critical_argp(R, J2, J3, a, ecc) Inclination for frozen orbits when the argument of perigee is critical and the eccentricity is given. :param R: Planet radius. :type R: ~astropy.units.Quantity :param J2: Planet J2 coefficient. :type J2: ~astropy.units.Quantity :param J3: Planet J3 coefficient. :type J3: ~astropy.units.Quantity :param a: Semimajor axis. :type a: ~astropy.units.Quantity :param ecc: Eccentricity. :type ecc: ~astropy.units.Quantity .. py:function:: get_eccentricity_critical_inc(ecc=None) Eccentricity for frozen orbits when the inclination is critical. If ecc is None we set an arbitrary value which is the Moon eccentricity because it seems reasonable. :param ecc: Eccentricity, default to None. :type ecc: ~astropy.units.Quantity, optional .. py:function:: coe2rv(k, p, ecc, inc, raan, argp, nu) Converts from classical orbital to state vectors. Classical orbital elements are converted into position and velocity vectors by `rv_pqw` algorithm. A rotation matrix is applied to position and velocity vectors to get them expressed in terms of an IJK basis. :param k: Standard gravitational parameter (km^3 / s^2). :type k: float :param p: Semi-latus rectum or parameter (km). :type p: float :param ecc: Eccentricity. :type ecc: float :param inc: Inclination (rad). :type inc: float :param raan: Longitude of ascending node, omega (rad). :type raan: float :param argp: Argument of perigee (rad). :type argp: float :param nu: True anomaly (rad). :type nu: float :returns: * **rr** (*numpy.ndarray*) -- Position vector in basis ijk. * **vv** (*numpy.ndarray*) -- Velocity vector in basis ijk. * *For more information about the math, see explanation in corresponding core function* .. py:function:: coe2rv_many(k_arr, p_arr, ecc_arr, inc_arr, raan_arr, argp_arr, nu_arr) Parallel version of coe2rv