Functions
kepler.c File Reference

Solve Keplerian orbits. More...

#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "aephem.h"

Functions

double ae_kepler_embofs (double jd_tt, double rect[])
 Adjust position from earth-moon barycentre to earth. More...
 
void ae_kepler (double jd_tt, const struct ae_orbit_t *orb, double q[])
 Find a Keplerian orbit. More...
 

Detailed Description

Solve Keplerian orbits.

Function Documentation

void ae_kepler ( double  jd_tt,
const struct ae_orbit_t orb,
double  q[] 
)

Find a Keplerian orbit.

This routine solves for a Keplerian orbit, given orbital parameters and the time.

The routine detects several cases of given orbital elements. If a program for perturbations is pointed to, it is called to calculate all the elements. If there is no program, then the mean longitude is calculated from the mean anomaly and daily motion. If the daily motion is not given, it is calculated by Kepler's law. If the eccentricity is given to be 1.0, it means that meandistance is really the perihelion distance, as in a comet specification, and the orbit is parabolic.

Reference:

  • Taff, L.G., "Celestial Mechanics, A Computational Guide for the Practitioner." Wiley, 1985.
Parameters
jd_ttThe Julian date in TT.
orbThe orbital elements.
qFor returning the heliocentric equatorial rectangular coordinates of the object, in AU.

References ae_orbit_t::a, AE_DTR, ae_epsilon(), ae_g3plan(), ae_gplan(), AE_J2000, ae_kepler_embofs(), ae_mod_2pi(), ae_mod_360(), ae_precess(), AE_STR, AE_TO_J2000, ae_zatan2(), ae_orbit_t::dm, ae_orbit_t::ecc, ae_orbit_t::epoch, ae_orbit_t::equinox, ae_orbit_t::i, ae_orbit_t::L, ae_orbit_t::M, ae_orbit_t::name, ae_orbit_t::ptable, ae_orbit_t::W, and ae_orbit_t::w.

Referenced by ae_geocentric_from_orbit(), ae_geocentric_moon_from_orbit(), ae_geocentric_sun_from_orbit(), ae_light_t_orbit(), ae_v_orbit(), and aes_subobs_point().

double ae_kepler_embofs ( double  jd_tt,
double  rect[] 
)

Adjust position from earth-moon barycentre to earth.

Parameters
jd_ttThe Julian date in TT.
rectEquatorial rectangular coordinates of EMB.
Returns
Earth's distance to the sun, in AU.

References AE_E_M_RAT, ae_gmoon(), ae_precess(), and AE_TO_J2000.

Referenced by ae_kepler().