# lamberthub.universal_solvers.vallado

This module holds all methods devised by David A. Vallado.

## Module Contents

### Functions

 vallado2013(mu, r1, r2, tof, M=0, prograde=True, low_path=True, maxiter=100, atol=1e-05, rtol=1e-07, full_output=False) Vallado's algorithm makes use of the universal formulation to solve for the _tof_vallado(mu, psi, X, A, y) Evaluates universal Kepler's equation. _X_at_psi(psi, y) Computes the value of X at given psi. _get_A(r1_norm, r2_norm, dtheta) Computes the value of the A constant. _y_at_psi(psi, r1_norm, r2_norm, A) Evaluates the value of y at given psi.

Vallado’s algorithm makes use of the universal formulation to solve for the Lambert’s problem. By making use of a bisection method, it guarantees the convergence to the solution but the amount of iterations require dramatically increases.

Parameters
• mu (float) – Gravitational parameter, equivalent to $$GM$$ of attractor body.

• r1 (numpy.array) – Initial position vector.

• r2 (numpy.array) – Final position vector.

• M (int) – Number of revolutions. Must be equal or greater than 0 value.

• low_path (bool) – If two solutions are available, it selects between high or low path.

• maxiter (int) – Maximum number of iterations.

• atol (float) – Absolute tolerance.

• rtol (float) – Relative tolerance.

• full_output (bool) – If True, the number of iterations and time per iteration are also returned.

Returns

• v1 (numpy.array) – Initial velocity vector.

• v2 (numpy.array) – Final velocity vector.

• numiter (int) – Number of iterations.

• tpi (float) – Time per iteration in seconds.

Notes

This algorithm is presented as an alternative to the one developed by Bate in 1971. Bate did not impose a particular numerical solver for his algorithm but cited both bisection and Newton’s one. However, for some values of the boundary problem, the initial guess might diverge if Newton’s solver is used. That’s why Vallado decided to employ a bisection method instead. Although detrimental from the point of view of performance, this algorithm properly reaches solution in the majority of the cases.

All credits of the implementation go to Juan Luis Cano Rodríguez and the poliastro development team, from which this routine inherits. Some changes were made to adapt it to lamberthub API.

Copyright (c) 2012-2021 Juan Luis Cano Rodríguez and the poliastro development team.

References

 Vallado, D. A. (2001). Fundamentals of astrodynamics and applications (Vol. 12). Springer Science & Business Media.

Evaluates universal Kepler’s equation.

Parameters
• mu (float) – The gravitational parameter.

• psi (float) – The free-parameter or independent variable.

• X (float) – Auxiliary variable.

• A (float) – The transfer angle parameter.

• y (float) – Auxiliary variable.

Returns

tof – The computed time of flight.

Return type

float

Computes the value of X at given psi.

Parameters
• psi (float) – The free-parameter or independent variable.

• y (float) – Auxiliary variable.

Returns

X – Auxiliary variable.

Return type

float

Computes the value of the A constant.

Parameters
• r1_norm (float) – Initial position vector norm.

• r2_norm (float) – Final position vector norm.

• dtheta (float) – The transfer angle in radians.

Returns

A – The transfer angle parameter.

Return type

float

Evaluates the value of y at given psi.

Parameters
• psi (float) – The free-parameter or independent variable.

• r1_norm (float) – Initial position vector norm.

• r2_norm (float) – Final position vector norm.

• A (float) – The transfer angle parameter.

Returns

y – Auxiliary variable.

Return type

float

Notes

This is equation (7-59) simplified, similarly as made in .