[Previous]
[Next]
NAME:
KeplerOrbit
PURPOSE:
Calculate orbital positions and velocities for elliptic and
hyperbolic Kepler orbits.
CATEGORY:
Celestial mechanics: two-body problem
CALLING SEQUENCE:
subroutine KeplerOrbit(JD,m1i,m2i,OrbitElement,Position,Velocity)
INPUTS:
JD double precision
time difference (days) with epoch t0
m1 real primary mass (in solar masses)
if m1 <=0 then m1 = 1 (solar mass) is used
m2 real secondary mass (in solar masses)
if m2 < 0 then m2 = 0 is used.
OrbitElement(5) real orbital elements:
1: semi-major axis (AU)
2: eccentricity
3: inclination of orbital plane to ecliptic (deg)
4: ecliptic longitude ascending node (deg)
5: longitude of perihelion (deg)
= angle(longitude ascending node)+
argument of perihelion
6: mean longitude at epoch t0 (deg)
!! Argument of perihelion = angle(ascending node-perihelion)
!! If the orbital inclination (element 3) is zero, then the longitude of the
node (element 4) is not used, and the longitude of the perihelion and
the mean longitude at t0 become ecliptic longitudes.
OUTPUTS:
Position(3) real position vector relative to m1:
1: ecliptic longitude (deg),
2: ecliptic latitude (deg),
3: radial distance (AU)
Velocity(5) real velocity vector relative to m1:
1: ecliptic longitude (deg),
2: ecliptic latitude (deg),
3: velocity (AU/day),
4: tangential velocity (AU/day),
5: radial velocity (AU/day)
CALLS: ***
EqKepler, atan2d, cosd, nrZBrent, rotate, sind
CALLED BY:
HOSOrbit, MessengerOrbit, PlanetOrbit, StereoAOrbit, StereoBOrbit, StereoOrbit
UlyssesOrbit
EXTERNAL:
external EqKepler
INCLUDE:
include 'math.h'
include 'sun.h'
COMMON BLOCKS:
common /KEPLER/ M,ee
PROCEDURE:
> Basic two-body problem (see Green, p. 163-164)
> The time of perihelion passage can be used as epoch t0.
In that case the mean longitude (at epoch t0) is equal to
the longitude of the perihelion; i.e.
OrbitElement(5) = OrbitElement(6)
MODIFICATION HISTORY:
JUN-1997, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Adapted from IDL procedure KeplerOrbit