lamberthub.ecc_solvers.utils
#
Holds auxiliary functions used by eccentricity based Lambert’s problem solvers. The majority of the routines hosted within this module were directly taken from the following publications [1] [2] [3].
- [1] Avanzini, G. (2008). A simple Lambert algorithm. Journal of guidance,
control, and dynamics, 31(6), 1587-1594.
- [2] He, Q., Li, J., & Han, C. (2010). Multiple-revolution solutions of the
transverse-eccentricity-based Lambert problem. Journal of guidance, control, and dynamics, 33(1), 265-269.
- [3] Wen, Changxuan, Yushan Zhao, and Peng Shi. “Derivative analysis and
algorithm modification of transverse-eccentricity-based Lambert problem.” Journal of Guidance, Control, and Dynamics 37.4 (2014): 1195-1201.
Module Contents#
Functions#
|
Computes associated problem geometry. |
|
Computes the eccentricity component along the chord. This value is kept |
|
Computes the semi-major axis of the fundamental ellipse. This value is |
|
Computes the orbital parameter (semi-latus) rectum of the fundamental |
|
Computes the fundamental ellipse properties. Those are the eccentricity, |
|
Computes transfer orbit eccentricity from transverse and fundamental |
|
Computes the orbital parameter or semi-latus rectum of the transfer orbit. |
|
Computes the semi-major axis of the transfer orbit. |
|
Solves for transfer orbit eccentricity, semi-major axis and orbital |
|
Compute the true anomalies for the initial and final position vectors |
|
Compute the initial and final true anomalies. |
|
Computes the time of flight at particular value of transverse eccentricity |
|
Returns a zero once the value of x makes the numerically compute time of |
|
Computes the classical orbita elements at particular value of transverse |
- lamberthub.ecc_solvers.utils.get_geometry(r1, r2, prograde)#
Computes associated problem geometry.
- Parameters:
r1 (np.array) – Initial position vector.
r2 (np.array) – Final position vector.
prograde (bool) – If True, assumes prograde motion, otherwise retrograde is applied.
- Returns:
r1_norm (float) – Norm of the initial position vector.
r1_norm (float) – Norm of the final position vector.
c_norm (float) – Norm of the chord vector.
dtheta (float) – Transfer angle.
w_c (float) – Angle between initial position and chord vectors.
- lamberthub.ecc_solvers.utils.get_eccF(r1_norm, r2_norm, c_norm)#
Computes the eccentricity component along the chord. This value is kept constant for all the problem as long as the boundary conditions are not changed.
- Parameters:
r1_norm (float) – Norm of the initial vector position.
r2_norm (float) – Norm of the final vector position.
c_norm (float) – Norm of the chord vector.
- Returns:
ecc_F – Eccentricity component along the chord direction.
- Return type:
float
Notes
Equation (3) from Avanzini’s report [1].
- lamberthub.ecc_solvers.utils.get_aF(r1_norm, r2_norm)#
Computes the semi-major axis of the fundamental ellipse. This value is kept constant for all the problem as long as the boundary conditions are not changed.
- Parameters:
r1_norm (float) – Norm of the initial vector position.
r2_norm (float) – Norm of the final vector position.
- Returns:
a_F – Semi-major axis of the fundamental ellipse.
- Return type:
float
Notes
No labeled equation (appears between [3] and [4]) from Avanzini’s report [1].
- lamberthub.ecc_solvers.utils.get_pF(a_F, ecc_F)#
Computes the orbital parameter (semi-latus) rectum of the fundamental ellipse. This value is kept constant for all the problem as long as the boundary conditions are not changed.
- Parameters:
a_F (float) – Semi-major axis of the fundamental ellipse.
ecc_F (float) – Eccentricity of the fundamental ellipse.
- Returns:
p_F – Orbital parameter / semi-latus rectum of the fundamental ellipse.
- Return type:
float
Notes
No labeled equation (appears between [3] and [4]) from Avanzini’s report
- lamberthub.ecc_solvers.utils.get_fundamental_ellipse_properties(r1_norm, r2_norm, c_norm)#
Computes the fundamental ellipse properties. Those are the eccentricity, semi-major axis and the orbital parameter.
- Parameters:
r1_norm (float) – Norm of the initial vector position.
r2_norm (float) – Norm of the final vector position.
c_norm (float) – Norm of the chord vector.
- Returns:
ecc_F (float) – Eccentricity component along the chord direction.
a_F (float) – Semi-major axis of the fundamental ellipse.
p_F (float) – Orbital parameter / semi-latus rectum of the fundamental ellipse.
- lamberthub.ecc_solvers.utils.ecc_at_eccT(ecc_T, ecc_F)#
Computes transfer orbit eccentricity from transverse and fundamental components.
- Parameters:
ecc_T (float) – Eccentricity transverse component.
ecc_F (float) – Eccentricity of the fundamental ellipse.
- Returns:
ecc – Eccentricity of the transfer orbit.
- Return type:
float
- lamberthub.ecc_solvers.utils.p_at_eccT(ecc_T, r1_norm, r2_norm, c_norm, dtheta, p_F)#
Computes the orbital parameter or semi-latus rectum of the transfer orbit.
- Parameters:
ecc_T (float) – Eccentricity transverse component.
r1_norm (float) – Norm of the initial vector position.
r2_norm (float) – Norm of the final vector position.
c_norm (float) – Norm of the chord vector.
dtheta (float) – Transfer angle.
p_F (float) – Orbital parameter or semi-latus rectum of the fundamental ellipse.
- Returns:
p – Orbital parameter or semi-lactus rectum.
- Return type:
float
- lamberthub.ecc_solvers.utils.a_at_eccT(ecc_T, ecc_F, p)#
Computes the semi-major axis of the transfer orbit.
- Parameters:
ecc_T (float) – Eccentricity transverse component.
ecc_F (float) – Eccentricity of the fundamental ellipse.
p (float) – Transfer orbit parameter or semi-latus rectum.
- Returns:
a – Semi-major axis of the transfer orbit.
- Return type:
float
- lamberthub.ecc_solvers.utils.eap_from_eccT(ecc_T, geometry)#
Solves for transfer orbit eccentricity, semi-major axis and orbital parameter.
- Parameters:
ecc_T (float) – Eccentricity component along transverse direction.
geometry (tuple) – A tuple hosting r1_norm, r2_norm, c_norm, dtheta and w_c geometry values.
- Returns:
ecc (float) – Absolute eccentricity of the transfer orbit.
a (float) – Semi-major axis of the transfer orbit.
p (float) – Semi-latus rectum of the transfer orbit.
- lamberthub.ecc_solvers.utils.w_at_eccT(ecc_T, ecc_F, w_c)#
Compute the true anomalies for the initial and final position vectors with respect to the transfer orbit.
- Parameters:
ecc_T (float) – Eccentricity transverse component.
ecc_F (float) – Eccentricity of the fundamental ellipse.
dtheta (float) – Transfer angle.
w_c (float) – Angle between the initial and chord vector.
- Returns:
nu_1 (float) – True anomaly of the initial position vector w.r.t. transfer orbit.
nu_2 (float) – True anomaly of the final position vector w.r.t. transfer orbit.
Notes
This is equation (6) from Quan He’s report [2].
- lamberthub.ecc_solvers.utils.get_true_anomalies(w, dtheta)#
Compute the initial and final true anomalies.
- Parameters:
w (float) – Argument of periapsis.
dtheta (float) – Transfer angle.
- Returns:
nu_1 (float) – Initial true anomaly.
nu_2 (float) – Final true anomaly.
- lamberthub.ecc_solvers.utils.kepler_tof_at_eccT(ecc_T, mu, geometry)#
Computes the time of flight at particular value of transverse eccentricity and problem boundary conditions.
- Parameters:
ecc_T (float) – Eccentricity component along transverse direction.
mu (float) – The gravitational parameter.
geometry (tuple) – A tuple hosting r1_norm, r2_norm, c_norm, dtheta and w_c geometry values.
- Returns:
tof – Dimensional time of flight from Kepler’s equation.
- Return type:
float
- lamberthub.ecc_solvers.utils._f(x, ecc_T_at_x, mu, geometry, tof12_s)#
Returns a zero once the value of x makes the numerically compute time of flight to be exactly the desired one.
- Parameters:
x (float) – The independent variable to be solved.
ecc_T_at_x (function) – Function to solve the eccentricity component along transverse direction.
mu (float) – The gravitational parameter.
geometry (tuple) – A tuple hosting r1_norm, r2_norm, c_norm, dtheta and w_c geometry values.
tof12_s (float) – Desired time of flight to be achieved.
Notes
This is equation (14) from Avanzini’s report [1].
- lamberthub.ecc_solvers.utils.coe_at_eccT(ecc_T, r1, r2, sense)#
Computes the classical orbita elements at particular value of transverse eccentricity.
- Parameters:
ecc_T (float) – Transverse eccentricity.
r1 (np.array) – Initial position vecor.
r1 – Final position vector.
sense (bool) – If True assumes prograde motion, otherwise retrograde is applied.
- Returns:
p (float) – Orbital parameter or semi-lactus rectum.
ecc (float) – Absolute orbit eccentricity.
inc (float) – Inclination of the orbit.
raan (float) – Right ascension of the ascending node.
argp (float) – Argument of periapsis.
nu_1 (float) – True anomaly at the first initial position vector.
nu_2 (float) – True anomaly at the first final position vector.