Kepler#
Functions for solving Kepler’s equation.
This is a fork of squishyplanet/engine/kepler.py, which itself is a fork of jaxoplanet/src/jaxoplanet/core/kepler.py, many thanks to the original authors
- jorbit.utils.kepler.M_from_f(f, ecc)[source]#
Compute the mean anomaly from the true anomaly and eccentricity.
- Parameters:
f (
float) – True anomaly in radians.ecc (
float) – Eccentricity.
- Returns:
Mean anomaly in radians.
- Return type:
float
- jorbit.utils.kepler.kepler(M, ecc)[source]#
Solve Kepler’s equation to compute the true anomaly.
This implementation is based on that within jaxoplanet, many thanks to the authors.
- Parameters:
M (
float) – Mean anomalyecc (
float) – Eccentricity
- Returns:
True anomaly in radians
- Return type:
float
- jorbit.utils.kepler.keplerian_propagate(x0, v0, t0, times, gm)[source]#
Propagate a Keplerian orbit to new times.
- Parameters:
x0 (
Array) – Initial position (1, 3), ecliptic frame.v0 (
Array) – Initial velocity (1, 3), ecliptic frame.t0 (
float) – Initial time (scalar, JD TDB).times (
Array) – Target times (N,), JD TDB.gm (
float) – Gravitational parameter (GM) in AU^3/day^2.
- Returns:
Positions (N, 3) and velocities (N, 3) in ecliptic frame.
- Return type:
tuple[Array,Array]