Skip to main content

A collection of Lambert's problem solvers

Project description

lamberthub: a hub of Lambert's problem solvers

Python shield CI shield Documentation Status codecov DOI

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

Install the latest stable release by running:

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. For further information about software internals, refer to API documentation.

Which solvers are available?

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

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

At this moment, the following algorithms are available:

>>> ['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:

# 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 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, were you can find a brief tutorials on how to use those tools.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lamberthub-0.1.tar.gz (33.4 kB view hashes)

Uploaded Source

Built Distribution

lamberthub-0.1-py3-none-any.whl (39.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page