Sidereon.Astro.Anomaly (Sidereon v0.31.2)

Copy Markdown View Source

Kepler anomaly conversions and two-body propagation for classical elements.

Summary

Types

kepler_solution()

@type kepler_solution() :: %{anomaly: float(), iterations: non_neg_integer()}

scalar_result()

@type scalar_result() :: {:ok, float()} | {:error, atom()}

Functions

eccentric_to_mean(ecc_anom, ecc)

@spec eccentric_to_mean(number(), number()) :: scalar_result()

Eccentric anomaly to mean anomaly.

eccentric_to_mean!(a, e)

eccentric_to_true(ecc_anom, ecc)

@spec eccentric_to_true(number(), number()) :: scalar_result()

Eccentric anomaly to true anomaly.

eccentric_to_true!(a, e)

mean_to_eccentric(mean_anom, ecc)

@spec mean_to_eccentric(number(), number()) :: scalar_result()

Mean anomaly to eccentric anomaly.

mean_to_eccentric!(m, e)

mean_to_true(mean_anom, ecc)

@spec mean_to_true(number(), number()) :: scalar_result()

Mean anomaly to true anomaly.

mean_to_true!(m, e)

propagate_kepler(elements, dt_s, mu \\ OrbitalElements.mu_earth())

@spec propagate_kepler(Sidereon.OrbitalElements.t(), number(), number()) ::
  {:ok, Sidereon.OrbitalElements.t()} | {:error, term()}

Propagate classical elements by dt_s under two-body Kepler motion.

propagate_kepler!(elements, dt_s, mu \\ OrbitalElements.mu_earth())

solve_kepler(mean_anom, ecc)

@spec solve_kepler(number(), number()) :: {:ok, kepler_solution()} | {:error, atom()}

Solve Kepler's equation for the middle anomaly.

solve_kepler!(m, e)

true_to_eccentric(true_anom, ecc)

@spec true_to_eccentric(number(), number()) :: scalar_result()

True anomaly to eccentric anomaly.

true_to_eccentric!(a, e)

true_to_mean(true_anom, ecc)

@spec true_to_mean(number(), number()) :: scalar_result()

True anomaly to mean anomaly.

true_to_mean!(a, e)