KeplerOrbit $SSW_SMEI_UCSD/gen/idl/ephem/keplerorbit.pro
[Previous] [Next]
 NAME:
	KeplerOrbit
 PURPOSE:
	Calculate positions and velocities for a simple Kepler orbit
	(of body m2 relative to body m1)
 CATEGORY:
	smei/gen/idl/ephem
 CALLING SEQUENCE:
	FUNCTION KeplerOrbit, T 	, $
	    elements	= OrbitElements , $
	    plane	= OrbitPlane	, $
	    m1		= m1		, $
	    m2		= m2		, $
	    degrees	= Degrees	, $
	    velocity	= velocity	, $
	    angularvelocity=angularvelocity
 INPUTS:
	T		array; type: standard time structure
			    times (UT)
	elements=OrbitElements
			array[4]; type: float
			    OrbitElement[0] Semi-major axis
			    OrbitElement[1] Eccentricity
			    OrbitElement[2] Argument of perihelion
					    =angle(ascending node-perihelion)
			    OrbitElement[3] Time of perihelion passage in days since 2000, Jan 1.5 (njd)
 OPTIONAL INPUT PARAMETERS:
	plane=OrbitPlane
			array[2]; type: float
			    OrbitElement[0] Longitude ascending node
			    OrbitElement[1] Inclination of orbital plane
	m1=m1		scalar; type: float: default: 1 (solar mass)
			    mass of primary body in units of the solar mass
	m2=m2		scalar; type: float: default: 0 (ignored)
			    mass of secondary body in units of the solar mass
 OUTPUTS:
	R		array[3,*]; type: float
			    longitude (deg/rad), latitude (deg/rad) and distance (AU)
			    the angular units depend on the setting of /degrees
 OPTIONAL OUTPUT PARAMETERS:
	velocity=velocity
			array[3,*]; type: float
			    velocity, tangential velocity and radial velocity (AU/day)
			    in orbital plane
	angularvelocity=angularvelocity
			    longitude (deg/rad), latitude (deg/rad) and magnitude (AU/day)
			    of velocity vector
 INCLUDE:
	@compile_opt.pro	; On error, return to caller
 EXTERNAL:
	EqKepler
 CALLS: ***
	EulerRotate, InitVar, TimeGet, ToRadians, nrZBrent
 CALLED BY:
	HOSOrbit, MessengerOrbit, RemoteView_BodyLoc, StereoAOrbit, StereoBOrbit
	UlyssesOrbit, mpc_orbit_eph
 PROCEDURE:
	Standard Kepler orbit stuff
 MODIFICATION HISTORY:
	SEP-1998, Paul Hick (UCSD/CASS)
	SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
	    modified to work with time structures