SPH
|
Classes | |
struct | Elements |
Object holding Keplerian orbital elements of a body. More... | |
Functions | |
Optional< Elements > | computeOrbitalElements (const Float M, const Float mu, const Vector &r, const Vector &v) |
Computes the orbital elements, given position and velocity of a body. More... | |
Float | solveKeplersEquation (const Float M, const Float e, const Size iterCnt=10) |
Computes the eccentric anomaly by solving the Kepler's equation. More... | |
Float | eccentricAnomalyToTrueAnomaly (const Float u, const Float e) |
Computes the true anomaly from the eccentric anomaly and the eccentricity. More... | |
Float | trueAnomalyToEccentricAnomaly (const Float v, const Float e) |
Computes the eccentric anomaly from the true anomaly and the eccentricity. More... | |
Vector | position (const Float a, const Float e, const Float u) |
Computes the position on the elliptic trajectory. More... | |
Vector | velocity (const Float a, const Float e, const Float u, const Float n) |
Computes the velocity vector on the elliptic trajectory. More... | |
Float | meanMotion (const Float a, const Float m_total) |
Computes the mean motion from the Kepler's 3rd law. More... | |
Optional< Kepler::Elements > Kepler::computeOrbitalElements | ( | const Float | M, |
const Float | mu, | ||
const Vector & | r, | ||
const Vector & | v | ||
) |
Computes the orbital elements, given position and velocity of a body.
If the body trajectory is not closed (hyperbolic motion), returns NOTHING.
M | Mass characterizing the gravitational field, or sum of body masses for two-body problem |
mu | Mass of the orbiting body, or reduced mass for two-body problem |
r | Position of the orbiting body |
v | Velocity of the orbiting body |
Definition at line 37 of file TwoBody.cpp.
Computes the true anomaly from the eccentric anomaly and the eccentricity.
Definition at line 70 of file TwoBody.cpp.
Computes the mean motion from the Kepler's 3rd law.
Definition at line 90 of file TwoBody.cpp.
Computes the position on the elliptic trajectory.
It assumes a planar motion in z=0 plane.
a | Semi-major axis |
e | Eccentricity |
u | Eccentric anomaly |
Definition at line 82 of file TwoBody.cpp.
Computes the eccentric anomaly by solving the Kepler's equation.
M | Mean anomaly |
e | Eccentricity |
Definition at line 62 of file TwoBody.cpp.
Computes the eccentric anomaly from the true anomaly and the eccentricity.
Definition at line 76 of file TwoBody.cpp.
Computes the velocity vector on the elliptic trajectory.
It assumes a planar motion in z=0 plane.
a | Semi-major axis |
e | Eccentricity |
u | Eccentric anomaly |
n | Mean motion |
Definition at line 86 of file TwoBody.cpp.