Metadata-Version: 2.1
Name: lamberthub
Version: 0.1
Summary: A collection of Lambert's problem solvers 
Keywords: aerospace,astrodynamics,orbital-mechanics,kepler,lambert,orbit-determination
Author-email: Jorge Martínez Garrido <jorge@on-orbit.dev>
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Scientific/Engineering :: Astronomy
Requires-Dist: cmaps
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: black==20.8b1 ; extra == "dev"
Requires-Dist: coverage ; extra == "dev"
Requires-Dist: isort ; extra == "dev"
Requires-Dist: docutils<0.17,>=0.12 ; extra == "dev"
Requires-Dist: markdown-it-py~=0.6.2 ; extra == "dev"
Requires-Dist: myst-nb ; extra == "dev"
Requires-Dist: notebook ; extra == "dev"
Requires-Dist: pycodestyle ; extra == "dev"
Requires-Dist: pytest>=3.2 ; extra == "dev"
Requires-Dist: pytest-cov<2.6.0 ; extra == "dev"
Requires-Dist: pytest-doctestplus>=0.8 ; extra == "dev"
Requires-Dist: pytest-mpl ; extra == "dev"
Requires-Dist: sphinx ; extra == "dev"
Requires-Dist: sphinx-autoapi ; extra == "dev"
Requires-Dist: sphinx-book-theme ; extra == "dev"
Requires-Dist: tox ; extra == "dev"
Project-URL: Homepage, https://www.poliastro.space
Project-URL: Source, https://github.com/jorgepiloto/lamberthub
Project-URL: Tracker, https://github.com/jorgepiloto/lamberthub/issues
Provides-Extra: dev

# lamberthub: a hub of Lambert's problem solvers

<img align="left" width=350px src="https://github.com/jorgepiloto/lamberthub/blob/main/docs/source/_static/lamberts_problem_geometry.png"/>

![Python shield](https://img.shields.io/badge/%F0%9F%90%8D%20Python-%3E%3D%203.8-blue)
![CI shield](https://github.com/jorgepiloto/lamberthub/actions/workflows/ci_actions.yml/badge.svg?branch=main)
[![Documentation Status](https://readthedocs.org/projects/lamberthub/badge/?version=latest)](https://lamberthub.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/jorgepiloto/lamberthub/branch/main/graph/badge.svg?token=3BY2J5AB8D)](https://codecov.io/gh/jorgepiloto/lamberthub)
[![DOI](https://zenodo.org/badge/364482782.svg)](https://zenodo.org/badge/latestdoi/364482782)

A collection of Lambert's problem solvers implemented using modern Python.

**Install the latest stable release by running:**

```bash
pip install lamberthub
```

Just in case you are interested on knowing what the problem is about, how to
solve it or which applications it has, please check the [official documentation
of the project](https://lamberthub.readthedocs.io/en/latest/). For further
information about software internals, refer to [API
documentation](https://lamberthub.readthedocs.io/en/latest/autoapi/lamberthub/index.html).


## Which solvers are available?

Once installed, you can start by checking which solvers `lamberthub` ships with
by running:

```python
from lamberthub import ALL_SOLVERS
print([solver.__name__ for solver in ALL_SOLVERS])
```

At this moment, the following algorithms are available:

```bash
>>> ['gooding1990', 'avanzini2008', 'arora2013', 'izzo2015']
```

## How can I use a solver?

Any Lambert's problem algorithm implemented in `lamberthub` is a Python function
which accepts the following parameters:

```python
# Import a solver of your choice from the ones listed above
from lamberthub import authorYYYY
v1, v2 = authorYYYY(mu, r1, r2, tof, prograde=True, low_path=True, maxiter=35, atol=1e-5, rtol=1e-7, full_output=False)
```

where `author` is the name of the author which developed the solver and `YYYY`
the year of publication. Any of the solvers hosted by the `ALL_SOLVERS` macro
can be used.

**Parameters**
* `mu`: the gravitational parameter, that is the mass of the attracting body
  times the gravitational constant.
* `r1`: initial position vector.
* `r2`: final position vector.
* `tof`: time of flight between initial and final vectors.

**Additional parameters**
* `prograde`: this parameter controls the inclination of the final orbit. If set
  to `True`, the transfer will have an inclination between 0 and 90 degrees
  while if `False` inclinations between 90 and 180 are provided.
* `low_path`: selects the type of path when more than two solutions are available.
  There is no actual advantage on one or another solution, unless you have
  particular constrains on your mission.
* `maxiter`: maximum number of iterations allowed when computing the solution.
* `atol`: absolute tolerance for the iterative method.
* `rtol`: relative tolerance for the iterative method.
* `full_output`: if `True`, it returns additional information such us the number
  of iterations. 

**Returns**
* `v1`: initial velocity vector.
* `v2`: final velocity vector.

**Additional returns**
* `numiter`: number of iterations. Only if `full_output` has been set to `True`.
* `tpi`: time per iteration. Only if `full_output` has been set to `True`.

## Documentation and performance comparison tools

The [official lamberthub
documentation](https://lamberthub.readthedocs.io/en/latest/) contains different
how-to guides, explanations, tutorials and references related to the package.

If you are interested in the performance comparison tools provided, please refer
to [this documentation
chapter](https://lamberthub.readthedocs.io/en/latest/explanations/performance_comparison.html),
were you can find a brief tutorials on how to use those tools.

