lamberthub.utils.angles

Utilities related to angles computations

Module Contents

Functions

get_transfer_angle(r1, r2, prograde)

Solves for the transfer angle being known the sense of rotation.

get_orbit_normal_vector(r1, r2, prograde)

Computes a unitary normal vector aligned with the specific angular momentum

get_orbit_inc_and_raan_from_position_vectors(r1, r2, prograde)

Computes the inclination of the orbit being known an initial and a final

nu_to_E(nu, ecc)

Retrieves eccentric anomaly from true one.

E_to_nu(E, ecc)

Retrieves true anomaly from eccentric one.

nu_to_B(nu)

Retrieves parabolic anomaly from true one.

B_to_nu(B)

Retrieves the true anomaly from parabolic one.

nu_to_H(nu, ecc)

Retrieves hyperbolic anomaly from true one.

H_to_nu(H, ecc)

Retrieves hyperbolic anomaly from true one.

lamberthub.utils.angles.get_transfer_angle(r1, r2, prograde)

Solves for the transfer angle being known the sense of rotation.

Parameters
  • r1 (np.array) – Initial position vector.

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

  • prograde (bool) – If True, it assumes prograde motion, otherwise assumes retrograde.

Returns

dtheta – Transfer angle in radians.

Return type

float

lamberthub.utils.angles.get_orbit_normal_vector(r1, r2, prograde)

Computes a unitary normal vector aligned with the specific angular momentum one of the orbit.

Parameters
  • r1 (np.array) – Initial position vector.

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

  • prograde (bool) – If True, it assumes prograde motion, otherwise assumes retrograde.

Returns

i_h – Unitary vector aligned with orbit specific angular momentum.

Return type

np.array

lamberthub.utils.angles.get_orbit_inc_and_raan_from_position_vectors(r1, r2, prograde)

Computes the inclination of the orbit being known an initial and a final position vectors together with the sense of motion.

Parameters
  • r1 (np.array) – Initial position vector.

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

  • prograde (bool) – If True, it assumes prograde motion, otherwise assumes retrograde.

Returns

  • inc (float) – Inclination of the orbit.

  • raan (float) – Right ascension of the ascending node.

lamberthub.utils.angles.nu_to_E(nu, ecc)

Retrieves eccentric anomaly from true one.

Parameters
  • nu (float) – True anomaly.

  • ecc (float) – Eccentricity of the orbit.

Returns

E – Eccentric anomaly.

Return type

float

lamberthub.utils.angles.E_to_nu(E, ecc)

Retrieves true anomaly from eccentric one.

Parameters
  • E (float) – Eccentric anomaly.

  • ecc (float) – Eccentricity of the orbit.

Returns

nu – True anomaly.

Return type

float

lamberthub.utils.angles.nu_to_B(nu)

Retrieves parabolic anomaly from true one.

Parameters

nu (float) – True anomaly

Returns

B – Parabolic anomaly

Return type

float

Notes

As explained in Vallado’s [1], \(B\) is used instead of \(P\) just to not confuse with the orbital parameter.

lamberthub.utils.angles.B_to_nu(B)

Retrieves the true anomaly from parabolic one.

Parameters

B (float) – Parabolic anomaly

Returns

nu – True anomaly

Return type

float

Notes

As explained in Vallado’s [1], \(B\) is used instead of \(P\) just to not confuse with the orbital parameter.

lamberthub.utils.angles.nu_to_H(nu, ecc)

Retrieves hyperbolic anomaly from true one.

Parameters
  • nu (float) – True anomaly

  • ecc (float) – Eccentricity of the orbit

Returns

H – Hyperbolic anomaly

Return type

float

lamberthub.utils.angles.H_to_nu(H, ecc)

Retrieves hyperbolic anomaly from true one.

Parameters
  • H (float) – Hyperbolic anomaly

  • ecc (float) – Eccentricity of the orbit

Returns

nu – True anomaly

Return type

float