orbital.utilities

orbital.utilities.altitude_from_radius(radius, body)

Return altitude for a given radius.

orbital.utilities.angular_momentum(position, velocity)

Return angular momentum.

Parameters:
  • position (Position) – Position (r) [m]
  • velocity (Velocity) – Velocity (v) [m/s]
Returns:

Angular momentum (h) [N·m·s]

Return type:

XyzVector

orbital.utilities.eccentric_anomaly_from_mean(e, M, tolerance=1e-14)

Convert mean anomaly to eccentric anomaly.

Implemented from [A Practical Method for Solving the Kepler Equation][1] by Marc A. Murison from the U.S. Naval Observatory

[1]: http://murison.alpheratz.net/dynamics/twobody/KeplerIterations_summary.pdf

orbital.utilities.eccentric_anomaly_from_true(e, f)

Convert true anomaly to eccentric anomaly.

orbital.utilities.eccentricity_vector(position, velocity, mu)

Return eccentricity vector.

Parameters:
  • position (Position) – Position (r) [m]
  • velocity (Velocity) – Velocity (v) [m/s]
  • mu (float) – Standard gravitational parameter (\(\mu\)) [m3·s-2]
Returns:

Eccentricity vector (ev) [-]

Return type:

XyzVector

orbital.utilities.elements_for_apsides(apocenter_radius, pericenter_radius)

Calculate planar orbital elements for given apside radii.

orbital.utilities.mean_anomaly_from_eccentric(e, E)

Convert eccentric anomaly to mean anomaly.

orbital.utilities.mean_anomaly_from_true(e, f)

Convert true anomaly to mean anomaly.

orbital.utilities.node_vector(angular_momentum)

Return node vector.

Parameters:angular_momentum (numpy.ndarray) – Angular momentum (h) [N·m·s]
Returns:Node vector (n) [N·m·s]
Return type:XyzVector
orbital.utilities.orbit_radius(a, e, f)

Calculate scalar orbital radius.

orbital.utilities.radius_from_altitude(altitude, body)

Return radius for a given altitude.

orbital.utilities.specific_orbital_energy(position, velocity, mu)

Return specific orbital energy.

Parameters:
  • position (Position) – Position (r) [m]
  • velocity (Velocity) – Velocity (v) [m/s]
  • mu (float) – Standard gravitational parameter (\(\mu\)) [m3·s-2]
Returns:

Specific orbital energy (E) [J/kg]

Return type:

float

class orbital.utilities.StateVector

StateVector(position, velocity)

position

Alias for field number 0

velocity

Alias for field number 1

orbital.utilities.true_anomaly_from_eccentric(e, E)

Convert eccentric anomaly to true anomaly.

orbital.utilities.true_anomaly_from_mean(e, M, tolerance=1e-14)

Convert mean anomaly to true anomaly.

orbital.utilities.uvw_from_elements(i, raan, arg_pe, f)

Return U, V, W unit vectors.

Parameters:
  • i (float) – Inclination (\(i\)) [rad]
  • raan (float) – Right ascension of ascending node (\(\Omega\)) [rad]
  • arg_pe (float) – Argument of periapsis (\(\omega\)) [rad]
  • f (float) – True anomaly (\(f\)) [rad]
Returns:

Radial direction unit vector (\(U\))

Returns:

Transversal (in-flight) direction unit vector (\(V\))

Returns:

Out-of-plane direction unit vector (\(W\))

Return type:

numpy.ndarray