lamberthub.p_solvers.gauss

This module holds all methods devised by Carl Fredrich Gauss.

Module Contents

Functions

gauss1809(mu, r1, r2, tof, M=0, prograde=True, low_path=True, maxiter=250, atol=1e-05, rtol=1e-07, full_output=False)

Lambert's problem solver devised by Carl Friedrich Gauss in 1809. The method

_get_s(r1_norm, r2_norm, dtheta)

Returns the s auxiliary constant.

_get_w(mu, tof, r1_norm, r2_norm, dtheta)

Returns the w auxiliary constant.

_gauss_first_equation(y, s, w)

Evaluates Gauss' first equation.

_gauss_second_equation(x, s)

Evaluates Gauss' second equation.

_X_at_x(x, order=50)

Computes capital X as function of lower x.

lamberthub.p_solvers.gauss.gauss1809(mu, r1, r2, tof, M=0, prograde=True, low_path=True, maxiter=250, atol=1e-05, rtol=1e-07, full_output=False)

Lambert’s problem solver devised by Carl Friedrich Gauss in 1809. The method has been implemented according to Bate’s book (see [2]) and extended to the hyperbolic case. This method shows poor accuracy, being only suitable for low transfer angles.

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.

  • prograde (bool) – If True, specifies prograde motion. Otherwise, retrograde motion is imposed.

  • 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

The algorithm originally devised by Gauss exploits the so-called ratio of sector to triangle area, which is a numerical value related with the orbital parameter. This Algorithm was used to the discovery of the orbit of Ceres by the genius and adopted by many other authors of his time due to its simplicity. However, the Algorithm is found to be singular for transfer angles of 180 degrees and shows a low performance for really small angles.

References

[1] Gauss, C. F. (1809). Theoria motus corporum coelestium in sectionibus conicis solem ambientium auctore Carolo Friderico Gauss. sumtibus Frid. Perthes et IH Besser.

[2] Bate, R. R., Mueller, D. D., White, J. E., & Saylor, W. W. (2020). Fundamentals of astrodynamics. Courier Dover Publications.

lamberthub.p_solvers.gauss._get_s(r1_norm, r2_norm, dtheta)

Returns the s auxiliary constant.

Parameters
  • r1_norm (float) – The norm of the initial position vector.

  • r2_norm (float) – The norm of the final position vector.

  • dtheta (float) – The transfer angle.

Returns

s – An auxiliary constant.

Return type

float

Notes

This is equation number (5.6-2) from Bate’s book [2].

lamberthub.p_solvers.gauss._get_w(mu, tof, r1_norm, r2_norm, dtheta)

Returns the w auxiliary constant.

Parameters
  • mu (float) – The gravitational constant.

  • tof (float) – The time of flight.

  • r1_norm (float) – The norm of the initial position vector.

  • r2_norm (float) – The norm of the final position vector.

  • dtheta (float) – The transfer angle.

Returns

w – An auxiliary constant.

Return type

float

Notes

This is equation number (5.6-3) from Bate’s book [2].

lamberthub.p_solvers.gauss._gauss_first_equation(y, s, w)

Evaluates Gauss’ first equation.

Parameters
  • y (float) – The dependent variable.

  • s (float) – First auxiliary variable.

  • w (float) – Second auxiliary variable.

Returns

x – The independent variable or free-parameter.

Return type

float

Notes

This is equation (5.6-13) from Bate’s book [2].

lamberthub.p_solvers.gauss._gauss_second_equation(x, s)

Evaluates Gauss’ second equation.

Parameters
  • x (float) – The independent variable.

  • s (float) – First auxiliary variable

Returns

y – Dependent variable.

Return type

float

Notes

This is equation (5.6-14) from Bate’s book, reference [2].

lamberthub.p_solvers.gauss._X_at_x(x, order=50)

Computes capital X as function of lower x.

Parameters
  • x (float) – The independent variable.

  • n_items (int) – The number of terms to be considered in the series.

Returns

X – The series summation.

Return type

float

Notes

This is equation (5.6-15) from Bate’s book, in reference [2].