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

Commit

Permalink
Added documentation from angles modules
Browse files Browse the repository at this point in the history
  • Loading branch information
astrojuanlu committed Jun 7, 2015
1 parent 21e14bd commit b18afc9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
10 changes: 8 additions & 2 deletions docs/source/api.rst
@@ -1,14 +1,20 @@
API Reference
=============

poliastro.twobody module
------------------------
poliastro.twobody package
-------------------------

.. automodule:: poliastro.twobody

.. autoclass:: State()
:members:

poliastro.twobody.angles module
-------------------------------

.. automodule:: poliastro.twobody.angles
:members:

poliastro.maneuver module
-------------------------

Expand Down
20 changes: 17 additions & 3 deletions poliastro/twobody/angles.py
Expand Up @@ -7,8 +7,6 @@

from scipy import optimize

__all__ = ['fp_angle', 'M2nu', 'nu2M']


def _kepler_equation(E, M, ecc):
return E - ecc * np.sin(E) - M
Expand All @@ -21,6 +19,8 @@ def _kepler_equation_prime(E, M, ecc):
def nu_to_E(nu, ecc):
"""Eccentric anomaly from true anomaly.
.. versionadded:: 0.4.0
Parameters
----------
nu : float
Expand All @@ -41,6 +41,8 @@ def nu_to_E(nu, ecc):
def E_to_nu(E, ecc):
"""True anomaly from eccentric anomaly.
.. versionadded:: 0.4.0
Parameters
----------
E : float
Expand All @@ -61,6 +63,8 @@ def E_to_nu(E, ecc):
def M_to_E(M, ecc):
"""Eccentric anomaly from true anomaly.
.. versionadded:: 0.4.0
Parameters
----------
M : float
Expand All @@ -82,6 +86,8 @@ def M_to_E(M, ecc):
def E_to_M(E, ecc):
"""Mean anomaly from eccentric anomaly.
.. versionadded:: 0.4.0
Parameters
----------
E : float
Expand All @@ -102,6 +108,8 @@ def E_to_M(E, ecc):
def M_to_nu(M, ecc):
"""True anomaly from mean anomaly.
.. versionadded:: 0.4.0
Parameters
----------
M : float
Expand Down Expand Up @@ -129,6 +137,8 @@ def M_to_nu(M, ecc):
def nu_to_M(nu, ecc):
"""Mean anomaly from true anomaly.
.. versionadded:: 0.4.0
Parameters
----------
nu : float
Expand All @@ -150,14 +160,18 @@ def nu_to_M(nu, ecc):
def fp_angle(nu, ecc):
"""Flight path angle.
.. versionadded:: 0.4.0
Parameters
----------
nu : float
True anomaly (rad).
ecc : float
Eccentricity.
From Vallado 2007, pp. 113.
Notes
-----
Algorithm taken from Vallado 2007, pp. 113.
"""
return np.arctan2(ecc * np.sin(nu), 1 + ecc * np.cos(nu))

0 comments on commit b18afc9

Please sign in to comment.