uint32_t Size
Integral type used to index arrays (by default).
double Float
Precision used withing the code. Use Float instead of float or double where precision is important.
#define NAMESPACE_SPH_END
Wrapper of type value of which may or may not be present.
Basic vector algebra. Computations are accelerated using SIMD.
Wrapper of type value of which may or may not be present.
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.
Float trueAnomalyToEccentricAnomaly(const Float v, const Float e)
Computes the eccentric anomaly from the true anomaly and the eccentricity.
Float eccentricAnomalyToTrueAnomaly(const Float u, const Float e)
Computes the true anomaly from the eccentric anomaly and the eccentricity.
Float solveKeplersEquation(const Float M, const Float e, const Size iterCnt=10)
Computes the eccentric anomaly by solving the Kepler's equation.
Float meanMotion(const Float a, const Float m_total)
Computes the mean motion from the Kepler's 3rd law.
Vector position(const Float a, const Float e, const Float u)
Computes the position on the elliptic trajectory.
Vector velocity(const Float a, const Float e, const Float u, const Float n)
Computes the velocity vector on the elliptic trajectory.
Object holding Keplerian orbital elements of a body.
Float periapsisArgument() const
Computes the argument of periapsis of the orbit. In the singular case e=0, returns 0.
Vector K
Laplace vector, integral of motion with direction towards pericenter.
Float pericenterDist() const
Computes the distance of the pericenter.
Float ascendingNode() const
Computes the longitude of the ascending node. In the singular case i=0, reutrns 0.
Float i
Inclination with respect to the z=0 plane.
Float semiminorAxis() const
Computes the semi-minor axis.
Vector L
Angular momentum, perpendicular to the orbital plane.